linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: joseph daniel <josephdanielwalter@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Wolfram Sang <w.sang@pengutronix.de>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging/iio/meter: fix the coding style problem
Date: Mon, 30 Apr 2012 20:32:13 +0200	[thread overview]
Message-ID: <4F9EDAAD.50703@metafoo.de> (raw)
In-Reply-To: <1335810080-30717-1-git-send-email-josephdanielwalter@gmail.com>

On 04/30/2012 08:21 PM, joseph daniel wrote:
> Signed-off-by: joseph daniel <josephdanielwalter@gmail.com>
> ---
>  Please consider this patch, previous one is wrong because my
>  tabspace in vim was 4, instead 8. sorry..
> 
>  drivers/staging/iio/meter/ade7854-i2c.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/meter/ade7854-i2c.c b/drivers/staging/iio/meter/ade7854-i2c.c
> index 1e1faa0..ba97d6e 100644
> --- a/drivers/staging/iio/meter/ade7854-i2c.c
> +++ b/drivers/staging/iio/meter/ade7854-i2c.c
> @@ -195,7 +195,10 @@ static int ade7854_i2c_read_reg_32(struct device *dev,
>  	if (ret)
>  		goto out;
>  
> -	*val = (st->rx[0] << 24) | (st->rx[1] << 16) | (st->rx[2] << 8) | st->rx[3];
> +	*val =  (st->rx[0] << 24) |
> +		(st->rx[1] << 16) |
> +		(st->rx[2] << 8)  |
> +		 st->rx[3];

Nack. In my opinion this doesn't make the code more readable. 80 chars per line
should be though of as a softlimit.

But this looks like something that could use be32_to_cpu though.

>  out:
>  	mutex_unlock(&st->buf_lock);
>  	return ret;

  reply	other threads:[~2012-04-30 18:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 18:21 [PATCH] staging/iio/meter: fix the coding style problem joseph daniel
2012-04-30 18:32 ` Lars-Peter Clausen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-30 19:26 joseph daniel
2012-04-30 20:01 ` Lars-Peter Clausen
2012-05-01  4:08   ` joseph daniel
2012-05-01  7:56   ` Jonathan Cameron
2012-05-01  8:50     ` Lars-Peter Clausen
2012-04-30 20:04 ` Dan Carpenter
2012-04-30 20:18   ` Dan Carpenter
2012-05-01  4:09     ` joseph daniel
2012-04-30 18:12 joseph daniel

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=4F9EDAAD.50703@metafoo.de \
    --to=lars@metafoo.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@cam.ac.uk \
    --cc=josephdanielwalter@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=w.sang@pengutronix.de \
    /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).