From: David Miller on
From: Changli Gao <xiaosuo(a)gmail.com>
Date: Sun, 25 Apr 2010 17:33:02 +0800

> On Sun, Apr 25, 2010 at 5:19 PM, <xiaohui.xin(a)intel.com> wrote:
>> +static int dev_is_mpassthru(struct net_device *dev)
>> +{
>> + � � � if (dev && dev->mp_port)
>> + � � � � � � � return 1;
>> + � � � return 0;
>> +}
>> +
>
> Please make it a inline function. And you would write it with less
> lines of code.
>
> return dev && dev->mp_port;

And use "bool" :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: David Miller on
From: Changli Gao <xiaosuo(a)gmail.com>
Date: Sun, 25 Apr 2010 17:35:01 +0800

> On Sun, Apr 25, 2010 at 5:19 PM, <xiaohui.xin(a)intel.com> wrote:
>> +static int dev_is_mpassthru(struct net_device *dev)
>
> bool return value should be better here.

Right.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/