mbox series

[00/13] hwmon: Introduce SENSOR_DEVICE_ATTR_{RO, RW, WO} and variants

Message ID 1544124153-23961-1-git-send-email-linux@roeck-us.net (mailing list archive)
Headers show
Series hwmon: Introduce SENSOR_DEVICE_ATTR_{RO, RW, WO} and variants | expand

Message

Guenter Roeck Dec. 6, 2018, 7:22 p.m. UTC
Introduce SENSOR_DEVICE_ATTR_{RO,RW,WO} and SENSOR_DEVICE_ATTR_2_{RO,RW,WO}
as simplified variants of SENSOR_DEVICE_ATTR and SENSOR_DEVICE_ATTR_2 to
simplify the source code, improve readbility, and reduce the chance of
inconsistencies.

This series introduces the new macros and converts some of the drivers.
The first patch was first submitted almost two years ago and has since
been dormant. It is unchanged from the first submission.

The driver conversion was done with the Coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

This series targets v4.21 (v5.0). More conversions will follow with
subsequent kernel releases.

Comments

Joe Perches Dec. 6, 2018, 7:48 p.m. UTC | #1
On Thu, 2018-12-06 at 11:22 -0800, Guenter Roeck wrote:
> Introduce SENSOR_DEVICE_ATTR_{RO,RW,WO} and SENSOR_DEVICE_ATTR_2_{RO,RW,WO}
> as simplified variants of SENSOR_DEVICE_ATTR and SENSOR_DEVICE_ATTR_2 to
> simplify the source code, improve readbility, and reduce the chance of
> inconsistencies.
> 
> This series introduces the new macros and converts some of the drivers.

Thanks,  eliminating the S_<PERMS> uses would be nice and
more consistent with the other DEVICE_ATTR_{RO,RW,WO} uses.