]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mod_devicetable: fix PHY module format
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 19 Dec 2019 23:24:47 +0000 (23:24 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:03:08 +0000 (19:03 +0100)
commit789982d12d66c8acc7b7f84b578b79d197682ae7
tree4e185a36b94a8be613e76d24c41f0511bff7141e
parentdea7e0f877379272e3dc1b274ff47a844fb0b29e
mod_devicetable: fix PHY module format

commit d2ed49cf6c13e379c5819aa5ac20e1f9674ebc89 upstream.

When a PHY is probed, if the top bit is set, we end up requesting a
module with the string "mdio:-10101110000000100101000101010001" -
the top bit is printed to a signed -1 value. This leads to the module
not being loaded.

Fix the module format string and the macro generating the values for
it to ensure that we only print unsigned types and the top bit is
always 0/1. We correctly end up with
"mdio:10101110000000100101000101010001".

Fixes: 8626d3b43280 ("phylib: Support phy module autoloading")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
include/linux/mod_devicetable.h