Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A07AC64EC4 for ; Fri, 3 Mar 2023 21:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NB29tqIZaMLJUxEcwfPiukquSg049DNyzv1I8bfEpdQ=; b=CzhpbteRdvQ262 SMyVOGD3ZQc8vdwt6Vq45aerd8auTY5ujcgjWf3jc3H+y43yCkeJybRk7CIV/ALEYcoYCrSBIjQQ3 8lqHHqrogKRGhlRK/xZOZP+QofOBhelgPsOrTFn7WcQ3x0/X4ufgv3mT/FRy7ZZA5rmPkerBxGIvO gVuf7IdcAauiQwa22l1Zpr99PXbyQ6RucaD/WOlxjamNSkq2o+0kBwwYLHKZt+B+g0i5lLcAf6GUq 9WQkKC9jMREynDpfnLPDdQi5md0VoPzDkKjfAHExwQc2nSDjKkr5TvxN+GejWOO33yhh/QUa3Z8vD L8fM6pyXex+iFO67Xurg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYDIH-007a1l-7o; Fri, 03 Mar 2023 21:50:25 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYDG1-007YhZ-HW; Fri, 03 Mar 2023 21:48:08 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 170E3B81A46; Fri, 3 Mar 2023 21:48:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCB85C433A0; Fri, 3 Mar 2023 21:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677880082; bh=AcUeaZ5u33CmXMBFHG0u/+HaGtroRQCtse3ILQH54nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XCYolguzBfVHhlL/swH9pXLMMucpaQBpimWR1fGG6GsQeIu0rMZvbKG1H/ZxJp/D2 Uq00J7wGnavZWZ7guyZwBtCrzUH0Baqfq/r8RdLnD+AU03kYC+MZLtztSbkC5CxvX/ X0sFJ/1mQzSrDbVQ1mQe4koEgWxAUEwGnyfPyX78o6dyyd5sdVpoTtQg1u4PmkJ/LM lKolThV4yABwLoaGkxNEFpARWNGYhSjmr0s/AIwM8um2sAQCK38l28W9em5aKlJsNk a9zE3kDXmuZVBfYJPypoVcn4a7IlOwnPB+Yx81UXfmKe4o/Mof1E6HE1oMRSziVmnd F25v4PdMPQ7Cw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jiapeng Chong , Abaci Robot , Vinod Koul , Sasha Levin , kishon@kernel.org, heiko@sntech.de, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 28/30] phy: rockchip-typec: Fix unsigned comparison with less than zero Date: Fri, 3 Mar 2023 16:47:13 -0500 Message-Id: <20230303214715.1452256-28-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230303214715.1452256-1-sashal@kernel.org> References: <20230303214715.1452256-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230303_134805_784365_8A6BAC02 X-CRM114-Status: GOOD ( 10.93 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Jiapeng Chong [ 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 Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3962 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230213035709.99027-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/rockchip/phy-rockchip-typec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.39.2 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy