mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: stmmac: use BIT_U32() and GENMASK_U32() for PCS registers
stmmac registers a 32-bit. u32 is unsigned int. The use of BIT() and GENMASK() leads to integer promotion to unsigned long in expressions such as: u32 old = foo; dev_info(dev, "%08x %08x\n", old, old & BIT(1)); resulting in arg2 being accepted as compatible with the format string and arg3 warning that the argument does not match (because the former is unsigned int, and the latter is unsigned long.) Fix this by defining 32-bit register bits using BIT_U32() and GENMASK_U32() macros. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1vevHh-00000002YoM-1TYL@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0391ab577c
commit
a2745a99ca
1 changed files with 15 additions and 15 deletions
Loading…
Add table
Add a link
Reference in a new issue