Patch "pwm: raspberrypi-poe: Fix endianness in firmware struct" has been added to the 5.18-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    pwm: raspberrypi-poe: Fix endianness in firmware struct

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pwm-raspberrypi-poe-fix-endianness-in-firmware-struc.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 63d4bf4ef52bec45fe0579ff7605634682626b30
Author: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Date:   Fri Apr 8 17:38:46 2022 +0200

    pwm: raspberrypi-poe: Fix endianness in firmware struct
    
    [ Upstream commit 09f688f0718f57f9cf68ee1aa94490f641e759ba ]
    
    The reg member of struct raspberrypi_pwm_prop is a little endian 32 bit
    quantity. Explicitly convert the (native endian) value to little endian
    on assignment as is already done in raspberrypi_pwm_set_property().
    
    This fixes the following sparse warning:
    
            drivers/pwm/pwm-raspberrypi-poe.c:69:24: warning: incorrect type in initializer (different base types)
            drivers/pwm/pwm-raspberrypi-poe.c:69:24:    expected restricted __le32 [usertype] reg
            drivers/pwm/pwm-raspberrypi-poe.c:69:24:    got unsigned int [usertype] reg
    
    Fixes: 79caa362eab6 ("pwm: Add Raspberry Pi Firmware based PWM bus")
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
    Signed-off-by: Thierry Reding <thierry.reding@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pwm/pwm-raspberrypi-poe.c b/drivers/pwm/pwm-raspberrypi-poe.c
index e52e29fc8231..6ff73029f367 100644
--- a/drivers/pwm/pwm-raspberrypi-poe.c
+++ b/drivers/pwm/pwm-raspberrypi-poe.c
@@ -66,7 +66,7 @@ static int raspberrypi_pwm_get_property(struct rpi_firmware *firmware,
 					u32 reg, u32 *val)
 {
 	struct raspberrypi_pwm_prop msg = {
-		.reg = reg
+		.reg = cpu_to_le32(reg),
 	};
 	int ret;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux