Re: [PATCH v3 1/6] iio: adc: xilinx-xadc: Modernize driver code
Joshua Crofts <[email protected]> Wed, 29 Jul 2026 16:43:26 +0200
| Newsgroups | org.kernel.vger.linux-iio,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 29 Jul 2026 18:24:50 +0530 Dileep Kumar Nagavarapu <[email protected]> wrote: > Modernize the XADC driver by updating the code to follow current > kernel development practices. > > The changes include: > - Switching to kernel integer types (u16, u32) > - Replacing open-coded bit manipulation with GENMASK(), > and FIELD_GET() helpers > - Using cleanup and guard helpers where appropriate > - Addressing coding style issues reported by checkpatch.pl > - Removing legacy coding patterns and simplifying the code > - Added MAINTAINERS entry for the Xilinx XADC driver > > These updates improve readability, maintainability, and consistency > with modern kernel APIs without changing functionality. > > No functional change intended. > > Co-developed-by: Sai Krishna Potthuri <[email protected]> > Signed-off-by: Sai Krishna Potthuri <[email protected]> > Signed-off-by: Dileep Kumar Nagavarapu <[email protected]> > --- I thought I was reading a cover letter and then I realized that these are all changes in one patch only. Please separate this into multiple patches, I count 6 separate patches. > MAINTAINERS | 7 + > drivers/iio/adc/xilinx-xadc-core.c | 351 ++++++++++++--------------- > drivers/iio/adc/xilinx-xadc-events.c | 53 ++-- > drivers/iio/adc/xilinx-xadc.h | 78 +++--- > 4 files changed, 222 insertions(+), 267 deletions(-) > ... > diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c > index cab66bb8cc1c..b468179736f7 100644 > --- a/drivers/iio/adc/xilinx-xadc-core.c > +++ b/drivers/iio/adc/xilinx-xadc-core.c > @@ -11,6 +11,9 @@ > * - AXI XADC interface: Xilinx PG019 > */ > > +#include <linux/bitfield.h> > +#include <linux/bits.h> > +#include <linux/cleanup.h> Since you're moving the driver to kernel types, include <linux/types.h> as well. Maybe you could do an additional patch that removes the catch-all kernel.h header and adds used/removes unused headers in accordance with the IWYU principle? -- Kind regards, Joshua Crofts