Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1424551
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dsa: b53: fix big-endian register access |
| Date | 2016-06-17 02:20 +0200 |
| Message-ID | <rKPFT-7pF-3@gated-at.bofh.it> (permalink) |
| References | <rKBjz-66n-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnd Bergmann <arnd@arndb.de> Date: Thu, 16 Jun 2016 11:00:05 +0200 > The b53 dsa register access confusingly uses __raw register accessors > when both the CPU and the device are big-endian, but it uses little- > endian accessors when the same device is used from a little-endian > CPU, which makes no sense. > > This uses normal accessors in device-endianess all the time, which > will work in all four combinations of register and CPU endianess, > and it will have the same barrier semantics in all cases. > > This also seems to take care of a (false positive) warning I'm getting: > > drivers/net/dsa/b53/b53_mmap.c: In function 'b53_mmap_read64': > drivers/net/dsa/b53/b53_mmap.c:109:10: error: 'hi' may be used uninitialized in this function [-Werror=maybe-uninitialized] > *val = ((u64)hi << 32) | lo; > > I originally planned to submit another patch for that warning > and did this one as a preparation cleanup, but it does seem to be > sufficient by itself. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Applied.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] dsa: b53: fix big-endian register access Arnd Bergmann <arnd@arndb.de> - 2016-06-16 11:00 +0200 Re: [PATCH] dsa: b53: fix big-endian register access Florian Fainelli <f.fainelli@gmail.com> - 2016-06-16 20:00 +0200 Re: [PATCH] dsa: b53: fix big-endian register access David Miller <davem@davemloft.net> - 2016-06-17 02:20 +0200
csiph-web