public inbox for linux-watchdog@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linaro-acpi@lists.linaro.org
Cc: Timur Tabi <timur@codeaurora.org>,
	linux-watchdog@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>,
	Guenter Roeck <linux@roeck-us.net>,
	Vipul Gandhi <vgandhi@codeaurora.org>
Subject: Re: [Linaro-acpi] [PATCH] [v2] watchdog: introduce the ARM64 SBSA watchdog driver
Date: Fri, 15 May 2015 15:20:02 +0200	[thread overview]
Message-ID: <3313221.o1XjNEFgtv@wuerfel> (raw)
In-Reply-To: <5555E310.7040009@codeaurora.org>

On Friday 15 May 2015 07:14:08 Timur Tabi wrote:
> Arnd Bergmann wrote:
> > Then please remove the double-swap. If the device works like any other
> > device in the system, then the byteswap that is implied by readl/writel
> > will do the right thing, and swapping twice will break big-endian
> > kernels.
> 
> Should I still keep the __le32 in the structs?

Not sure about that. Most people use offsets with a void * pointer,
so they would not care.

Do you get a sparse warning if you either leave the __le32, or if you
turn it into u32? The correct behavior is probably to leave __le32
here, and ensure that readl() produces a sparse warning when fed with
a pointer to u32, but not void* or __le32*. It would need some
experimenting to find if that catches real bugs or just starts warning
about correct code and not about incorrect code.

FWIW, the drivers you cited that use le32_to_cpu(readl(p)) are probably
all wrong, and it would be nice to have a sparse warning for that.

	Arnd

  reply	other threads:[~2015-05-15 13:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 16:52 [PATCH] [v2] watchdog: introduce the ARM64 SBSA watchdog driver Timur Tabi
2015-05-14 20:03 ` Arnd Bergmann
2015-05-14 20:15   ` Timur Tabi
2015-05-14 20:45     ` Guenter Roeck
2015-05-14 21:03       ` Timur Tabi
2015-05-14 23:41         ` Guenter Roeck
2015-05-14 23:49           ` Timur Tabi
2015-05-15  9:16             ` Arnd Bergmann
2015-05-15 12:14               ` Timur Tabi
2015-05-15 13:20                 ` Arnd Bergmann [this message]
2015-05-15 16:21                   ` [Linaro-acpi] " Timur Tabi
2015-05-15 18:57                     ` Arnd Bergmann

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=3313221.o1XjNEFgtv@wuerfel \
    --to=arnd@arndb.de \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=timur@codeaurora.org \
    --cc=vgandhi@codeaurora.org \
    --cc=wim@iguana.be \
    /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