Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1616010 > unrolled thread
| Started by | Martin Kepplinger <martink@posteo.de> |
|---|---|
| First post | 2017-04-04 15:10 +0200 |
| Last post | 2017-04-04 19:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] input: touchscreen: sur40: fix bad endianness handling in sur40_poll Martin Kepplinger <martink@posteo.de> - 2017-04-04 15:10 +0200
Re: [PATCH] input: touchscreen: sur40: fix bad endianness handling in sur40_poll Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-04-04 19:10 +0200
| From | Martin Kepplinger <martink@posteo.de> |
|---|---|
| Date | 2017-04-04 15:10 +0200 |
| Subject | [PATCH] input: touchscreen: sur40: fix bad endianness handling in sur40_poll |
| Message-ID | <tswnD-5iQ-9@gated-at.bofh.it> |
sparse says: sur40.c:372:40: warning: restricted __le32 degrades to integer the header's data is __le32 so we need to convert it before comparing. Signed-off-by: Martin Kepplinger <martink@posteo.de> --- drivers/input/touchscreen/sur40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 4c0eeca..128e5bd 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -369,7 +369,7 @@ static void sur40_poll(struct input_polled_dev *polldev) * packet ID will usually increase in the middle of a series * instead of at the end. */ - if (packet_id != header->packet_id) + if (packet_id != le32_to_cpu(header->packet_id)) dev_dbg(sur40->dev, "packet ID mismatch\n"); packet_blobs = result / sizeof(struct sur40_blob); -- 2.1.4
[toc] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-04-04 19:10 +0200 |
| Subject | Re: [PATCH] input: touchscreen: sur40: fix bad endianness handling in sur40_poll |
| Message-ID | <tsA7T-7Nb-15@gated-at.bofh.it> |
| In reply to | #1616010 |
On Tue, Apr 04, 2017 at 03:06:17PM +0200, Martin Kepplinger wrote: > sparse says: > > sur40.c:372:40: warning: restricted __le32 degrades to integer > > the header's data is __le32 so we need to convert it before comparing. > > Signed-off-by: Martin Kepplinger <martink@posteo.de> Applied, thank you. > --- > drivers/input/touchscreen/sur40.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c > index 4c0eeca..128e5bd 100644 > --- a/drivers/input/touchscreen/sur40.c > +++ b/drivers/input/touchscreen/sur40.c > @@ -369,7 +369,7 @@ static void sur40_poll(struct input_polled_dev *polldev) > * packet ID will usually increase in the middle of a series > * instead of at the end. > */ > - if (packet_id != header->packet_id) > + if (packet_id != le32_to_cpu(header->packet_id)) > dev_dbg(sur40->dev, "packet ID mismatch\n"); > > packet_blobs = result / sizeof(struct sur40_blob); > -- > 2.1.4 > -- Dmitry
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web