From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755259AbcFPR5K (ORCPT ); Thu, 16 Jun 2016 13:57:10 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34694 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755163AbcFPR5I (ORCPT ); Thu, 16 Jun 2016 13:57:08 -0400 Subject: Re: [PATCH] dsa: b53: fix big-endian register access To: Arnd Bergmann References: <20160616090017.912604-1-arnd@arndb.de> Cc: "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Florian Fainelli Message-ID: <5762E871.9030702@gmail.com> Date: Thu, 16 Jun 2016 10:57:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160616090017.912604-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Florian Fainelli -- Florian