Re: [PATCH] iio: humidity: htu21: Fix SYMBOLIC_PERMS chekcpatch warning
From: Andy Shevchenko
Date: Sat Aug 08 2026 - 16:57:16 EST
On Sun, Aug 02, 2026 at 09:23:26AM +0800, Adi Nata wrote:
> Checkpatch warning:
>
> WARNING:SYMBOLIC_PERMS: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> +static IIO_DEVICE_ATTR(battery_low, S_IRUGO,
>
> WARNING:SYMBOLIC_PERMS: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
> +static IIO_DEVICE_ATTR(heater_enable, S_IRUGO | S_IWUSR,
> static IIO_CONST_ATTR_SAMP_FREQ_AVAIL(htu21_show_samp_freq);
> -static IIO_DEVICE_ATTR(battery_low, S_IRUGO,
> +static IIO_DEVICE_ATTR(battery_low, 0444,
> htu21_show_battery_low, NULL, 0);
> -static IIO_DEVICE_ATTR(heater_enable, S_IRUGO | S_IWUSR,
> +static IIO_DEVICE_ATTR(heater_enable, 0644,
> htu21_show_heater, htu21_write_heater, 0);
What's wrong with IIO_DEVICE_ATTR_RW()?
Same comment to all patches of a kind from you.
--
With Best Regards,
Andy Shevchenko