Netdev List
 help / color / mirror / Atom feed
From: Jack Morgenstein <jackm@dev.mellanox.co.il>
To: "David Laight" <David.Laight@ACULAB.COM>
Cc: "Or Gerlitz" <or.gerlitz@gmail.com>,
	"Prarit Bhargava" <prarit@redhat.com>, <netdev@vger.kernel.org>,
	"Doug Ledford" <dledford@redhat.com>,
	"Amir Vadai" <amirv@mellanox.com>,
	"Or Gerlitz" <ogerlitz@mellanox.com>
Subject: Re: [PATCH] net, mellanox mlx4 Fix compile warnings
Date: Mon, 16 Sep 2013 16:52:06 +0300	[thread overview]
Message-ID: <20130916165206.6d1caf52@jpm-OptiPlex-GX620> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B733A@saturn3.aculab.com>

On Mon, 16 Sep 2013 09:59:41 +0100
"David Laight" <David.Laight@ACULAB.COM> wrote:

> > In any event, this change cannot hurt.  
> 
> It could hide a real 'used but not initialised' error later on...
> 
> 	David

In this case, it doesn't.  If cq_res_start_move_to returns 0, the "cq"
pointer points to the desired cq object.  In all instances where the cq
object is not found, you get an error return, and the cq pointer in the
caller is never de-referenced.

Therefore, the compiler warning is a false positive, and the
"uninitialized_var" is just a workaround to satisfy the compiler.

Same for the SRQ case.

-Jack

  parent reply	other threads:[~2013-09-16 13:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 12:30 [PATCH] net, mellanox mlx4 Fix compile warnings Prarit Bhargava
2013-09-14 19:10 ` Or Gerlitz
2013-09-15  6:14   ` Jack Morgenstein
2013-09-15  6:22     ` ZHAO Gang
2013-09-15  6:27       ` ZHAO Gang
2013-09-16  8:59     ` David Laight
2013-09-16 12:14       ` Prarit Bhargava
2013-09-16 13:52       ` Jack Morgenstein [this message]
2013-09-17  1:25 ` David Miller
2013-09-17 19:13   ` [PATCH 2/2] " Prarit Bhargava
2013-09-17 19:25     ` Or Gerlitz
2013-09-17 19:28       ` David Miller

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=20130916165206.6d1caf52@jpm-OptiPlex-GX620 \
    --to=jackm@dev.mellanox.co.il \
    --cc=David.Laight@ACULAB.COM \
    --cc=amirv@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=or.gerlitz@gmail.com \
    --cc=prarit@redhat.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