From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0DE8847E for ; Fri, 10 Mar 2023 13:53:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32ABCC433EF; Fri, 10 Mar 2023 13:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678456411; bh=8ivhV4rIQF8V0NQSfq3Oi8356Odb3PPcz9Le8tPxjMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0LBwp6jxB551+5CKeACZRo5fLe82gnA+VoB7HFeu4ICb4D577Qzq2SDZOtvb4pLf1 bNJ3/eUmlj+xlfXP8Spu9w9A2f4ux2UTZ1LrzMqcA+udLfXEEKuUEM59u+NENOxHn+ 3QrT/ThmERoH2iXtpl0Q9Vjr9qAKwqKxqK9QKC90= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Abaci Robot , Jiapeng Chong , Vinod Koul , Sasha Levin Subject: [PATCH 4.14 188/193] phy: rockchip-typec: Fix unsigned comparison with less than zero Date: Fri, 10 Mar 2023 14:39:30 +0100 Message-Id: <20230310133717.317682286@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133710.926811681@linuxfoundation.org> References: <20230310133710.926811681@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(-) --- a/drivers/phy/rockchip/phy-rockchip-typec.c +++ b/drivers/phy/rockchip/phy-rockchip-typec.c @@ -645,9 +645,8 @@ static int tcphy_get_mode(struct rockchi 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; ufp = extcon_get_state(edev, EXTCON_USB); dp = extcon_get_state(edev, EXTCON_DISP_DP);