Re: [PATCH v3 2/2] iio:meter:ade7759: realign the rest with opening bracket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/04/17 05:30, Chen Guanqiao wrote:
> This fixes the coding style issue of using (S_IWUSR | S_IRUGO) in place of
> 4-digit octal numbers with realign the rest with opening bracket.
> 
> Signed-off-by: Chen Guanqiao <chen.chenchacha@xxxxxxxxxxx>
Sorry, nope.  That wasn't what I meant.  The parameters should stay on the
first line, but the later parameters should then be aligned with the first
ones.

e.g.
static IIO_DEV_ATTR_CH_OFF(1, 0644,
			   ade7759_read_8bit,
			   ade7759_write_8bit,
			   ADE7759_CH10S);

or given the multiple line format doesn't really help with readability...
static IIO_DEV_ATTR_CH_OFF(1, 0644, ade7759_read_8bit, ade7759_write_8bit,
			   ADE7759_CH10S);

Key bit is aligning with the opening bracket.

First patch is now applied, so just post the update of this one if you
want to tidy this up.

Thanks,

Jonathan

> ---
>  drivers/staging/iio/meter/ade7759.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/meter/ade7759.c b/drivers/staging/iio/meter/ade7759.c
> index 68405046dae3..9ddfa4ec7da9 100644
> --- a/drivers/staging/iio/meter/ade7759.c
> +++ b/drivers/staging/iio/meter/ade7759.c
> @@ -317,11 +317,15 @@ static IIO_DEV_ATTR_ACTIVE_POWER_GAIN(0644,
>  		ade7759_read_16bit,
>  		ade7759_write_16bit,
>  		ADE7759_APGAIN);
> -static IIO_DEV_ATTR_CH_OFF(1, S_IWUSR | S_IRUGO,
> +static IIO_DEV_ATTR_CH_OFF(
> +		1,
> +		0644,
>  		ade7759_read_8bit,
>  		ade7759_write_8bit,
>  		ADE7759_CH1OS);
> -static IIO_DEV_ATTR_CH_OFF(2, S_IWUSR | S_IRUGO,
> +static IIO_DEV_ATTR_CH_OFF(
> +		2,
> +		0644,
>  		ade7759_read_8bit,
>  		ade7759_write_8bit,
>  		ADE7759_CH2OS);
> 

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux