diff mbox

[01/11] staging: iio: ad7746: Adjust arguments to match open parenthesis

Message ID 1521642539-4845-2-git-send-email-hernan@vanguardiasur.com.ar (mailing list archive)
State New, archived
Headers show

Commit Message

Hernán Gonzalez March 21, 2018, 2:28 p.m. UTC
Clear two more checkpatch.pl CHECKS.

Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar>
---
 drivers/staging/iio/cdc/ad7746.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jonathan Cameron March 23, 2018, 12:36 p.m. UTC | #1
On Wed, 21 Mar 2018 11:28:49 -0300
Hernán Gonzalez <hernan@vanguardiasur.com.ar> wrote:

> Clear two more checkpatch.pl CHECKS.
> 
> Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar>

Hi Hernán,

Technically the comment below isn't about this patch, but there
seems little point in fixing alignment when the function
called should be changed anyway (requiring the alignment to change
again!)

Otherwise patch looks good.

Thanks,

Jonathan
> ---
>  drivers/staging/iio/cdc/ad7746.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
> index 4882dbc..02e3164 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -463,7 +463,8 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
>  			goto out;
>  		}
>  		ret = i2c_smbus_write_word_data(chip->client,
> -				AD7746_REG_CAP_OFFH, swab16(val));
> +						AD7746_REG_CAP_OFFH,
> +						swab16(val));
Take a look at i2c_smbus_write_word_swapped.

I thought we had long ago gotten rid of all the places this was
being done by hand, but apparently not!

>  		if (ret < 0)
>  			goto out;
>  
> @@ -556,7 +557,8 @@ static int ad7746_read_raw(struct iio_dev *indio_dev,
>  		/* Now read the actual register */
>  
>  		ret = i2c_smbus_read_i2c_block_data(chip->client,
> -			chan->address >> 8, 3, &chip->data.d8[1]);
> +						    chan->address >> 8, 3,
> +						    &chip->data.d8[1]);
>  
>  		if (ret < 0)
>  			goto out;

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index 4882dbc..02e3164 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -463,7 +463,8 @@  static int ad7746_write_raw(struct iio_dev *indio_dev,
 			goto out;
 		}
 		ret = i2c_smbus_write_word_data(chip->client,
-				AD7746_REG_CAP_OFFH, swab16(val));
+						AD7746_REG_CAP_OFFH,
+						swab16(val));
 		if (ret < 0)
 			goto out;
 
@@ -556,7 +557,8 @@  static int ad7746_read_raw(struct iio_dev *indio_dev,
 		/* Now read the actual register */
 
 		ret = i2c_smbus_read_i2c_block_data(chip->client,
-			chan->address >> 8, 3, &chip->data.d8[1]);
+						    chan->address >> 8, 3,
+						    &chip->data.d8[1]);
 
 		if (ret < 0)
 			goto out;