Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1637389rwl; Thu, 5 Jan 2023 17:15:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXvuSDsM6LW/1xxnGA495XM6hgYVYhm5tKIb+133ahqVuNS10JRzyABb1gr+m75P/niSagJc X-Received: by 2002:a05:6402:291a:b0:48b:c8de:9d1a with SMTP id ee26-20020a056402291a00b0048bc8de9d1amr17678138edb.37.1672967703567; Thu, 05 Jan 2023 17:15:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672967703; cv=none; d=google.com; s=arc-20160816; b=qCdvoFJg3A+fEuAAR7oQT8w2lZqIzchSZjWFFcI62M4ePMrGg1dhpKA5WZXZW076Cu 8XEN06ly8moUg7aMw01XdvfelMJTY9DVCMvrWNsNfg0E/mqBj/iZ/2e7fArfymHtnxxf 1YK7ybCxurenDrMBbGQx3OeICBruFOje4iJS/ECfX6IB01JjkgB3xkpcN5kPfkWgI9JZ 80Dfr5MKAqwkjhsRtNnGPu+ioZ57+hKOJzuxwmcN9UHaztcwOTE6LzFhlrw7oCBwNrrp uow5udOYPl5KtOnoHJwxyZ9eq3Yg0Yad3TGeBAXyCnDIMPf2UTjlB2nO+e+lb5n2oa6J Gsxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mQo7rh4STFHCNtrJi/4PmA/XrSBXHFW1cHvaM3Aw9vg=; b=UQdVjzfU4v4WanMOJenrO5MIveathw+YXD6SapCxyrp2xqmhV6F+Y7+zUEVMAocCSS dFZGKEjNhkPG2J2DWzP8cNaHChrZX1vNrOIW/c4wa/wOXEtYsis5PeXLZj/lujZEgTTg T9PYzJUMlQrwT8LIWRlNT+SXvP6wuRwmKWuvWT6KjlL581z9GstE02T6HBOv6CsFZ2SP Iy8gtqHGREkS/UckdhRUIsAgaMLZNfjlD2GNsQUDQlS6411xkgH/Du254uD8jJ/3p4SP 5oQqzB3pKflakVFgt6588/zeTgNw1DQvr/IjFUWQO8UNiIXSinoeLVaQOwLpcGXpJHHV so2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w22-20020a056402269600b0046a8fe6d173si38348282edd.456.2023.01.05.17.14.50; Thu, 05 Jan 2023 17:15:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235881AbjAFBAD (ORCPT + 55 others); Thu, 5 Jan 2023 20:00:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232117AbjAFA77 (ORCPT ); Thu, 5 Jan 2023 19:59:59 -0500 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47EE11A81D; Thu, 5 Jan 2023 16:59:57 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VYxG4-k_1672966794; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VYxG4-k_1672966794) by smtp.aliyun-inc.com; Fri, 06 Jan 2023 08:59:55 +0800 From: Yang Li To: rafael@kernel.org Cc: daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] thermal: Fix unsigned comparison with less than zero Date: Fri, 6 Jan 2023 08:59:51 +0800 Message-Id: <20230106005951.100479-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/thermal/intel/intel_soc_dts_iosf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/intel/intel_soc_dts_iosf.c b/drivers/thermal/intel/intel_soc_dts_iosf.c index 2138693d8afd..8c26f7b2316b 100644 --- a/drivers/thermal/intel/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel/intel_soc_dts_iosf.c @@ -380,7 +380,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.20.1.7.g153144c