Re: [PATCH] staging: iio: frequency: rename macros

Tudor Gheorghiu
2024-10-07T15:46:09Z

On Sun, Oct 06, 2024 at 12:27:12PM +0100, Jonathan Cameron wrote:

>
> Hmm. If you really want to clean this up, then these macros shouldn't
> exist at all. They are legacy of ancient IIO code style and some slightly
> ropey code even then (which is why it's in staging!)
>
> Right option is to use the read_raw callbacks in conjunction with the
> info_mask_* bitmaps that indicate which attributes the IIO core should create.
> There are some corners in here such as PHASESYMBOL for which we've
> never fixed on an ABI and that might need custom attributes, but even
> then these macros probably wouldn't be involved.
>

Hi Jonathan!
Thank you so much for your input!

I understand, so this is not as simple as just renaming the macros,
there is actually a lot more to modify in order to make this driver up
to date with modern standards. I will leave this for the original driver
developers.

> So I'd don't mind 'fixing' checkpatch or the code, but I'd
> rather we fixed the drivers up properly.

As for this, it is somewhat unrelated to the actual driver (I didn't
even consider this initially). That is why I submitted a different patch:

https://lore.kernel.org/all/20241002133418.7924-2-tudor.reda@gmail.com/

Thanks again,
Tudor