* Fix permissions warning from check-patch for tsl2x7x @ 2017-04-28 23:03 Quentin Swain 2017-04-28 23:03 ` [PATCH] Fix check-patch symbolic permissions warnings Quentin Swain 0 siblings, 1 reply; 6+ messages in thread From: Quentin Swain @ 2017-04-28 23:03 UTC (permalink / raw) To: jic23; +Cc: linux-iio, devel Fix up complaints from check-patch regarding preference for octal permissions over symbolic permissions ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Fix check-patch symbolic permissions warnings 2017-04-28 23:03 Fix permissions warning from check-patch for tsl2x7x Quentin Swain @ 2017-04-28 23:03 ` Quentin Swain 2017-04-30 16:22 ` Jonathan Cameron 0 siblings, 1 reply; 6+ messages in thread From: Quentin Swain @ 2017-04-28 23:03 UTC (permalink / raw) To: jic23; +Cc: linux-iio, devel, Quentin Swain --- drivers/staging/iio/light/tsl2x7x_core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index af3910b..c63fe6a 100644 --- a/drivers/staging/iio/light/tsl2x7x_core.c +++ b/drivers/staging/iio/light/tsl2x7x_core.c @@ -1498,34 +1498,34 @@ static int tsl2x7x_write_raw(struct iio_dev *indio_dev, return 0; } -static DEVICE_ATTR(power_state, S_IRUGO | S_IWUSR, +static DEVICE_ATTR(power_state, 0644, tsl2x7x_power_state_show, tsl2x7x_power_state_store); -static DEVICE_ATTR(in_proximity0_calibscale_available, S_IRUGO, +static DEVICE_ATTR(in_proximity0_calibscale_available, 0444, tsl2x7x_prox_gain_available_show, NULL); -static DEVICE_ATTR(in_illuminance0_calibscale_available, S_IRUGO, +static DEVICE_ATTR(in_illuminance0_calibscale_available, 0444, tsl2x7x_gain_available_show, NULL); -static DEVICE_ATTR(in_illuminance0_integration_time, S_IRUGO | S_IWUSR, +static DEVICE_ATTR(in_illuminance0_integration_time, 0644, tsl2x7x_als_time_show, tsl2x7x_als_time_store); -static DEVICE_ATTR(in_illuminance0_target_input, S_IRUGO | S_IWUSR, +static DEVICE_ATTR(in_illuminance0_target_input, 0644, tsl2x7x_als_cal_target_show, tsl2x7x_als_cal_target_store); -static DEVICE_ATTR(in_illuminance0_calibrate, S_IWUSR, NULL, +static DEVICE_ATTR(in_illuminance0_calibrate, 0200, NULL, tsl2x7x_do_calibrate); -static DEVICE_ATTR(in_proximity0_calibrate, S_IWUSR, NULL, +static DEVICE_ATTR(in_proximity0_calibrate, 0200, NULL, tsl2x7x_do_prox_calibrate); -static DEVICE_ATTR(in_illuminance0_lux_table, S_IRUGO | S_IWUSR, +static DEVICE_ATTR(in_illuminance0_lux_table, 0644, tsl2x7x_luxtable_show, tsl2x7x_luxtable_store); -static DEVICE_ATTR(in_intensity0_thresh_period, S_IRUGO | S_IWUSR, +static DEVICE_ATTR(in_intensity0_thresh_period, 0644, tsl2x7x_als_persistence_show, tsl2x7x_als_persistence_store); -static DEVICE_ATTR(in_proximity0_thresh_period, S_IRUGO | S_IWUSR, +static DEVICE_ATTR(in_proximity0_thresh_period, 0644, tsl2x7x_prox_persistence_show, tsl2x7x_prox_persistence_store); /* Use the default register values to identify the Taos device */ -- 2.10.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix check-patch symbolic permissions warnings 2017-04-28 23:03 ` [PATCH] Fix check-patch symbolic permissions warnings Quentin Swain @ 2017-04-30 16:22 ` Jonathan Cameron 2017-04-30 16:23 ` Jonathan Cameron 0 siblings, 1 reply; 6+ messages in thread From: Jonathan Cameron @ 2017-04-30 16:22 UTC (permalink / raw) To: Quentin Swain; +Cc: linux-iio On 29/04/17 00:03, Quentin Swain wrote: A short description of why would have been good. Anyhow, applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > drivers/staging/iio/light/tsl2x7x_core.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c > index af3910b..c63fe6a 100644 > --- a/drivers/staging/iio/light/tsl2x7x_core.c > +++ b/drivers/staging/iio/light/tsl2x7x_core.c > @@ -1498,34 +1498,34 @@ static int tsl2x7x_write_raw(struct iio_dev *indio_dev, > return 0; > } > > -static DEVICE_ATTR(power_state, S_IRUGO | S_IWUSR, > +static DEVICE_ATTR(power_state, 0644, > tsl2x7x_power_state_show, tsl2x7x_power_state_store); > > -static DEVICE_ATTR(in_proximity0_calibscale_available, S_IRUGO, > +static DEVICE_ATTR(in_proximity0_calibscale_available, 0444, > tsl2x7x_prox_gain_available_show, NULL); > > -static DEVICE_ATTR(in_illuminance0_calibscale_available, S_IRUGO, > +static DEVICE_ATTR(in_illuminance0_calibscale_available, 0444, > tsl2x7x_gain_available_show, NULL); > > -static DEVICE_ATTR(in_illuminance0_integration_time, S_IRUGO | S_IWUSR, > +static DEVICE_ATTR(in_illuminance0_integration_time, 0644, > tsl2x7x_als_time_show, tsl2x7x_als_time_store); > > -static DEVICE_ATTR(in_illuminance0_target_input, S_IRUGO | S_IWUSR, > +static DEVICE_ATTR(in_illuminance0_target_input, 0644, > tsl2x7x_als_cal_target_show, tsl2x7x_als_cal_target_store); > > -static DEVICE_ATTR(in_illuminance0_calibrate, S_IWUSR, NULL, > +static DEVICE_ATTR(in_illuminance0_calibrate, 0200, NULL, > tsl2x7x_do_calibrate); > > -static DEVICE_ATTR(in_proximity0_calibrate, S_IWUSR, NULL, > +static DEVICE_ATTR(in_proximity0_calibrate, 0200, NULL, > tsl2x7x_do_prox_calibrate); > > -static DEVICE_ATTR(in_illuminance0_lux_table, S_IRUGO | S_IWUSR, > +static DEVICE_ATTR(in_illuminance0_lux_table, 0644, > tsl2x7x_luxtable_show, tsl2x7x_luxtable_store); > > -static DEVICE_ATTR(in_intensity0_thresh_period, S_IRUGO | S_IWUSR, > +static DEVICE_ATTR(in_intensity0_thresh_period, 0644, > tsl2x7x_als_persistence_show, tsl2x7x_als_persistence_store); > > -static DEVICE_ATTR(in_proximity0_thresh_period, S_IRUGO | S_IWUSR, > +static DEVICE_ATTR(in_proximity0_thresh_period, 0644, > tsl2x7x_prox_persistence_show, tsl2x7x_prox_persistence_store); > > /* Use the default register values to identify the Taos device */ > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix check-patch symbolic permissions warnings 2017-04-30 16:22 ` Jonathan Cameron @ 2017-04-30 16:23 ` Jonathan Cameron 0 siblings, 0 replies; 6+ messages in thread From: Jonathan Cameron @ 2017-04-30 16:23 UTC (permalink / raw) To: Quentin Swain; +Cc: linux-iio On 30/04/17 17:22, Jonathan Cameron wrote: > On 29/04/17 00:03, Quentin Swain wrote: > A short description of why would have been good. > > Anyhow, applied to the togreg branch of iio.git and pushed out as testing > for the autobuilders to play with it. oops. I didn't check my git output. A similar patch has already been applied. Sorry about that! Jonathan > > Thanks, > > Jonathan >> --- >> drivers/staging/iio/light/tsl2x7x_core.c | 20 ++++++++++---------- >> 1 file changed, 10 insertions(+), 10 deletions(-) >> >> diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c >> index af3910b..c63fe6a 100644 >> --- a/drivers/staging/iio/light/tsl2x7x_core.c >> +++ b/drivers/staging/iio/light/tsl2x7x_core.c >> @@ -1498,34 +1498,34 @@ static int tsl2x7x_write_raw(struct iio_dev *indio_dev, >> return 0; >> } >> >> -static DEVICE_ATTR(power_state, S_IRUGO | S_IWUSR, >> +static DEVICE_ATTR(power_state, 0644, >> tsl2x7x_power_state_show, tsl2x7x_power_state_store); >> >> -static DEVICE_ATTR(in_proximity0_calibscale_available, S_IRUGO, >> +static DEVICE_ATTR(in_proximity0_calibscale_available, 0444, >> tsl2x7x_prox_gain_available_show, NULL); >> >> -static DEVICE_ATTR(in_illuminance0_calibscale_available, S_IRUGO, >> +static DEVICE_ATTR(in_illuminance0_calibscale_available, 0444, >> tsl2x7x_gain_available_show, NULL); >> >> -static DEVICE_ATTR(in_illuminance0_integration_time, S_IRUGO | S_IWUSR, >> +static DEVICE_ATTR(in_illuminance0_integration_time, 0644, >> tsl2x7x_als_time_show, tsl2x7x_als_time_store); >> >> -static DEVICE_ATTR(in_illuminance0_target_input, S_IRUGO | S_IWUSR, >> +static DEVICE_ATTR(in_illuminance0_target_input, 0644, >> tsl2x7x_als_cal_target_show, tsl2x7x_als_cal_target_store); >> >> -static DEVICE_ATTR(in_illuminance0_calibrate, S_IWUSR, NULL, >> +static DEVICE_ATTR(in_illuminance0_calibrate, 0200, NULL, >> tsl2x7x_do_calibrate); >> >> -static DEVICE_ATTR(in_proximity0_calibrate, S_IWUSR, NULL, >> +static DEVICE_ATTR(in_proximity0_calibrate, 0200, NULL, >> tsl2x7x_do_prox_calibrate); >> >> -static DEVICE_ATTR(in_illuminance0_lux_table, S_IRUGO | S_IWUSR, >> +static DEVICE_ATTR(in_illuminance0_lux_table, 0644, >> tsl2x7x_luxtable_show, tsl2x7x_luxtable_store); >> >> -static DEVICE_ATTR(in_intensity0_thresh_period, S_IRUGO | S_IWUSR, >> +static DEVICE_ATTR(in_intensity0_thresh_period, 0644, >> tsl2x7x_als_persistence_show, tsl2x7x_als_persistence_store); >> >> -static DEVICE_ATTR(in_proximity0_thresh_period, S_IRUGO | S_IWUSR, >> +static DEVICE_ATTR(in_proximity0_thresh_period, 0644, >> tsl2x7x_prox_persistence_show, tsl2x7x_prox_persistence_store); >> >> /* Use the default register values to identify the Taos device */ >> > > -- > 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 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Fix permissions warning from check-patch for tsl2x7x @ 2017-04-30 23:16 Quentin Swain 2017-05-01 0:01 ` Jonathan Cameron 0 siblings, 1 reply; 6+ messages in thread From: Quentin Swain @ 2017-04-30 23:16 UTC (permalink / raw) To: jic23; +Cc: linux-iio, devel, apw, joe Replace the use of symbolic permissions macros, S_IRUGO and S_IWUSR, with octal permissons to resolve errors reported by checkpatch.pl. checkpatch.pl still reports errors for use of decimal permissions in a handful of cases where the macros were replaced with the octal in ad9834 and ade7753. It seemed like those reports may be false positives since this happens for a fraction of the changes that were made in those files. Thanks, Quentin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix permissions warning from check-patch for tsl2x7x 2017-04-30 23:16 Fix permissions warning from check-patch for tsl2x7x Quentin Swain @ 2017-05-01 0:01 ` Jonathan Cameron 0 siblings, 0 replies; 6+ messages in thread From: Jonathan Cameron @ 2017-05-01 0:01 UTC (permalink / raw) To: Quentin Swain; +Cc: linux-iio, devel, apw, joe On 01/05/17 00:16, Quentin Swain wrote: > Replace the use of symbolic permissions macros, S_IRUGO and S_IWUSR, > with octal permissons to resolve errors reported by checkpatch.pl. > checkpatch.pl still reports errors for use of decimal permissions in a > handful of cases where the macros were replaced with the octal in > ad9834 and ade7753. It seemed like those reports may be false positives > since this happens for a fraction of the changes that were made in those > files. > This cover letter should have had a better title! Doesn't matter when it comes to the patches of course, but it briefly confused me ;) Jonathan > Thanks, > Quentin > > -- > 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 > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-01 0:01 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-04-28 23:03 Fix permissions warning from check-patch for tsl2x7x Quentin Swain 2017-04-28 23:03 ` [PATCH] Fix check-patch symbolic permissions warnings Quentin Swain 2017-04-30 16:22 ` Jonathan Cameron 2017-04-30 16:23 ` Jonathan Cameron -- strict thread matches above, loose matches on Subject: below -- 2017-04-30 23:16 Fix permissions warning from check-patch for tsl2x7x Quentin Swain 2017-05-01 0:01 ` Jonathan Cameron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox