Re: [PATCH v2 3/3] iio: frequency: ad9523: fix checkpatch warnings for symbolic permissions
From: Andy Shevchenko
Date: Thu Feb 19 2026 - 15:46:20 EST
On Fri, Feb 20, 2026 at 02:02:15AM +0530, bhargav wrote:
...
> Changes in v2:
> - It was suggested in v1 to convert these to
> IIO_DEVICE_ATTR_RO() and _WO(). However, those helper macros
> expect uniquely named callbacks (e.g. pll1_locked_show),
> whereas this driver uses shared multiplexed callbacks
> (eg. ad9523_show). Converting to the helpers would require
> generating wrapper functions.
> Therefore, this v2 keeps IIO_DEVICE_ATTR but updates the
> permissions to standard octal format.
Okay, but...
> -static IIO_DEVICE_ATTR(pll1_locked, S_IRUGO,
> +static IIO_DEVICE_ATTR(pll1_locked, 0444,
> ad9523_show,
> NULL,
> AD9523_STAT_PLL1_LD);
>
> -static IIO_DEVICE_ATTR(pll2_locked, S_IRUGO,
> +static IIO_DEVICE_ATTR(pll2_locked, 0444,
> ad9523_show,
> NULL,
> AD9523_STAT_PLL2_LD);
>
> -static IIO_DEVICE_ATTR(pll1_reference_clk_a_present, S_IRUGO,
> +static IIO_DEVICE_ATTR(pll1_reference_clk_a_present, 0444,
> ad9523_show,
> NULL,
> AD9523_STAT_REFA);
>
> -static IIO_DEVICE_ATTR(pll1_reference_clk_b_present, S_IRUGO,
> +static IIO_DEVICE_ATTR(pll1_reference_clk_b_present, 0444,
> ad9523_show,
> NULL,
> AD9523_STAT_REFB);
>
> -static IIO_DEVICE_ATTR(pll1_reference_clk_test_present, S_IRUGO,
> +static IIO_DEVICE_ATTR(pll1_reference_clk_test_present, 0444,
> ad9523_show,
> NULL,
> AD9523_STAT_REF_TEST);
...even for the longest line you can update them to be like
static IIO_DEVICE_ATTR(pll1_reference_clk_test_present, 0444, ad9523_show, NULL,
AD9523_STAT_REF_TEST);
Also note, that the indentation is broken for all parameters
that are on the next lines to the IIO_DEVICE_ATTR().
> -static IIO_DEVICE_ATTR(vcxo_clk_present, S_IRUGO,
> +static IIO_DEVICE_ATTR(vcxo_clk_present, 0444,
> ad9523_show,
> NULL,
> AD9523_STAT_VCXO);
>
> -static IIO_DEVICE_ATTR(pll2_feedback_clk_present, S_IRUGO,
> +static IIO_DEVICE_ATTR(pll2_feedback_clk_present, 0444,
> ad9523_show,
> NULL,
> AD9523_STAT_PLL2_FB_CLK);
>
> -static IIO_DEVICE_ATTR(pll2_reference_clk_present, S_IRUGO,
> +static IIO_DEVICE_ATTR(pll2_reference_clk_present, 0444,
> ad9523_show,
> NULL,
> AD9523_STAT_PLL2_REF_CLK);
>
> -static IIO_DEVICE_ATTR(sync_dividers, S_IWUSR,
> +static IIO_DEVICE_ATTR(sync_dividers, 0200,
> NULL,
> ad9523_store,
> AD9523_SYNC);
>
> -static IIO_DEVICE_ATTR(store_eeprom, S_IWUSR,
> +static IIO_DEVICE_ATTR(store_eeprom, 0200,
> NULL,
> ad9523_store,
> AD9523_EEPROM);
--
With Best Regards,
Andy Shevchenko