Re: [PATCH v5 2/2] iio: light: add AS7343 multi-spectral sensor driver
From: Chang Yu
Date: Sat Oct 10 2026 - 23:12:49 EST
On Thu, Sep 24, 2026 at 09:22:05PM +0300, Andy Shevchenko wrote:
> On Sat, Sep 19, 2026 at 04:51:45PM -0700, Chang Yu wrote:
> > +static int as7343_read_label(struct iio_dev *indio_dev,
> > + struct iio_chan_spec const *chan, char *label)
> > +{
> > + int channel = chan->channel;
>
> Why signed?
> Also split assignment, it will make code more maintainable.
>
I believe this was mentioned in a previous thread. Basically because
iio_chan_spec.channel is an int, so I had to make the local var
signed to keep it consistent. Why iio_chan_spec.channel is an int is
a mystery to me unfortunately.