Message ID | 20191013091541.1382009-1-jic23@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iio:adc:stmpe-adc: Cleanup endian type of local variable | expand |
On Sun, 2019-10-13 at 10:15 +0100, jic23@kernel.org wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Nothing stops data being of type __be16, which fixes the warning: > > CHECK drivers/iio/adc/stmpe-adc.c > drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 > drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 > drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 > drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Cc: Philippe Schenker <philippe.schenker@toradex.com> Thanks for fixing that. Reviewed-by: <philippe.schenker@toradex.com> > --- > drivers/iio/adc/stmpe-adc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c > index bd72727fc417..0f88048ea48f 100644 > --- a/drivers/iio/adc/stmpe-adc.c > +++ b/drivers/iio/adc/stmpe-adc.c > @@ -175,7 +175,7 @@ static int stmpe_read_raw(struct iio_dev > *indio_dev, > static irqreturn_t stmpe_adc_isr(int irq, void *dev_id) > { > struct stmpe_adc *info = (struct stmpe_adc *)dev_id; > - u16 data; > + __be16 data; > > if (info->channel <= STMPE_ADC_LAST_NR) { > int int_sta;
On Mon, 14 Oct 2019 07:50:33 +0000 Philippe Schenker <philippe.schenker@toradex.com> wrote: > On Sun, 2019-10-13 at 10:15 +0100, jic23@kernel.org wrote: > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > Nothing stops data being of type __be16, which fixes the warning: > > > > CHECK drivers/iio/adc/stmpe-adc.c > > drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 > > drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 > > drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 > > drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 > > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Cc: Philippe Schenker <philippe.schenker@toradex.com> > > Thanks for fixing that. > > Reviewed-by: <philippe.schenker@toradex.com> Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > > > --- > > drivers/iio/adc/stmpe-adc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c > > index bd72727fc417..0f88048ea48f 100644 > > --- a/drivers/iio/adc/stmpe-adc.c > > +++ b/drivers/iio/adc/stmpe-adc.c > > @@ -175,7 +175,7 @@ static int stmpe_read_raw(struct iio_dev > > *indio_dev, > > static irqreturn_t stmpe_adc_isr(int irq, void *dev_id) > > { > > struct stmpe_adc *info = (struct stmpe_adc *)dev_id; > > - u16 data; > > + __be16 data; > > > > if (info->channel <= STMPE_ADC_LAST_NR) { > > int int_sta;
diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c index bd72727fc417..0f88048ea48f 100644 --- a/drivers/iio/adc/stmpe-adc.c +++ b/drivers/iio/adc/stmpe-adc.c @@ -175,7 +175,7 @@ static int stmpe_read_raw(struct iio_dev *indio_dev, static irqreturn_t stmpe_adc_isr(int irq, void *dev_id) { struct stmpe_adc *info = (struct stmpe_adc *)dev_id; - u16 data; + __be16 data; if (info->channel <= STMPE_ADC_LAST_NR) { int int_sta;