* [PATCH v2] iio: Avoid multiple line dereference for mask
@ 2022-08-19 18:20 Joe Simmons-Talbott
2022-08-20 12:17 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Joe Simmons-Talbott @ 2022-08-19 18:20 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, linux-iio, linux-kernel
Cc: Joe Simmons-Talbott
Prefer lines > 80 characters over splitting dereferences across multiple
lines. Reported by checkpatch.pl.
Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com>
---
changes in v2:
* Don't use a temporary variable.
drivers/iio/industrialio-core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 67d3d01d2dac..d38623c046cc 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -1303,8 +1303,7 @@ static int iio_device_add_channel_sysfs(struct iio_dev *indio_dev,
ret = iio_device_add_info_mask_type_avail(indio_dev, chan,
IIO_SEPARATE,
- &chan->
- info_mask_separate_available);
+ &chan->info_mask_separate_available);
if (ret < 0)
return ret;
attrcount += ret;
@@ -1318,8 +1317,7 @@ static int iio_device_add_channel_sysfs(struct iio_dev *indio_dev,
ret = iio_device_add_info_mask_type_avail(indio_dev, chan,
IIO_SHARED_BY_TYPE,
- &chan->
- info_mask_shared_by_type_available);
+ &chan->info_mask_shared_by_type_available);
if (ret < 0)
return ret;
attrcount += ret;
--
2.37.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] iio: Avoid multiple line dereference for mask
2022-08-19 18:20 [PATCH v2] iio: Avoid multiple line dereference for mask Joe Simmons-Talbott
@ 2022-08-20 12:17 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2022-08-20 12:17 UTC (permalink / raw)
To: Joe Simmons-Talbott; +Cc: Lars-Peter Clausen, linux-iio, linux-kernel
On Fri, 19 Aug 2022 14:20:12 -0400
Joe Simmons-Talbott <joetalbott@gmail.com> wrote:
> Prefer lines > 80 characters over splitting dereferences across multiple
> lines. Reported by checkpatch.pl.
>
> Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com>
Applied to the togreg branch of iio.git which will get pushed out initially
as testing for all the normal reasons...
Jonathan
> ---
> changes in v2:
> * Don't use a temporary variable.
>
> drivers/iio/industrialio-core.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 67d3d01d2dac..d38623c046cc 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -1303,8 +1303,7 @@ static int iio_device_add_channel_sysfs(struct iio_dev *indio_dev,
>
> ret = iio_device_add_info_mask_type_avail(indio_dev, chan,
> IIO_SEPARATE,
> - &chan->
> - info_mask_separate_available);
> + &chan->info_mask_separate_available);
> if (ret < 0)
> return ret;
> attrcount += ret;
> @@ -1318,8 +1317,7 @@ static int iio_device_add_channel_sysfs(struct iio_dev *indio_dev,
>
> ret = iio_device_add_info_mask_type_avail(indio_dev, chan,
> IIO_SHARED_BY_TYPE,
> - &chan->
> - info_mask_shared_by_type_available);
> + &chan->info_mask_shared_by_type_available);
> if (ret < 0)
> return ret;
> attrcount += ret;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-20 12:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-19 18:20 [PATCH v2] iio: Avoid multiple line dereference for mask Joe Simmons-Talbott
2022-08-20 12:17 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox