linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 net-next 1/4] sh_eth: Use bool as return type of sh_eth_is_gether()
Date: Thu, 16 Jan 2014 10:15:07 +0900	[thread overview]
Message-ID: <20140116011506.GA18995@verge.net.au> (raw)
In-Reply-To: <1389778520.14001.16.camel@joe-AO722>

On Wed, Jan 15, 2014 at 01:35:20AM -0800, Joe Perches wrote:
> On Wed, 2014-01-15 at 15:12 +0900, Simon Horman wrote:
> > Return a boolean and use true and false.
> []
> > diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> []
> > @@ -310,12 +310,12 @@ static const u16 sh_eth_offset_fast_sh3_sh2[SH_ETH_MAX_REGISTER_OFFSET] = {
> >  	[TSU_ADRL31]	= 0x01fc,
> >  };
> >  
> > -static int sh_eth_is_gether(struct sh_eth_private *mdp)
> > +static bool sh_eth_is_gether(struct sh_eth_private *mdp)
> >  {
> >  	if (mdp->reg_offset == sh_eth_offset_gigabit)
> > -		return 1;
> > +		return true;
> >  	else
> > -		return 0;
> > +		return false;
> >  }
> 
> Or maybe:
> 
> static bool sh_eth_is_gether(struct sh_eth_private *mdp)
> {
> 	return mdp->reg_offset == sh_eth_offset_gigabit;
> }

Thanks, will do.

  reply	other threads:[~2014-01-16  1:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15  6:12 [PATCH v5 0/4] Add ethernet support for r7s72100 Simon Horman
2014-01-15  6:12 ` [PATCH v5 net-next 1/4] sh_eth: Use bool as return type of sh_eth_is_gether() Simon Horman
2014-01-15  9:35   ` Joe Perches
2014-01-16  1:15     ` Simon Horman [this message]
2014-01-15  6:12 ` [PATCH v5 net-next 2/4] sh_eth: Add support for r7s72100 Simon Horman
2014-01-15 22:26   ` Sergei Shtylyov
2014-01-16  0:14     ` Simon Horman
2014-01-15  6:12 ` [PATCH v5 3/4] ARM: shmobile: r7s72100: Add clock for r7s72100-ether Simon Horman
2014-01-15  6:12 ` [PATCH v5 4/4] ARM: shmobile: genmai: Enable r7s72100-ether Simon Horman

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=20140116011506.GA18995@verge.net.au \
    --to=horms@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).