Re: [PATCH v1 1/1] iio: adc: qcom-spmi-adc5: Fix the channel name

From: Andy Shevchenko
Date: Wed Jan 18 2023 - 05:56:57 EST


On Wed, Jan 18, 2023 at 10:29:50AM +0100, Marijn Suijten wrote:
> On 2023-01-18 09:46:14, Andy Shevchenko wrote:
> > On Wed, Jan 18, 2023 at 12:12:04AM +0100, Marijn Suijten wrote:
> > > On 2023-01-17 11:39:44, Andy Shevchenko wrote:

...

> > > > - const char *name = fwnode_get_name(fwnode), *channel_name;
> > > > + const char *name, *channel_name;
> > >
> > > I don't think this'll compile as name is still a pointer to const data,
> > > while you're assigning (a '\0' char) to it below.
> >
> > Right, it's always hard for me to compile things for ARM on x86 :-)
> > Thanks for catching this up!
>
> Thanks for sending this in regardless; as said before I rather break ABI
> and clean the driver up properly (no more extend_name...) than sending a
> fix like this :)

Yes, but we need to backport something and ABI breakage is definitely not
an option for that.

> > But does this fix the issue after compilation fix?
>
> It does, no more @xx in sysfs filenames nor label contents!

Okay, I'm about to send v2 and hopefully you can give your Tested-by.

--
With Best Regards,
Andy Shevchenko