Skip to content

Commit a1904fa

Browse files
mripardffainelli
authored andcommitted
firmware: raspberrypi: Fix type assignment
We silently cast an unsigned int into a __le32 which makes sparse complain. Moreover, we never actually convert endianness between the CPU's and the expected little-endian value. Fix both at once by calling cpu_to_le32(). Fixes: 40c3195 ("firmware: raspberrypi: Provide a helper to query a clock max rate") Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Florian Fainelli <[email protected]>
1 parent 1b929c0 commit a1904fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/soc/bcm2835/raspberrypi-firmware.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ struct rpi_firmware_clk_rate_request {
170170

171171
#define RPI_FIRMWARE_CLK_RATE_REQUEST(_id) \
172172
{ \
173-
.id = _id, \
173+
.id = cpu_to_le32(_id), \
174174
}
175175

176176
#if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE)

0 commit comments

Comments
 (0)