From: Geert Uytterhoeven <geert@linux-m68k.org>
To: David Laight <David.Laight@aculab.com>
Cc: David Miller <davem@davemloft.net>,
"santosh.shilimkar@ti.com" <santosh.shilimkar@ti.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"sandeep_n@ti.com" <sandeep_n@ti.com>,
"joe@perches.com" <joe@perches.com>
Subject: Re: [PATCH v5 2/3] net: Add Keystone NetCP ethernet driver
Date: Tue, 30 Sep 2014 15:28:23 +0200 [thread overview]
Message-ID: <CAMuHMdXe2H4qfX4X4GDzJSgoWzu-BrvRL6KoZagepY1GYEA4Ag@mail.gmail.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D174A1012@AcuExch.aculab.com>
On Tue, Sep 30, 2014 at 3:09 PM, David Laight <David.Laight@aculab.com> wrote:
>> > +static inline int gbe_phy_link_status(struct gbe_slave *slave)
>> > +{
>> > + if (!slave->phy)
>> > + return 1;
>> > +
>> > + if (slave->phy->link)
>> > + return 1;
>> > +
>> > + return 0;
>> > +}
>>
>> Please use 'bool' as the return type and return 'true' or 'false'.
>
> That function body could also be just:
> return !slave->phy && slave->phy->link;
> which might be more readable if directly coded.
return !slave->phy || slave->phy->link;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2014-09-30 13:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 17:48 [PATCH v5 0/3] net: Add Keystone NetCP ethernet driver support Santosh Shilimkar
2014-09-25 17:48 ` [PATCH v5 1/3] Documentation: dt: net: Add binding doc for Keystone NetCP ethernet driver Santosh Shilimkar
2014-09-25 17:48 ` [PATCH v5 2/3] net: Add " Santosh Shilimkar
2014-09-29 19:52 ` David Miller
[not found] ` <20140929.155200.2231132602322345812.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-09-29 20:02 ` Santosh Shilimkar
2014-09-29 20:12 ` David Miller
2014-09-29 21:47 ` Santosh Shilimkar
2014-09-30 13:09 ` David Laight
2014-09-30 13:28 ` Geert Uytterhoeven [this message]
2014-09-25 17:48 ` [PATCH v5 3/3] MAINTAINER: net: Add TI NETCP Ethernet driver entry Santosh Shilimkar
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=CAMuHMdXe2H4qfX4X4GDzJSgoWzu-BrvRL6KoZagepY1GYEA4Ag@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=David.Laight@aculab.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sandeep_n@ti.com \
--cc=santosh.shilimkar@ti.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).