Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1738071 > unrolled thread

[PATCH 1/2] iio: accel: mma8452: Fix code style warning

Started byHarinath Nampally <harinath922@gmail.com>
First post2017-09-23 23:00 +0200
Last post2017-09-24 15:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/2] iio: accel: mma8452: Fix code style warning  Harinath Nampally <harinath922@gmail.com> - 2017-09-23 23:00 +0200
    Re: [PATCH 1/2] iio: accel: mma8452: Fix code style warning Jonathan Cameron <jic23@kernel.org> - 2017-09-24 15:20 +0200

#1738071 — [PATCH 1/2] iio: accel: mma8452: Fix code style warning

FromHarinath Nampally <harinath922@gmail.com>
Date2017-09-23 23:00 +0200
Subject[PATCH 1/2] iio: accel: mma8452: Fix code style warning
Message-ID<usZGN-7Ze-1@gated-at.bofh.it>
Replace symbolic permissions with octal permissions
to improve code readability.

Issue found by checkpatch.

Signed-off-by: Harinath Nampally <harinath922@gmail.com>
---
 drivers/iio/accel/mma8452.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index c352555..4a33a26 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -418,11 +418,11 @@ static ssize_t mma8452_show_os_ratio_avail(struct device *dev,
 }
 
 static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(mma8452_show_samp_freq_avail);
-static IIO_DEVICE_ATTR(in_accel_scale_available, S_IRUGO,
+static IIO_DEVICE_ATTR(in_accel_scale_available, 0444,
 		       mma8452_show_scale_avail, NULL, 0);
 static IIO_DEVICE_ATTR(in_accel_filter_high_pass_3db_frequency_available,
-		       S_IRUGO, mma8452_show_hp_cutoff_avail, NULL, 0);
-static IIO_DEVICE_ATTR(in_accel_oversampling_ratio_available, S_IRUGO,
+		       0444, mma8452_show_hp_cutoff_avail, NULL, 0);
+static IIO_DEVICE_ATTR(in_accel_oversampling_ratio_available, 0444,
 		       mma8452_show_os_ratio_avail, NULL, 0);
 
 static int mma8452_get_samp_freq_index(struct mma8452_data *data,
-- 
2.7.4

[toc] | [next] | [standalone]


#1738184

FromJonathan Cameron <jic23@kernel.org>
Date2017-09-24 15:20 +0200
Message-ID<uteZc-JV-5@gated-at.bofh.it>
In reply to#1738071
On Sat, 23 Sep 2017 16:56:29 -0400
Harinath Nampally <harinath922@gmail.com> wrote:

> Replace symbolic permissions with octal permissions
> to improve code readability.
> 
> Issue found by checkpatch.
> 
> Signed-off-by: Harinath Nampally <harinath922@gmail.com>

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/accel/mma8452.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> index c352555..4a33a26 100644
> --- a/drivers/iio/accel/mma8452.c
> +++ b/drivers/iio/accel/mma8452.c
> @@ -418,11 +418,11 @@ static ssize_t mma8452_show_os_ratio_avail(struct device *dev,
>  }
>  
>  static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(mma8452_show_samp_freq_avail);
> -static IIO_DEVICE_ATTR(in_accel_scale_available, S_IRUGO,
> +static IIO_DEVICE_ATTR(in_accel_scale_available, 0444,
>  		       mma8452_show_scale_avail, NULL, 0);
>  static IIO_DEVICE_ATTR(in_accel_filter_high_pass_3db_frequency_available,
> -		       S_IRUGO, mma8452_show_hp_cutoff_avail, NULL, 0);
> -static IIO_DEVICE_ATTR(in_accel_oversampling_ratio_available, S_IRUGO,
> +		       0444, mma8452_show_hp_cutoff_avail, NULL, 0);
> +static IIO_DEVICE_ATTR(in_accel_oversampling_ratio_available, 0444,
>  		       mma8452_show_os_ratio_avail, NULL, 0);
>  
>  static int mma8452_get_samp_freq_index(struct mma8452_data *data,

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web