From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Sparse warning when using ioread64() from include/asm-generic/io.h
Date: Mon, 9 Jan 2023 12:40:54 +0200 [thread overview]
Message-ID: <20230109104054.gabdvjxyawdfbqii@skbuf> (raw)
Hi,
I would like to get rid of the following sparse error in the enetc
driver (for arm64), which uses ioread64().
../drivers/net/ethernet/freescale/enetc/enetc_ethtool.c: note: in included file
(through ../arch/arm64/include/asm/io.h, ../include/linux/io.h,
../include/linux/irq.h, ../include/asm-generic/hardirq.h,
../arch/arm64/include/asm/hardirq.h, ...):
../include/asm-generic/io.h:239:15: warning: cast to restricted __le64
The trouble is I don't understand why the casts to __le64 and use of
__le64_to_cpu() are even needed, when everything seems to be native
endianness. I've seen commit c1d55d50139b ("asm-generic/io.h: Fix sparse
warnings on big-endian architectures"), but that doesn't claim to fix
anything for little endian (and doesn't touch the 64 accessors, for some
reason).
Could you please help?
Thanks,
Vladimir
next reply other threads:[~2023-01-09 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 10:40 Vladimir Oltean [this message]
2023-01-09 11:33 ` Sparse warning when using ioread64() from include/asm-generic/io.h Arnd Bergmann
2023-01-09 11:40 ` Vladimir Oltean
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=20230109104054.gabdvjxyawdfbqii@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@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