From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Alexander Duyck <alexander.h.duyck@redhat.com>
Cc: netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net
Subject: Re: [net-next PATCH 1/2] igb: Fix warning ‘pin’ may be used uninitialized
Date: Thu, 05 Mar 2015 11:27:03 -0800 [thread overview]
Message-ID: <1425583623.2556.142.camel@jtkirshe-mobl> (raw)
In-Reply-To: <20150305192459.22228.86492.stgit@ahduyck-vm-fedora20>
[-- Attachment #1: Type: text/plain, Size: 921 bytes --]
On Thu, 2015-03-05 at 11:24 -0800, Alexander Duyck wrote:
> When building the kernel using the gcc 4.8.3 compiler included in
> Fedora 20
> I was repeatedly seeing the warning:
>
> drivers/net/ethernet/intel/igb/igb_ptp.c: In function
> ‘igb_ptp_feature_enable_i210’:
> drivers/net/ethernet/intel/igb/igb_ptp.c:395:21: warning: ‘pin’ may
> be used uninitialized in this function
> [-Wmaybe-uninitialized]
> tssdp &= ~ts_sdp_en[pin];
> ^
> drivers/net/ethernet/intel/igb/igb_ptp.c:471:6: note: ‘pin’ was
> declared here
> int pin;
> ^
>
> To resolve it I am assigning the pin a value of -1 when it is
> instantiated.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
> ---
> drivers/net/ethernet/intel/igb/igb_ptp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks Alex, I have added your patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-05 19:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 19:24 [net-next PATCH 0/2] Fix some minor issues in igb driver Alexander Duyck
2015-03-05 19:24 ` [net-next PATCH 1/2] igb: Fix warning ‘pin’ may be used uninitialized Alexander Duyck
2015-03-05 19:27 ` Jeff Kirsher [this message]
2015-03-05 19:25 ` [net-next PATCH 2/2] igb: Make arrays on stack static const to avoid reallocation Alexander Duyck
2015-03-05 19:27 ` Jeff Kirsher
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=1425583623.2556.142.camel@jtkirshe-mobl \
--to=jeffrey.t.kirsher@intel.com \
--cc=alexander.h.duyck@redhat.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=netdev@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