* [PATCH] iio:adc:stmpe-adc: Cleanup endian type of local variable
@ 2019-10-13 9:15 jic23
2019-10-14 7:50 ` Philippe Schenker
0 siblings, 1 reply; 3+ messages in thread
From: jic23 @ 2019-10-13 9:15 UTC (permalink / raw)
To: linux-iio; +Cc: Jonathan Cameron, Philippe Schenker
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>
---
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;
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio:adc:stmpe-adc: Cleanup endian type of local variable
2019-10-13 9:15 [PATCH] iio:adc:stmpe-adc: Cleanup endian type of local variable jic23
@ 2019-10-14 7:50 ` Philippe Schenker
2019-10-18 18:50 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Schenker @ 2019-10-14 7:50 UTC (permalink / raw)
To: jic23, linux-iio; +Cc: Jonathan.Cameron
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio:adc:stmpe-adc: Cleanup endian type of local variable
2019-10-14 7:50 ` Philippe Schenker
@ 2019-10-18 18:50 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2019-10-18 18:50 UTC (permalink / raw)
To: Philippe Schenker; +Cc: linux-iio, Jonathan.Cameron
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-18 18:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-13 9:15 [PATCH] iio:adc:stmpe-adc: Cleanup endian type of local variable jic23
2019-10-14 7:50 ` Philippe Schenker
2019-10-18 18:50 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).