All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: lustre: osc: osc_request: Declare local function and structure as static
@ 2016-02-16 13:44 Amitoj Kaur Chawla
  2016-02-16 13:45 ` [Outreachy kernel] " Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Amitoj Kaur Chawla @ 2016-02-16 13:44 UTC (permalink / raw)
  To: outreachy-kernel

Declare osc_cleanup() function and osc_obd_ops structure as static
since they are defined and called only in this file.

Removed osc_cleanup() function prototype since it wasn't required.

This fixes the following sparse warnings:
drivers/staging/lustre/lustre/osc/osc_request.c:3210:5: warning:
symbol 'osc_cleanup' was not declared. Should it be static?
drivers/staging/lustre/lustre/osc/osc_request.c:3259:16: warning:
symbol 'osc_obd_ops' was not declared. Should it be static?

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
Changes in v2:
        -Modified subject
        -Removed unnecessary function prototype

 drivers/staging/lustre/lustre/osc/osc_request.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index 3ae00fc..b6df68d 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -104,7 +104,6 @@ struct osc_enqueue_args {
 static void osc_release_ppga(struct brw_page **ppga, u32 count);
 static int brw_interpret(const struct lu_env *env,
 			 struct ptlrpc_request *req, void *data, int rc);
-static int osc_cleanup(struct obd_device *obd);
 
 /* Pack OSC object metadata for disk storage (LE byte order). */
 static int osc_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
@@ -3207,7 +3206,7 @@ static int osc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
 	return 0;
 }
 
-int osc_cleanup(struct obd_device *obd)
+static int osc_cleanup(struct obd_device *obd)
 {
 	struct client_obd *cli = &obd->u.cli;
 	int rc;
@@ -3256,7 +3255,7 @@ static int osc_process_config(struct obd_device *obd, u32 len, void *buf)
 	return osc_process_config_base(obd, buf);
 }
 
-struct obd_ops osc_obd_ops = {
+static struct obd_ops osc_obd_ops = {
 	.owner          = THIS_MODULE,
 	.setup          = osc_setup,
 	.precleanup     = osc_precleanup,
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH v2] staging: lustre: osc: osc_request: Declare local function and structure as static
  2016-02-16 13:44 [PATCH v2] staging: lustre: osc: osc_request: Declare local function and structure as static Amitoj Kaur Chawla
@ 2016-02-16 13:45 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2016-02-16 13:45 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Amitoj Kaur Chawla

On Tuesday 16 February 2016 19:14:12 Amitoj Kaur Chawla wrote:
> Declare osc_cleanup() function and osc_obd_ops structure as static
> since they are defined and called only in this file.
> 
> Removed osc_cleanup() function prototype since it wasn't required.
> 
> This fixes the following sparse warnings:
> drivers/staging/lustre/lustre/osc/osc_request.c:3210:5: warning:
> symbol 'osc_cleanup' was not declared. Should it be static?
> drivers/staging/lustre/lustre/osc/osc_request.c:3259:16: warning:
> symbol 'osc_obd_ops' was not declared. Should it be static?
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> 

Reviewed-by: Arnd Bergmann <arnd@arndb.de>


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

end of thread, other threads:[~2016-02-16 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 13:44 [PATCH v2] staging: lustre: osc: osc_request: Declare local function and structure as static Amitoj Kaur Chawla
2016-02-16 13:45 ` [Outreachy kernel] " Arnd Bergmann

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.