mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Daniel Mack <daniel@caiaq.de>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] w1: coding style cleanups in w1_io.c
Date: Sat, 7 Mar 2009 14:14:03 +0300	[thread overview]
Message-ID: <20090307111403.GA22522@2ka.mipt.ru> (raw)
In-Reply-To: <1236355790-13856-1-git-send-email-daniel@caiaq.de>

On Fri, Mar 06, 2009 at 05:09:50PM +0100, Daniel Mack (daniel@caiaq.de) wrote:
> This fixes a number of coding style issues I stubled over.
> 
> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
> Signed-off-by: Daniel Mack <daniel@caiaq.de>

Looks good, thank you.
Ack. Andrew, please apply.

> ---
>  drivers/w1/w1_io.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c
> index 442bd8b..3ebe972 100644
> --- a/drivers/w1/w1_io.c
> +++ b/drivers/w1/w1_io.c
> @@ -69,7 +69,7 @@ static u8 w1_touch_bit(struct w1_master *dev, int bit)
>  		return w1_read_bit(dev);
>  	else {
>  		w1_write_bit(dev, 0);
> -		return(0);
> +		return 0;
>  	}
>  }
>  
> @@ -184,17 +184,17 @@ static u8 w1_read_bit(struct w1_master *dev)
>   */
>  u8 w1_triplet(struct w1_master *dev, int bdir)
>  {
> -	if ( dev->bus_master->triplet )
> -		return(dev->bus_master->triplet(dev->bus_master->data, bdir));
> +	if (dev->bus_master->triplet)
> +		return dev->bus_master->triplet(dev->bus_master->data, bdir);
>  	else {
>  		u8 id_bit   = w1_touch_bit(dev, 1);
>  		u8 comp_bit = w1_touch_bit(dev, 1);
>  		u8 retval;
>  
> -		if ( id_bit && comp_bit )
> -			return(0x03);  /* error */
> +		if (id_bit && comp_bit)
> +			return 0x03;  /* error */
>  
> -		if ( !id_bit && !comp_bit ) {
> +		if (!id_bit && !comp_bit) {
>  			/* Both bits are valid, take the direction given */
>  			retval = bdir ? 0x04 : 0;
>  		} else {
> @@ -203,11 +203,11 @@ u8 w1_triplet(struct w1_master *dev, int bdir)
>  			retval = id_bit ? 0x05 : 0x02;
>  		}
>  
> -		if ( dev->bus_master->touch_bit )
> +		if (dev->bus_master->touch_bit)
>  			w1_touch_bit(dev, bdir);
>  		else
>  			w1_write_bit(dev, bdir);
> -		return(retval);
> +		return retval;
>  	}
>  }
>  
> -- 
> 1.6.1.3

-- 
	Evgeniy Polyakov

      reply	other threads:[~2009-03-07 11:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 16:09 Daniel Mack
2009-03-07 11:14 ` Evgeniy Polyakov [this message]

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=20090307111403.GA22522@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=akpm@linux-foundation.org \
    --cc=daniel@caiaq.de \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®