Re: [PATCH] iio: adc: ti-ads7138: explicitly include <linux/slab.h>
From: Jonathan Cameron
Date: Tue Apr 28 2026 - 14:15:12 EST
On Mon, 27 Apr 2026 15:29:57 +0400
Giorgi Tchankvetadze <giorgitchankvetadze1997@xxxxxxxxx> wrote:
> On Fri, Apr 24, 2026 at 8:58 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> >
>
> > > Why do we need to have kmalloc() here at all? I don't understand that.
> > Absolutely. Locally it looks like length might be large and therefore
> > the array not suitable to be on the stack, but that's not the case.
> > length == 2 so the array only has 4 elements and can go on the stack.
> >
> > >
> > > > This function is just overly flexible.
> > >
> >
>
> Thanks Jonathan and Andy. I have sent v2.
Whilst you are welcome you've fallen into the process related trap
of being too polite! Better to thank us in the change log of v2
and we all have one less email to check.
Note, pretty much everyone does this when they start working on the
kernel and so get this email once!
Jonathan