linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Greg Ungerer <gerg@linux-m68k.org>
Cc: linux-m68k@vger.kernel.org, kernel test robot <lkp@intel.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: Re: [PATCH 5/5] m68knommu: fix use of cpu_to_le() on IO access
Date: Mon, 15 Jun 2020 18:55:44 +0200	[thread overview]
Message-ID: <20200615165544.pndzr6ne77ns6dyo@ltop.local> (raw)
In-Reply-To: <20200615071636.2598894-1-gerg@linux-m68k.org>

On Mon, Jun 15, 2020 at 05:16:36PM +1000, Greg Ungerer wrote:
> Due to the different data endian requirements of different buses on
> m68knommu variants we sometimes need to byte swap results for readX()
> or values to writeX(). Currently the code uses cpu_to_le to do this,
> resulting in sparse warnings like:
> 
> arch/m68k/include/asm/io_no.h:78:16: sparse: sparse: cast to restricted __le32
> 
> Some casting to force __le32 types would resolve but it looks to be
> simpler to just switch to using the underlying swab32() to resolve.

Yes indeed, since the raw accessors are supposed to be native-endian, doing:
	native -> force cast to le32 -> le32_to_cpu() 
doesn't seem to have any advantages over the swab32().

Feel free to add my:
Reviewed-y: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

-- Luc

      reply	other threads:[~2020-06-15 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15  7:16 [PATCH 5/5] m68knommu: fix use of cpu_to_le() on IO access Greg Ungerer
2020-06-15 16:55 ` Luc Van Oostenryck [this message]

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=20200615165544.pndzr6ne77ns6dyo@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=gerg@linux-m68k.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mkl@pengutronix.de \
    /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).