mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Drokin, Oleg" <oleg.drokin@intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Benedict Boerger <benedict.boerger@cs.tu-dortmund.de>,
	"<linux-kernel@vger.kernel.org>" <linux-kernel@vger.kernel.org>,
	"<devel@driverdev.osuosl.org>" <devel@driverdev.osuosl.org>,
	"Dilger, Andreas" <andreas.dilger@intel.com>
Subject: Re: [PATCH] drivers: staging: lustre: fix sparse warnings / delete unused function
Date: Tue, 12 Aug 2014 01:58:45 +0000	[thread overview]
Message-ID: <4F91D9A1-B87D-498F-8089-7008F6BD4F30@intel.com> (raw)
In-Reply-To: <20140810043443.GA12200@kroah.com>


On Aug 10, 2014, at 12:34 AM, Greg KH wrote:
> Very odd, with this patch applied, I now get a build warning:
> 
> drivers/staging/lustre/lnet/lnet/config.c: In function ‘lnet_parse_ip2nets’:
> drivers/staging/lustre/lnet/lnet/config.c:1193:2: warning: ‘ipaddrs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>  lnet_ipaddr_free_enumeration(ipaddrs, nip);
>  ^

What's even more odd is that the very previous line also uses ipaddrs, yet it does not trigger the warning.
In any case I believe it's a false positive, since the only way it could remain unitialized is if
libcfs_ipif_enumerate returned negative value (stored in nif in this function) and we check for it being more than zero
before getting to that part of code.

I'll submit a patch assigning ipaddrs to NULL as a workaround shortly.

Bye,
    Oleg

  reply	other threads:[~2014-08-12  1:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 16:26 Benedict Boerger
2014-08-10  4:34 ` Greg KH
2014-08-12  1:58   ` Drokin, Oleg [this message]
2014-08-12  2:02     ` Oleg Drokin

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=4F91D9A1-B87D-498F-8089-7008F6BD4F30@intel.com \
    --to=oleg.drokin@intel.com \
    --cc=andreas.dilger@intel.com \
    --cc=benedict.boerger@cs.tu-dortmund.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®