From: Stephen Hemminger <stephen@networkplumber.org>
To: Michael Chan <mchan@broadcom.com>
Cc: <davem@davemloft.net>, <prashant@broadcom.com>,
<eddie.wai@broadcom.com>, <huangjw@broadcom.com>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.
Date: Sun, 18 Oct 2015 22:19:58 -0700 [thread overview]
Message-ID: <20151018221958.1b7b9d0d@xeon-e3> (raw)
In-Reply-To: <1445055704-6103-1-git-send-email-mchan@broadcom.com>
On Sat, 17 Oct 2015 00:21:44 -0400
Michael Chan <mchan@broadcom.com> wrote:
> +static bool bnxt_vf_pciid(int idx)
> +{
> + if (idx == BCM57304_VF || idx == BCM57404_VF)
> + return true;
> + return false;
> +}
> +
I prefer just returning result of logical operation
rather than adding unnecessary if statement.
And never use (signed) int when unsigned is the real
data type. Also avoid any unnecessary expansion of 16 bit
value.
static bool bnxt_vf_pciid(u16 idx)
{
return (idx == BCM57304_VF || idx == BCM57404_VF);
}
next prev parent reply other threads:[~2015-10-19 5:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 4:21 [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver Michael Chan
2015-10-19 5:17 ` Stephen Hemminger
2015-10-19 5:19 ` Stephen Hemminger [this message]
2015-10-19 23:04 ` Michael Chan
2015-10-20 15:47 ` David Laight
2015-10-19 5:21 ` Stephen Hemminger
2015-10-19 22:07 ` Michael Chan
2015-10-20 20:00 ` John W. Linville
2015-10-20 20:09 ` John W. Linville
2015-10-20 20:13 ` John W. Linville
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=20151018221958.1b7b9d0d@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=eddie.wai@broadcom.com \
--cc=huangjw@broadcom.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=prashant@broadcom.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).