Subject: Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

From: Stephen Hemminger <[email-masked]>
Date: Sun, 18 Oct 2015 22:19:58 -0700

On Sat, 17 Oct 2015 00:21:44 -0400
Michael Chan <[email-masked]> 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);
}