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 ECF91C6FA8E for ; Sun, 26 Feb 2023 15:03:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231702AbjBZPDu (ORCPT ); Sun, 26 Feb 2023 10:03:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231650AbjBZPDa (ORCPT ); Sun, 26 Feb 2023 10:03:30 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA2DD1EBCA; Sun, 26 Feb 2023 06:54:05 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D386560C4E; Sun, 26 Feb 2023 14:52:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F9D4C433D2; Sun, 26 Feb 2023 14:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677423144; bh=4FgsJJrp32SQEY1IT4iugEebgq40vaJNoXrqcAmbH1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tynlLB6W8P2IDyO5V34xX2b2oKRQycIoLsG+m6uMXD3DO9fS1MTaiV2mVrkF5wfUG uMfjBIYUTBFCvQeoLTSMbEAI/HEo6Qrbtznc0WaJ6sxqooZt1Tl8kwE/Q5EtF7pXSN 3XqIFCyp8ZRWrxwdX6aKjXYqqUVwBGhHVQBEYdQMCnxGqT293QIFfcar5xAoDF0674 jiRsss9tFDeSUgPdM0dZLMiCVUj5mvR8aQ4Rueq4j7p22T6tlmjG3UkX299OJAxWYB JBTPNxZtUT3J1Yi9N0lVqy2A2A0SWejQ7pJaGoYlFUm0V4YVRoZim0X/s8ohyfvMRq 5wuWDVdvctlTA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yang Li , Abaci Robot , Zhang Rui , "Rafael J . Wysocki" , Sasha Levin , rafael@kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 03/13] thermal: intel: Fix unsigned comparison with less than zero Date: Sun, 26 Feb 2023 09:52:05 -0500 Message-Id: <20230226145217.829485-3-sashal@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230226145217.829485-1-sashal@kernel.org> References: <20230226145217.829485-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: linux-kernel@vger.kernel.org From: Yang Li [ Upstream commit e7fcfe67f9f410736b758969477b17ea285e8e6c ] The return value from the call to intel_tcc_get_tjmax() is int, which can be a negative error code. However, the return value is being assigned to an u32 variable 'tj_max', so making 'tj_max' an int. Eliminate the following warning: ./drivers/thermal/intel/intel_soc_dts_iosf.c:394:5-11: WARNING: Unsigned expression compared with zero: tj_max < 0 Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3637 Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Zhang Rui Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/thermal/intel_soc_dts_iosf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/intel_soc_dts_iosf.c b/drivers/thermal/intel_soc_dts_iosf.c index e0813dfaa2783..435a093998000 100644 --- a/drivers/thermal/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel_soc_dts_iosf.c @@ -405,7 +405,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init( { struct intel_soc_dts_sensors *sensors; bool notification; - u32 tj_max; + int tj_max; int ret; int i; -- 2.39.0