linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging/lustre: Make nrs_policy_get_info_locked() static
@ 2015-10-02 21:54 Rocco Folino
  2015-10-02 21:59 ` Arnd Bergmann
  2015-10-02 22:10 ` kbuild test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Rocco Folino @ 2015-10-02 21:54 UTC (permalink / raw)
  To: oleg.drokin, andreas.dilger
  Cc: gregkh, joe, Julia.Lawall, dmiter4ever, arnd, hannac,
	lustre-devel, devel, linux-kernel, Rocco Folino

This patch fixes the warning generated by sparse: "symbol 'nrs_policy_get_info_locked' was not
declared. Should it be static?" by declaring the function static.

Signed-off-by: Rocco Folino <rocco@devzen.net>
---
 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
index 3a212b4be9a1..6cf9b92c7c05 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
@@ -452,7 +452,7 @@ static const char *nrs_state2str(enum ptlrpc_nrs_pol_state state)
  * \param[in] policy The policy
  * \param[out] info  Holds returned status information
  */
-void nrs_policy_get_info_locked(struct ptlrpc_nrs_policy *policy,
+static void nrs_policy_get_info_locked(struct ptlrpc_nrs_policy *policy,
 				struct ptlrpc_nrs_pol_info *info)
 {
 	LASSERT(policy != NULL);
--
2.4.3


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

* Re: [PATCH] staging/lustre: Make nrs_policy_get_info_locked() static
  2015-10-02 21:54 [PATCH] staging/lustre: Make nrs_policy_get_info_locked() static Rocco Folino
@ 2015-10-02 21:59 ` Arnd Bergmann
  2015-10-02 22:10 ` kbuild test robot
  1 sibling, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-10-02 21:59 UTC (permalink / raw)
  To: Rocco Folino
  Cc: oleg.drokin, andreas.dilger, gregkh, joe, Julia.Lawall,
	dmiter4ever, hannac, lustre-devel, devel, linux-kernel

On Friday 02 October 2015 23:54:26 Rocco Folino wrote:
> This patch fixes the warning generated by sparse: "symbol 'nrs_policy_get_info_locked' was not
> declared. Should it be static?" by declaring the function static.
> 
> Signed-off-by: Rocco Folino <rocco@devzen.net>
> 

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

This probably triggered a sparse warning after the unused declaration was
removed in my "staging/lustre: remove lots of dead code".

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

* Re: [PATCH] staging/lustre: Make nrs_policy_get_info_locked() static
  2015-10-02 21:54 [PATCH] staging/lustre: Make nrs_policy_get_info_locked() static Rocco Folino
  2015-10-02 21:59 ` Arnd Bergmann
@ 2015-10-02 22:10 ` kbuild test robot
  2015-10-02 22:13   ` Arnd Bergmann
  1 sibling, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2015-10-02 22:10 UTC (permalink / raw)
  To: Rocco Folino
  Cc: kbuild-all, oleg.drokin, andreas.dilger, devel, dmiter4ever,
	arnd, gregkh, linux-kernel, Julia.Lawall, Rocco Folino, hannac,
	joe, lustre-devel

[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]

Hi Rocco,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

config: sparc64-allyesconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All error/warnings (new ones prefixed by >>):

>> drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:456:13: error: static declaration of 'nrs_policy_get_info_locked' follows non-static declaration
    static void nrs_policy_get_info_locked(struct ptlrpc_nrs_policy *policy,
                ^
   In file included from drivers/staging/lustre/lustre/ptlrpc/../include/lustre_lib.h:64:0,
                    from drivers/staging/lustre/lustre/ptlrpc/../include/obd.h:52,
                    from drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:40:
   drivers/staging/lustre/lustre/ptlrpc/../include/lustre_net.h:1542:6: note: previous declaration of 'nrs_policy_get_info_locked' was here
    void nrs_policy_get_info_locked(struct ptlrpc_nrs_policy *policy,
         ^

vim +/nrs_policy_get_info_locked +456 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c

   450	 *
   451	 * Information is copied in \a info.
   452	 *
   453	 * \param[in] policy The policy
   454	 * \param[out] info  Holds returned status information
   455	 */
 > 456	static void nrs_policy_get_info_locked(struct ptlrpc_nrs_policy *policy,
   457					struct ptlrpc_nrs_pol_info *info)
   458	{
   459		LASSERT(policy != NULL);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 43733 bytes --]

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

* Re: [PATCH] staging/lustre: Make nrs_policy_get_info_locked() static
  2015-10-02 22:10 ` kbuild test robot
@ 2015-10-02 22:13   ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-10-02 22:13 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Rocco Folino, kbuild-all, oleg.drokin, andreas.dilger, devel,
	dmiter4ever, gregkh, linux-kernel, Julia.Lawall, hannac, joe,
	lustre-devel

On Saturday 03 October 2015 06:10:12 kbuild test robot wrote:
> >> drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:456:13: error: static declaration of 'nrs_policy_get_info_locked' follows non-static declaration
>     static void nrs_policy_get_info_locked(struct ptlrpc_nrs_policy *policy,
>                 ^
>    In file included from drivers/staging/lustre/lustre/ptlrpc/../include/lustre_lib.h:64:0,
>                     from drivers/staging/lustre/lustre/ptlrpc/../include/obd.h:52,
>                     from drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:40:
>    drivers/staging/lustre/lustre/ptlrpc/../include/lustre_net.h:1542:6: note: previous declaration of 'nrs_policy_get_info_locked' was here
>     void nrs_policy_get_info_locked(struct ptlrpc_nrs_policy *policy,
>          ^
> 

fwiw, the patch should be fine on staging-testing, just not on mainline at the moment.

	Arnd

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

end of thread, other threads:[~2015-10-02 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-02 21:54 [PATCH] staging/lustre: Make nrs_policy_get_info_locked() static Rocco Folino
2015-10-02 21:59 ` Arnd Bergmann
2015-10-02 22:10 ` kbuild test robot
2015-10-02 22:13   ` Arnd Bergmann

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).