diff mbox

net: ceph: ceph_strings.c: Remove unused function

Message ID 1419078894-31656-1-git-send-email-rickard_strandqvist@spectrumdigital.se (mailing list archive)
State New, archived
Headers show

Commit Message

Rickard Strandqvist Dec. 20, 2014, 12:34 p.m. UTC
Remove the function ceph_pool_op_name() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 include/linux/ceph/ceph_fs.h |    2 --
 net/ceph/ceph_strings.c      |   14 --------------
 2 files changed, 16 deletions(-)

Comments

Ilya Dryomov Dec. 21, 2014, 11:24 a.m. UTC | #1
On Sat, Dec 20, 2014 at 3:34 PM, Rickard Strandqvist
<rickard_strandqvist@spectrumdigital.se> wrote:
> Remove the function ceph_pool_op_name() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.

It's part of pool op infrastructure and I'd rather we use it in
monc_show() than remove it.  I'll make a patch.

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ilya Dryomov Dec. 22, 2014, 2:03 p.m. UTC | #2
On Sun, Dec 21, 2014 at 2:24 PM, Ilya Dryomov <ilya.dryomov@inktank.com> wrote:
> On Sat, Dec 20, 2014 at 3:34 PM, Rickard Strandqvist
> <rickard_strandqvist@spectrumdigital.se> wrote:
>> Remove the function ceph_pool_op_name() that is not used anywhere.
>>
>> This was partially found by using a static code analysis program called cppcheck.
>
> It's part of pool op infrastructure and I'd rather we use it in
> monc_show() than remove it.  I'll make a patch.

Actually, pool op stuff has been unused for over two years - looks like
it was added for rbd create_snap and that got ripped out in 2012.  It's
unlikely we'd ever need to manage pools or snaps from the kernel client
so I think it makes sense to nuke it.  Sage?

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sage Weil Dec. 22, 2014, 2:35 p.m. UTC | #3
On Mon, 22 Dec 2014, Ilya Dryomov wrote:
> On Sun, Dec 21, 2014 at 2:24 PM, Ilya Dryomov <ilya.dryomov@inktank.com> wrote:
> > On Sat, Dec 20, 2014 at 3:34 PM, Rickard Strandqvist
> > <rickard_strandqvist@spectrumdigital.se> wrote:
> >> Remove the function ceph_pool_op_name() that is not used anywhere.
> >>
> >> This was partially found by using a static code analysis program called cppcheck.
> >
> > It's part of pool op infrastructure and I'd rather we use it in
> > monc_show() than remove it.  I'll make a patch.
> 
> Actually, pool op stuff has been unused for over two years - looks like
> it was added for rbd create_snap and that got ripped out in 2012.  It's
> unlikely we'd ever need to manage pools or snaps from the kernel client
> so I think it makes sense to nuke it.  Sage?

Yep!

sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index 3c97d5e..0684f9e 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -191,8 +191,6 @@  struct ceph_mon_statfs_reply {
 	struct ceph_statfs st;
 } __attribute__ ((packed));
 
-const char *ceph_pool_op_name(int op);
-
 struct ceph_mon_poolop {
 	struct ceph_mon_request_header monhdr;
 	struct ceph_fsid fsid;
diff --git a/net/ceph/ceph_strings.c b/net/ceph/ceph_strings.c
index 3056020..139a9cb 100644
--- a/net/ceph/ceph_strings.c
+++ b/net/ceph/ceph_strings.c
@@ -42,17 +42,3 @@  const char *ceph_osd_state_name(int s)
 		return "???";
 	}
 }
-
-const char *ceph_pool_op_name(int op)
-{
-	switch (op) {
-	case POOL_OP_CREATE: return "create";
-	case POOL_OP_DELETE: return "delete";
-	case POOL_OP_AUID_CHANGE: return "auid change";
-	case POOL_OP_CREATE_SNAP: return "create snap";
-	case POOL_OP_DELETE_SNAP: return "delete snap";
-	case POOL_OP_CREATE_UNMANAGED_SNAP: return "create unmanaged snap";
-	case POOL_OP_DELETE_UNMANAGED_SNAP: return "delete unmanaged snap";
-	}
-	return "???";
-}