public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Serguey Parkhomovsky <sergueyparkhomovsky@gmail.com>
Cc: Jeremiah Mahler <jmmahler@gmail.com>,
	Oleg Drokin <oleg.drokin@intel.com>,
	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
Subject: Re: [PATCH] staging: lustre: linux-prim.c: fix sparse warnings about static declaration
Date: Wed, 31 Dec 2014 10:50:54 +0530	[thread overview]
Message-ID: <20141231052053.GA3389@sudip-PC> (raw)
In-Reply-To: <20141231030435.GA3775@fedora.localdomain>

On Tue, Dec 30, 2014 at 07:04:35PM -0800, Serguey Parkhomovsky wrote:
> On Tue, Dec 30, 2014 at 02:35:18PM -0800, Jeremiah Mahler wrote:
> > 
> > If you look at the source code just below these functions you will find:
> > 
> > EXPORT_SYMBOL(libcfs_arch_init);
> > EXPORT_SYMBOL(libcfs_arch_cleanup);
> > 
> > So making these static is incorrect because they are being used outside
> > of this file.
> > 
> 
> Thanks for the review, and sorry about the noise; I'll be more careful next time.

these tools are there to help you find the problems in the code.but after that we need to use our own judgement to decide.
in this case the solution is to declare them in libcfs.h

and please atleast buildtest your patch before sending. If you would have compiled this patch then you could have seen 2 new warnings:
"WARNING: "libcfs_arch_init" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!"
"WARNING: "libcfs_arch_cleanup" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!"

thanks
sudip

> 
> Serguey
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2014-12-31  5:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 11:10 [PATCH] staging: lustre: linux-prim.c: fix sparse warnings about static declaration Serguey Parkhomovsky
2014-12-30 22:35 ` Jeremiah Mahler
2014-12-31  3:04   ` Serguey Parkhomovsky
2014-12-31  5:20     ` Sudip Mukherjee [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=20141231052053.GA3389@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=HPDD-discuss@ml01.01.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jmmahler@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg.drokin@intel.com \
    --cc=sergueyparkhomovsky@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox