Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1134592pxb; Wed, 27 Oct 2021 20:23:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAl0jNUvAYljY/qVo75GF7b6navjEP6gn4aVA5QEXr7HtP2CsTN7J9Kt6mWdZL+epXffzB X-Received: by 2002:a63:6d4a:: with SMTP id i71mr1343252pgc.192.1635391414978; Wed, 27 Oct 2021 20:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635391414; cv=none; d=google.com; s=arc-20160816; b=AFTqCpiYvc22Lj3NHiwI/ajaa8J/lPZNhRUNGQhdU9rxLO3W4L5Uitm3/3TRJ49N1y qzJVXSEwHKGw/RxPG7dzxVcekBMPdAcE3MGrukawChvMxBtD/GrlCni9YnUiLqrSFsEs hA7cpaj/c2/Nt13fi341Sw7PA+O1/clqxZtKt5TPgmJkKlfmoZF1bBqd3+DCd2gKqmOR wt+4WrQbSCxX4SdZJMmEJRYgLM4r3dc/J1zvoPfwz0Jf/Z0HGpVcUwix+WBVDM7W9B8K oKuH+9s6V9M6Uw5nDOOfZ5VLTnm+tm0lN9NA5rs5ZmOji/qhVFMsC9t/KjyaCFgBeIhN RpVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=Jjukr6KZbdBfn0KCj1vgLJ4JP8PUy7JbJpDsSPTgMyI=; b=svz8H/E+MuRtbX3UijrolpG2MPZGaJDH939KN8d8HaJJwladMZReRC97iJN2ytkeyS 8QCepwWU2zWOX3rJpU5RDd5YbgPu2HCd9qRbd1A81mAFUqKs0O9ft66/vhezVFbbjShD U9+1GyAFww0VM7FN3OMCXa1D+c5fFfZSRaUwB9F9vWJO1SyOSxWjjn8TXNEbJxPd/su1 FI4aWOuokOXpSAY0uCnlXaugKCdOBAk0P6ahZ9aCY5DLezWnoNDt5/o8m/J1ceKJ/q0O 3AefBEi1Sklt0eQbKvxOFXqaytXf28yATm+0cg/OX7yMwv95/Dhlca342kenwEbMPyMH quPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si2778277pfv.329.2021.10.27.20.23.21; Wed, 27 Oct 2021 20:23:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229769AbhJ1DY0 (ORCPT + 99 others); Wed, 27 Oct 2021 23:24:26 -0400 Received: from smtp23.cstnet.cn ([159.226.251.23]:54384 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229704AbhJ1DYZ (ORCPT ); Wed, 27 Oct 2021 23:24:25 -0400 Received: from localhost.localdomain (unknown [124.16.138.128]) by APP-03 (Coremail) with SMTP id rQCowAB3fKg9F3phlTw+BQ--.43941S2; Thu, 28 Oct 2021 11:21:33 +0800 (CST) From: Jiasheng Jiang To: rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] thermal: Fix implicit type conversion Date: Thu, 28 Oct 2021 03:21:32 +0000 Message-Id: <1635391292-2879179-1-git-send-email-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: rQCowAB3fKg9F3phlTw+BQ--.43941S2 X-Coremail-Antispam: 1UD129KBjvdXoWrKFyUWFyxJF1rZr4rXr1fJFb_yoWkJFb_CF n3Xr1093s8CF1FvFn7Cr18C347tasFqanag34FvwnxZ348Z343Wr1qqF98Wr48WrZYyF9r ZF12kr1xAw1xZjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb48FF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVWxJr 0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK67AK6r48 MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr 0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0E wIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJV W8JwCI42IY6xAIw20EY4v20xvaj40_Wr1j6rW3Jr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1l IxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUj8uctUUUU U== X-Originating-IP: [124.16.138.128] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The parameter 'cpu' is defined as unsigned int. However in the cpumask_next() it is implicitly type conversed to int. It is universally accepted that the implicit type conversion is terrible. Also, having the good programming custom will set an example for others. Thus, it might be better to change the type of 'cpu' from unsigned int to int. Fixes: 3e8c4d3 ("drivers: thermal: Move various drivers for intel platforms into a subdir") Signed-off-by: Jiasheng Jiang --- drivers/thermal/intel/intel_powerclamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c index b0eb5ec..ed46b5e 100644 --- a/drivers/thermal/intel/intel_powerclamp.c +++ b/drivers/thermal/intel/intel_powerclamp.c @@ -578,7 +578,7 @@ static int powerclamp_cpu_online(unsigned int cpu) return 0; } -static int powerclamp_cpu_predown(unsigned int cpu) +static int powerclamp_cpu_predown(int cpu) { if (clamping == false) return 0; -- 2.7.4