netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dsa: b53: fix big-endian register access
Date: Thu, 16 Jun 2016 10:57:05 -0700	[thread overview]
Message-ID: <5762E871.9030702@gmail.com> (raw)
In-Reply-To: <20160616090017.912604-1-arnd@arndb.de>

On 06/16/2016 02:00 AM, Arnd Bergmann wrote:
> 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>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

  reply	other threads:[~2016-06-16 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  9:00 [PATCH] dsa: b53: fix big-endian register access Arnd Bergmann
2016-06-16 17:57 ` Florian Fainelli [this message]
2016-06-17  0:15 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5762E871.9030702@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).