All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Staging: lustre: Declare as static and remove unused code
@ 2015-11-01 11:36 Shraddha Barke
  2015-11-01 11:36 ` [PATCH v2 3/3] Staging: lustre: libcfs: Remove unused functions Shraddha Barke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shraddha Barke @ 2015-11-01 11:36 UTC (permalink / raw
  To: outreachy-kernel

These patches declare local functions as static and remove
unused code. 

Shraddha Barke (3):
  Staging: lustre: ptlrpc: Remove unused function declarations
  Staging: lustre: obdclass: Declare local function cl_lock_mutex_try as
    static
  Staging: lustre: libcfs: Declare local structures as static

 drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 7 -------
 drivers/staging/lustre/lustre/libcfs/hash.c               | 21 ---------------------
 drivers/staging/lustre/lustre/obdclass/cl_lock.c          | 3 +--
 drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h    | 3 ---
 4 files changed, 1 insertions(+), 33 deletions(-)

-- 
2.1.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 3/3] Staging: lustre: libcfs: Remove unused functions
  2015-11-01 11:36 [PATCH v2 0/3] Staging: lustre: Declare as static and remove unused code Shraddha Barke
@ 2015-11-01 11:36 ` Shraddha Barke
  2015-11-01 11:36 ` [PATCH v2 1/3] Staging: lustre: ptlrpc: Remove unused function declarations Shraddha Barke
  2015-11-01 11:36 ` [PATCH v2 2/3] Staging: lustre: obdclass: Declare local function cl_lock_mutex_try as static Shraddha Barke
  2 siblings, 0 replies; 4+ messages in thread
From: Shraddha Barke @ 2015-11-01 11:36 UTC (permalink / raw
  To: outreachy-kernel

The functions cfs_hash_bd_findadd_locked and cfs_hash_bd_finddel_locked
are not used anywhere. Thus remove these functions.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
Changes in v2-
 Fix commit message.

 .../lustre/include/linux/libcfs/libcfs_hash.h       |  7 -------
 drivers/staging/lustre/lustre/libcfs/hash.c         | 21 ---------------------
 2 files changed, 28 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index 70b8b29..d29e359 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -641,13 +641,6 @@ cfs_hash_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd,
 struct hlist_node *
 cfs_hash_bd_peek_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd,
 			const void *key);
-struct hlist_node *
-cfs_hash_bd_findadd_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd,
-			   const void *key, struct hlist_node *hnode,
-			   int insist_add);
-struct hlist_node *
-cfs_hash_bd_finddel_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd,
-			   const void *key, struct hlist_node *hnode);
 
 /**
  * operations on cfs_hash bucket (bd: bucket descriptor),
diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c
index 0308744..ae6c646 100644
--- a/drivers/staging/lustre/lustre/libcfs/hash.c
+++ b/drivers/staging/lustre/lustre/libcfs/hash.c
@@ -680,27 +680,6 @@ cfs_hash_bd_peek_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, const void
 }
 EXPORT_SYMBOL(cfs_hash_bd_peek_locked);
 
-struct hlist_node *
-cfs_hash_bd_findadd_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd,
-			   const void *key, struct hlist_node *hnode,
-			   int noref)
-{
-	return cfs_hash_bd_lookup_intent(hs, bd, key, hnode,
-					 (!noref * CFS_HS_LOOKUP_MASK_REF) |
-					 CFS_HS_LOOKUP_IT_ADD);
-}
-EXPORT_SYMBOL(cfs_hash_bd_findadd_locked);
-
-struct hlist_node *
-cfs_hash_bd_finddel_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd,
-			   const void *key, struct hlist_node *hnode)
-{
-	/* hnode can be NULL, we find the first item with @key */
-	return cfs_hash_bd_lookup_intent(hs, bd, key, hnode,
-					 CFS_HS_LOOKUP_IT_FINDDEL);
-}
-EXPORT_SYMBOL(cfs_hash_bd_finddel_locked);
-
 static void
 cfs_hash_multi_bd_lock(struct cfs_hash *hs, struct cfs_hash_bd *bds,
 		       unsigned n, int excl)
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 1/3] Staging: lustre: ptlrpc: Remove unused function declarations
  2015-11-01 11:36 [PATCH v2 0/3] Staging: lustre: Declare as static and remove unused code Shraddha Barke
  2015-11-01 11:36 ` [PATCH v2 3/3] Staging: lustre: libcfs: Remove unused functions Shraddha Barke
@ 2015-11-01 11:36 ` Shraddha Barke
  2015-11-01 11:36 ` [PATCH v2 2/3] Staging: lustre: obdclass: Declare local function cl_lock_mutex_try as static Shraddha Barke
  2 siblings, 0 replies; 4+ messages in thread
From: Shraddha Barke @ 2015-11-01 11:36 UTC (permalink / raw
  To: outreachy-kernel

Functions ptlrpc_handle_failed_import and ptlrpc_lprocfs_do_request_stat
have been declared but not used. Thus drop the declarations.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
Changes in v2-
 No change.

 drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
index ab6c458..833ed94 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
+++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
@@ -73,7 +73,6 @@ void ptlrpc_request_handle_notconn(struct ptlrpc_request *);
 void lustre_assert_wire_constants(void);
 int ptlrpc_import_in_recovery(struct obd_import *imp);
 int ptlrpc_set_import_discon(struct obd_import *imp, __u32 conn_cnt);
-void ptlrpc_handle_failed_import(struct obd_import *imp);
 int ptlrpc_replay_next(struct obd_import *imp, int *inflight);
 void ptlrpc_initiate_recovery(struct obd_import *imp);
 
@@ -88,8 +87,6 @@ void ptlrpc_ldebugfs_register_service(struct dentry *debugfs_entry,
 				      struct ptlrpc_service *svc);
 void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc);
 void ptlrpc_lprocfs_rpc_sent(struct ptlrpc_request *req, long amount);
-void ptlrpc_lprocfs_do_request_stat(struct ptlrpc_request *req,
-				     long q_usec, long work_usec);
 
 /* NRS */
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/3] Staging: lustre: obdclass: Declare local function cl_lock_mutex_try as static
  2015-11-01 11:36 [PATCH v2 0/3] Staging: lustre: Declare as static and remove unused code Shraddha Barke
  2015-11-01 11:36 ` [PATCH v2 3/3] Staging: lustre: libcfs: Remove unused functions Shraddha Barke
  2015-11-01 11:36 ` [PATCH v2 1/3] Staging: lustre: ptlrpc: Remove unused function declarations Shraddha Barke
@ 2015-11-01 11:36 ` Shraddha Barke
  2 siblings, 0 replies; 4+ messages in thread
From: Shraddha Barke @ 2015-11-01 11:36 UTC (permalink / raw
  To: outreachy-kernel

Function cl_lock_mutex_try has been used only in this particular file.
Thus declare the function as static.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
Changes in v2-
 No change

 drivers/staging/lustre/lustre/obdclass/cl_lock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c
index 5621beb..1836dc0 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c
@@ -687,7 +687,7 @@ EXPORT_SYMBOL(cl_lock_mutex_get);
  *
  * \see cl_lock_mutex_get()
  */
-int cl_lock_mutex_try(const struct lu_env *env, struct cl_lock *lock)
+static int cl_lock_mutex_try(const struct lu_env *env, struct cl_lock *lock)
 {
 	int result;
 
@@ -705,7 +705,6 @@ int cl_lock_mutex_try(const struct lu_env *env, struct cl_lock *lock)
 		result = -EBUSY;
 	return result;
 }
-EXPORT_SYMBOL(cl_lock_mutex_try);
 
 /**
  {* Unlocks cl_lock object.
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-01 11:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-01 11:36 [PATCH v2 0/3] Staging: lustre: Declare as static and remove unused code Shraddha Barke
2015-11-01 11:36 ` [PATCH v2 3/3] Staging: lustre: libcfs: Remove unused functions Shraddha Barke
2015-11-01 11:36 ` [PATCH v2 1/3] Staging: lustre: ptlrpc: Remove unused function declarations Shraddha Barke
2015-11-01 11:36 ` [PATCH v2 2/3] Staging: lustre: obdclass: Declare local function cl_lock_mutex_try as static Shraddha Barke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.