From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: David Miller <davem@davemloft.net>
Cc: <joe@perches.com>, <jeffrey.t.kirsher@intel.com>,
<netdev@vger.kernel.org>, <gospo@redhat.com>,
<sassmann@redhat.com>
Subject: Re: [net 5/6] i40e: better return values
Date: Tue, 24 Sep 2013 12:09:06 -0700 [thread overview]
Message-ID: <20130924120906.00000efe@unknown> (raw)
In-Reply-To: <20130924.101231.1193830264265403478.davem@davemloft.net>
On Tue, 24 Sep 2013 10:12:31 -0400
David Miller <davem@davemloft.net> wrote:
> > Ick. post_increment problem.
> >
> > return ++num_tc;
> >
> > There's nothing wrong with the original code
> > unless this is a bugfix which should be documented
> > better than "better return values".
>
> Agreed, this style of coding is asking for a bug.
>
> If you want to return "num_tc PLUS ONE" just say that:
>
> return num_tc + 1;
Oops! Obviously the original post-inc was not the intent. That was my
bad. good catch Joe! will fix and resubmit.
next prev parent reply other threads:[~2013-09-24 19:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-24 9:45 [net 0/6][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-09-24 9:45 ` [net 1/6] igb: Fix ethtool loopback test for 82580 copper Jeff Kirsher
2013-09-24 9:45 ` [net 2/6] i40e: use common failure flow Jeff Kirsher
2013-09-24 9:45 ` [net 3/6] i40e: small clean ups from review Jeff Kirsher
2013-09-24 9:45 ` [net 4/6] i40e: convert ret to aq_ret Jeff Kirsher
2013-09-24 9:45 ` [net 5/6] i40e: better return values Jeff Kirsher
2013-09-24 11:34 ` Joe Perches
2013-09-24 14:12 ` David Miller
2013-09-24 19:09 ` Jesse Brandeburg [this message]
2013-09-24 9:45 ` [net 6/6] i40e: clean up coccicheck reported errors 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=20130924120906.00000efe@unknown \
--to=jesse.brandeburg@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=joe@perches.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).