LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andreas Ruprecht <rupran@einserver.de>
To: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, viro@ZenIV.linux.org.uk,
	Andreas Ruprecht <rupran@einserver.de>
Subject: [PATCH] staging: lustre: osc: Make osc_init() static
Date: Mon,  2 Feb 2015 20:24:14 +0100	[thread overview]
Message-ID: <1422905054-13566-1-git-send-email-rupran@einserver.de> (raw)
In-Reply-To: <20150202141606.GY29656@ZenIV.linux.org.uk>

osc_init() is marked as the module_init function in osc_request.c
and is never used anywhere else. Hence, it can (and should) be
declared static.

sparse also complained about this with the following warning, which
is fixed by this patch.

andreas@workbox:~/linux-next$ make C=1 M=drivers/staging/lustre/lustre/osc/
[...]
drivers/staging/lustre/lustre/osc/osc_request.c:3335:12: warning:
symbol 'osc_init' was not declared. Should it be static?
[...]

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
---
 drivers/staging/lustre/lustre/osc/osc_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index b9450b9..0adfa70 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -3332,7 +3332,7 @@ extern struct lu_kmem_descr osc_caches[];
 extern spinlock_t osc_ast_guard;
 extern struct lock_class_key osc_ast_guard_class;
 
-int __init osc_init(void)
+static int __init osc_init(void)
 {
 	struct lprocfs_static_vars lvars = { NULL };
 	int rc;
-- 
1.9.1


      parent reply	other threads:[~2015-02-02 19:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 13:36 [PATCH] staging: lustre: osc: Fix sparse warning about osc_init Andreas Ruprecht
2015-02-02 14:16 ` Al Viro
2015-02-02 19:13   ` Andreas Ruprecht
2015-02-05 16:30     ` use of opaque subject lines Al Viro
2015-02-05 16:57       ` Lad, Prabhakar
2015-02-05 17:57         ` Greg Kroah-Hartman
2015-02-05 18:22           ` Lad, Prabhakar
2015-02-05 19:32           ` Paul Bolle
2015-02-05 20:06             ` Greg Kroah-Hartman
2015-02-05 20:53               ` Joe Perches
2015-02-05 17:08       ` Joe Perches
2015-02-05 17:25         ` Dan Carpenter
2015-02-05 17:31           ` Joe Perches
2015-02-05 17:32             ` Joe Perches
2015-02-05 17:35               ` Dan Carpenter
2015-02-05 18:01                 ` Joe Perches
2015-02-05 18:26                   ` Dan Carpenter
2015-02-05 18:03         ` Greg Kroah-Hartman
2015-02-02 19:24   ` Andreas Ruprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422905054-13566-1-git-send-email-rupran@einserver.de \
    --to=rupran@einserver.de \
    --cc=HPDD-discuss@ml01.01.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg.drokin@intel.com \
    --cc=viro@ZenIV.linux.org.uk \
    --subject='Re: [PATCH] staging: lustre: osc: Make osc_init() static' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).