From mboxrd@z Thu Jan 1 00:00:00 1970 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 5E3C8C7EE32 for ; Fri, 3 Mar 2023 21:45:07 +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=AORjsmwXrCBiJt4DE6JlpMcyL/KHG9QSECanApfhEMI=; b=EIIqKKapA6MUdO Aahkl3bghdyjPOm45xx6q27G8UveGDkyXtcp7qqoLMw4Foq+Uy9inwHmriTyaEg8K3dAM9GcciPPG Stx4zfy4BbqPBC8dN0h1jekThmfLGKLX5mL2HBjwzrKKvFMkZVbkMhs0uo1nJZ8N08o2Jo2gI8KCR Ch8F4wPghGUkE740eSHFyFIlwMdShYkVcHVXaJUw37JIr8aeiJvoJZ04EOo8nGsO+HWsxUCklXmB0 rvzOfEFgkA+SptROCZefu/g8+XrIGSiOfzmE5gMCMVKEvNKKkcy+MjTxe0h+04xaITcSAaQ1Tk9GG FfNmREd+R6qzozqE9WXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYDD8-007X0Y-Lq; Fri, 03 Mar 2023 21:45:06 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYDBD-007VxG-5x; Fri, 03 Mar 2023 21:43: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 D6AA1B81A10; Fri, 3 Mar 2023 21:43:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82C4CC433AE; Fri, 3 Mar 2023 21:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677879785; bh=hMbtTHtbpXktOMar5Unaj+/vzJDlRLP8YZo1+weNIi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QpT5KvbbmztNEl4ThfM2FfprxiPQtCX5JLgPwdUFeiB+95E8XrQ3CBN8tkrRlYqtT 071U/iHQG33eXzuN6Fb1Xvyve7rX0UXjfCtCboTZEXXJJcAMQt0uxf3RlpYTisjBC3 vqEZHqgntnmSXlKI6uU+RMytrs31vlE5CwfcoJSjIX7mPUgouMwVAKpBcogkaF/q1p 6JaN9L1I1NX6oHcuaUXwzpMKWobvP2R8hZhbSfe4eg+gRg9bR4vDZzXomvdUlnbP7e LPnETOIT0H2KPVzIxytUlKHkp+ed+h2paY55w7tNv1/WWGaTmngUPTbXyDLQen4n95 YEAKUQh8Sz91w== 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 6.2 60/64] phy: rockchip-typec: Fix unsigned comparison with less than zero Date: Fri, 3 Mar 2023 16:41:02 -0500 Message-Id: <20230303214106.1446460-60-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230303214106.1446460-1-sashal@kernel.org> References: <20230303214106.1446460-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_134307_436850_1A2B235A X-CRM114-Status: GOOD ( 10.82 ) 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 d76440ae10ff4..3a594b8cbe1ab 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 78E18C7EE39 for ; Fri, 3 Mar 2023 21:45:27 +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=eGQ2J9gaU3fkYyootGtQJGNTZtn4JYyIZQ6opwFSwwE=; b=PJZdNFYP/Sbaa2 HC5+hyLnPuScJrbFS1sUDLfg1AAiXFhkVzwlyU32o2vLlcTMcJNshWqvKiKwlUGaAnLz7YR71WziH 4nsRKES1PwDNtz6RjlWr2hTg2dwzqEvUIZIleV7/UukCVM3OjtbgcekI/LAWE2Zg5k82FwXZDV73U 2i+1SqcP2UQ+wLUR5upjyfTmF2pb0GFJHqBh6Qe+p9ttPF2yVHzMiWov09etQGIFj0c2+0Gp7yOQq +4OcwspLeG0alI3c6aB37+UnQhFgZvFSWwQZ22ao4Wzg36WBtUcu2NqcBhm7acoAEIy6Ky+bGsYIK hfldbYImGpnvPmfaxLiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYDD9-007X0i-1R; Fri, 03 Mar 2023 21:45:07 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYDBD-007VxG-5x; Fri, 03 Mar 2023 21:43: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 D6AA1B81A10; Fri, 3 Mar 2023 21:43:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82C4CC433AE; Fri, 3 Mar 2023 21:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677879785; bh=hMbtTHtbpXktOMar5Unaj+/vzJDlRLP8YZo1+weNIi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QpT5KvbbmztNEl4ThfM2FfprxiPQtCX5JLgPwdUFeiB+95E8XrQ3CBN8tkrRlYqtT 071U/iHQG33eXzuN6Fb1Xvyve7rX0UXjfCtCboTZEXXJJcAMQt0uxf3RlpYTisjBC3 vqEZHqgntnmSXlKI6uU+RMytrs31vlE5CwfcoJSjIX7mPUgouMwVAKpBcogkaF/q1p 6JaN9L1I1NX6oHcuaUXwzpMKWobvP2R8hZhbSfe4eg+gRg9bR4vDZzXomvdUlnbP7e LPnETOIT0H2KPVzIxytUlKHkp+ed+h2paY55w7tNv1/WWGaTmngUPTbXyDLQen4n95 YEAKUQh8Sz91w== 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 6.2 60/64] phy: rockchip-typec: Fix unsigned comparison with less than zero Date: Fri, 3 Mar 2023 16:41:02 -0500 Message-Id: <20230303214106.1446460-60-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230303214106.1446460-1-sashal@kernel.org> References: <20230303214106.1446460-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_134307_436850_1A2B235A X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 d76440ae10ff4..3a594b8cbe1ab 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-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6261C7EE30 for ; Fri, 3 Mar 2023 21:47:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232481AbjCCVry (ORCPT ); Fri, 3 Mar 2023 16:47:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232418AbjCCVr0 (ORCPT ); Fri, 3 Mar 2023 16:47:26 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D244C4B833; Fri, 3 Mar 2023 13:44:54 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id 64B9DCE22A6; Fri, 3 Mar 2023 21:43:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82C4CC433AE; Fri, 3 Mar 2023 21:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677879785; bh=hMbtTHtbpXktOMar5Unaj+/vzJDlRLP8YZo1+weNIi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QpT5KvbbmztNEl4ThfM2FfprxiPQtCX5JLgPwdUFeiB+95E8XrQ3CBN8tkrRlYqtT 071U/iHQG33eXzuN6Fb1Xvyve7rX0UXjfCtCboTZEXXJJcAMQt0uxf3RlpYTisjBC3 vqEZHqgntnmSXlKI6uU+RMytrs31vlE5CwfcoJSjIX7mPUgouMwVAKpBcogkaF/q1p 6JaN9L1I1NX6oHcuaUXwzpMKWobvP2R8hZhbSfe4eg+gRg9bR4vDZzXomvdUlnbP7e LPnETOIT0H2KPVzIxytUlKHkp+ed+h2paY55w7tNv1/WWGaTmngUPTbXyDLQen4n95 YEAKUQh8Sz91w== 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 6.2 60/64] phy: rockchip-typec: Fix unsigned comparison with less than zero Date: Fri, 3 Mar 2023 16:41:02 -0500 Message-Id: <20230303214106.1446460-60-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230303214106.1446460-1-sashal@kernel.org> References: <20230303214106.1446460-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.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 d76440ae10ff4..3a594b8cbe1ab 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 3AA15C7EE32 for ; Fri, 3 Mar 2023 21:45:20 +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=UbDRenVtDPjvzvSCvJvh4pfaEdr1qOcvwQFBFzY39Vc=; b=zccec5/CjpH5Wq KRvM3kcfbL3BFwde3Z5bgsT8xdtCkUk5fRBKovn80ifMNWEBwqCMS/XbuwqzDegpxh+EnqU/5CEHr Er2nGpVkYjGvI3sdUml48Oyc0Kl0Av3r8K0QKa8c5qNuBWV/5arZkdTtszTBhlvteTYRRzKE7sgh4 urXMK/XBsEVlltqp4G2B6qSphPfD6+TEtmLPFdYX5Vc3grBYrvj2s4gSOZrqwIbxsaaLIYRib/Qn5 MDzEHZjudETgU07mJCbPyq94rVM/G/nFSIHwvNCWHtr6sxDlpV3bvqGbWiYwb4/erVOjsrVxatnXR QlP5yMTG4bp1Vt/wPkvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYDCJ-007WWd-JY; Fri, 03 Mar 2023 21:44:16 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYDBD-007VxG-5x; Fri, 03 Mar 2023 21:43: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 D6AA1B81A10; Fri, 3 Mar 2023 21:43:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82C4CC433AE; Fri, 3 Mar 2023 21:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677879785; bh=hMbtTHtbpXktOMar5Unaj+/vzJDlRLP8YZo1+weNIi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QpT5KvbbmztNEl4ThfM2FfprxiPQtCX5JLgPwdUFeiB+95E8XrQ3CBN8tkrRlYqtT 071U/iHQG33eXzuN6Fb1Xvyve7rX0UXjfCtCboTZEXXJJcAMQt0uxf3RlpYTisjBC3 vqEZHqgntnmSXlKI6uU+RMytrs31vlE5CwfcoJSjIX7mPUgouMwVAKpBcogkaF/q1p 6JaN9L1I1NX6oHcuaUXwzpMKWobvP2R8hZhbSfe4eg+gRg9bR4vDZzXomvdUlnbP7e LPnETOIT0H2KPVzIxytUlKHkp+ed+h2paY55w7tNv1/WWGaTmngUPTbXyDLQen4n95 YEAKUQh8Sz91w== 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 6.2 60/64] phy: rockchip-typec: Fix unsigned comparison with less than zero Date: Fri, 3 Mar 2023 16:41:02 -0500 Message-Id: <20230303214106.1446460-60-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230303214106.1446460-1-sashal@kernel.org> References: <20230303214106.1446460-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_134307_436850_1A2B235A X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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 d76440ae10ff4..3a594b8cbe1ab 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-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel