Re: [Linaro-acpi] [PATCH] [v2] watchdog: introduce the ARM64 SBSA watchdog driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux