All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: adc: mcp3422: cosmetic fixes
Date: Sat, 1 Jul 2017 11:12:16 +0100	[thread overview]
Message-ID: <20170701111216.25943e98@kernel.org> (raw)
In-Reply-To: <1498687088-28529-3-git-send-email-angelo.compagnucci@gmail.com>

On Wed, 28 Jun 2017 23:53:11 +0200
Angelo Compagnucci <angelo.compagnucci@gmail.com> wrote:

> This patch fixes some cosmetics in source code, it uniforms
> tabs after carriage return on methods and fixes formatting.
> 
> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
It's not a hard and fast rule, but, where possible, parameters
should be aligned after the opening bracket.  A few of these
already did this. It would be nice to make the others follow
that convention as well.

Thanks,

Jonathan
> ---
>  drivers/iio/adc/mcp3422.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c
> index 63de705..866d02f 100644
> --- a/drivers/iio/adc/mcp3422.c
> +++ b/drivers/iio/adc/mcp3422.c
> @@ -135,7 +135,7 @@ static int mcp3422_read(struct mcp3422 *adc, int *value, u8 *config)
>  }
>  
>  static int mcp3422_read_channel(struct mcp3422 *adc,
> -				struct iio_chan_spec const *channel, int *value)
> +		struct iio_chan_spec const *channel, int *value)
>  {
>  	int ret;
>  	u8 config;
> @@ -157,14 +157,14 @@ static int mcp3422_read_channel(struct mcp3422 *adc,
>  }
>  
>  static int mcp3422_read_raw(struct iio_dev *iio,
> -			struct iio_chan_spec const *channel, int *val1,
> -			int *val2, long mask)
> +		struct iio_chan_spec const *channel, int *val1,
> +		int *val2, long mask)
>  {
>  	struct mcp3422 *adc = iio_priv(iio);
>  	int err;
>  
>  	u8 sample_rate = MCP3422_SAMPLE_RATE(adc->config);
> -	u8 pga		 = MCP3422_PGA(adc->config);
> +	u8 pga = MCP3422_PGA(adc->config);
>  
>  	switch (mask) {
>  	case IIO_CHAN_INFO_RAW:
> @@ -174,7 +174,6 @@ static int mcp3422_read_raw(struct iio_dev *iio,
>  		return IIO_VAL_INT;
>  
>  	case IIO_CHAN_INFO_SCALE:
> -
>  		*val1 = 0;
>  		*val2 = mcp3422_scales[sample_rate][pga];
>  		return IIO_VAL_INT_PLUS_NANO;
> @@ -191,8 +190,8 @@ static int mcp3422_read_raw(struct iio_dev *iio,
>  }
>  
>  static int mcp3422_write_raw(struct iio_dev *iio,
> -			struct iio_chan_spec const *channel, int val1,
> -			int val2, long mask)
> +		struct iio_chan_spec const *channel, int val1,
> +		int val2, long mask)
>  {
>  	struct mcp3422 *adc = iio_priv(iio);
>  	u8 temp;
> @@ -331,7 +330,7 @@ static const struct iio_info mcp3422_info = {
>  };
>  
>  static int mcp3422_probe(struct i2c_client *client,
> -			 const struct i2c_device_id *id)
> +		const struct i2c_device_id *id)
>  {
>  	struct iio_dev *indio_dev;
>  	struct mcp3422 *adc;


  reply	other threads:[~2017-07-01 10:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 21:53 [PATCH 1/3] iio: adc: mcp3422: Changing initial channel Angelo Compagnucci
2017-06-28 21:53 ` [PATCH 2/3] iio: adc: mcp3422: Checking for error on probe Angelo Compagnucci
2017-07-01 10:07   ` Jonathan Cameron
2017-07-03  8:42     ` Maarten Brock
2017-07-03 11:10       ` jic23
2017-07-03 12:01         ` Maarten Brock
2017-07-03 12:11           ` Mike Looijmans
2017-07-03 12:25           ` jic23
2017-07-03 21:04             ` Angelo Compagnucci
2017-07-04 19:57               ` Jonathan Cameron
2017-06-28 21:53 ` [PATCH 3/3] iio: adc: mcp3422: cosmetic fixes Angelo Compagnucci
2017-07-01 10:12   ` Jonathan Cameron [this message]
2017-07-01 10:06 ` [PATCH 1/3] iio: adc: mcp3422: Changing initial channel Jonathan Cameron

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=20170701111216.25943e98@kernel.org \
    --to=jic23@kernel.org \
    --cc=angelo.compagnucci@gmail.com \
    --cc=linux-iio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.