netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Hay, Joshua A" <joshua.a.hay@intel.com>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"gospo@redhat.com" <gospo@redhat.com>,
	"sassmann@redhat.com" <sassmann@redhat.com>
Subject: Re: [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c
Date: Tue, 27 Nov 2012 10:18:04 +0300	[thread overview]
Message-ID: <20121127071804.GR6186@mwanda> (raw)
In-Reply-To: <4329753313F5A742A09953EE6CC1B3CE28C7D984@ORSMSX108.amr.corp.intel.com>

On Tue, Nov 27, 2012 at 01:06:17AM +0000, Hay, Joshua A wrote:
> The return value will be changed to len to preserve error codes returned from simple_write_to_buffer.
> 
> However, changing the logic preceding this return breaks these functions.  If simple_write_to_buffer returns a positive value, other actions are performed with this value.  With this patch, the function will return immediately with that value instead.  This will effectively break the ixgbe_debugfs write operations.
> 
> So ultimately, the change should be: 
> > +	len = simple_write_to_buffer(ixgbe_dbg_reg_ops_buf,
> > +				     sizeof(ixgbe_dbg_reg_ops_buf)-1,
> > +				     ppos,
> > +				     buffer,
> > +				     count);
> > +	if (len < 0)
> > +		return -EFAULT;
> 	
> 	if (len < 0)
> 		return len;
> 

Yes.  Sorry, I wasn't reading carefully before.  That looks fine.

regards,
dan carpenter

  reply	other threads:[~2012-11-27  7:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-11-21 10:47 ` [net-next 01/10] ixgbe: Reformat output of ixgbe_dump Jeff Kirsher
2012-11-21 10:47 ` [net-next 02/10] ixgbe: convert to use simple_open() Jeff Kirsher
2012-11-21 10:47 ` [net-next 03/10] ixgbe: use ETQF filter name instead of magic number Jeff Kirsher
2012-11-21 10:47 ` [net-next 04/10] ixgbe: remove needless queuing for L4 ptp packets Jeff Kirsher
2012-11-21 10:47 ` [net-next 05/10] ixgbe: ethtool correctly identify autoneg setting Jeff Kirsher
2012-11-21 10:47 ` [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c Jeff Kirsher
2012-11-21 11:04   ` Dan Carpenter
2012-11-21 17:04     ` David Miller
2012-11-27  1:06     ` Hay, Joshua A
2012-11-27  7:18       ` Dan Carpenter [this message]
2012-11-21 10:47 ` [net-next 07/10] ixgbe: fdb: only allow NUD_PERM fdb entries Jeff Kirsher
2012-11-21 10:47 ` [net-next 08/10] igb: Update PTP Rx filters Jeff Kirsher
2012-11-21 11:37   ` Richard Cochran
2012-11-21 10:47 ` [net-next 09/10] igb: No longer rely on APME to determine WoL settings Jeff Kirsher
2012-11-21 10:47 ` [net-next 10/10] igb: Do not parse past IP header on fragments beyond the first 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=20121127071804.GR6186@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=joshua.a.hay@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@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;
as well as URLs for NNTP newsgroup(s).