Patch "phy: rockchip-typec: Fix unsigned comparison with less than zero" has been added to the 5.10-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

    phy: rockchip-typec: Fix unsigned comparison with less than zero

to the 5.10-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:
     phy-rockchip-typec-fix-unsigned-comparison-with-less.patch
and it can be found in the queue-5.10 subdirectory.

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



commit d3a7d168cbda465c0fe174e42847a23e36555f7a
Author: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
Date:   Mon Feb 13 11:57:09 2023 +0800

    phy: rockchip-typec: Fix unsigned comparison with less than zero
    
    [ Upstream commit f765c59c5a72546a2d74a92ae5d0eb0329d8e247 ]
    
    The dp and ufp are defined as bool type, the return value type of
    function extcon_get_state should be int, so the type of dp and ufp
    are modified to int.
    
    ./drivers/phy/rockchip/phy-rockchip-typec.c:827:12-14: WARNING: Unsigned expression compared with zero: dp > 0.
    
    Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
    Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3962
    Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230213035709.99027-1-jiapeng.chong@xxxxxxxxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index 70a31251b202b..20f787d5ec581 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -808,9 +808,8 @@ static int tcphy_get_mode(struct rockchip_typec_phy *tcphy)
 	struct extcon_dev *edev = tcphy->extcon;
 	union extcon_property_value property;
 	unsigned int id;
-	bool ufp, dp;
 	u8 mode;
-	int ret;
+	int ret, ufp, dp;
 
 	if (!edev)
 		return MODE_DFP_USB;



[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