Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1680485
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu |
| Date | 2017-07-03 18:40 +0200 |
| Message-ID | <tZcye-40A-31@gated-at.bofh.it> (permalink) |
| References | <tYwIG-7BU-25@gated-at.bofh.it> <tZ9K2-27f-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 3, 2017 at 4:36 PM, Sebastian Reichel <sebastian.reichel@collabora.co.uk> wrote: > On Sat, Jul 01, 2017 at 09:28:10PM +0200, Julia Lawall wrote: > * drivers/gpio/gpio-pca953x.c (line 190-192) It has double conversion there: 1. LE CPU: Read as LE and converted to LE (no-op), so, just u16 2. BE CPU: Read as BE and converted to LE, makes it __le16 Looks like the conversion is not needed, only get_unaligned() is necessary. P.S. What about lines 244-245 there? I think they are no-op. Interesting that those two parts were added in quite different commits. -- With Best Regards, Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] coccinelle: api: detect unnecessary le16_to_cpu Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-01 22:00 +0200
Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 15:40 +0200
Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-03 18:40 +0200
Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 19:20 +0200
Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-03 19:40 +0200
Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 20:30 +0200
Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu Julia Lawall <julia.lawall@lip6.fr> - 2017-07-04 11:20 +0200
Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-04 12:00 +0200
Re: [PATCH] coccinelle: api: detect unnecessary le16_to_cpu Julia Lawall <julia.lawall@lip6.fr> - 2017-07-04 12:00 +0200
csiph-web