From patchwork Fri Oct 14 09:01:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 2596 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp73874wrs; Fri, 14 Oct 2022 02:00:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7a4yZlC+eYhFxn4dZxle3XKgs1ii8ms/ca8dnHbMJnFaHnpGg9ngJIeS5xJR85RFmvkWSb X-Received: by 2002:aa7:cd92:0:b0:456:cbb5:2027 with SMTP id x18-20020aa7cd92000000b00456cbb52027mr3360265edv.384.1665738018459; Fri, 14 Oct 2022 02:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665738018; cv=none; d=google.com; s=arc-20160816; b=Vo7nkBo7WeD3rmy6F/yFZjP1e8xj37TVlIHPizz9Thpeua5UgKZY5ReDmD5UA8ggoo yX6tyFLHqTFvgsH47Ch0mt9g5VfF0/ramUHRUI0ZZ4G1yjdeWcuQZPohixjLZ2JcjV44 9fXQ0zc+sXoJDHVAo/CWZFH/O4BSv68mFH8IlNT2MWchMrouYVdVD9Z59WE9A4vN95lR CK0sfuDw3OARCwWkgw4i1W7oKkq32rpM5ChRIFVK9QgcLg0UgMca867V1EMhQKW62ZRC 9p9T0oGfsw1nlFhmjqpYIw7QuCBZh72xOnRASkTmxa4qbopIP0nq8KPfyBXyx4GB/2KN FcuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Ag6H/DkHtIE33PpzSXUQ7CMh/Gv8eb3EWzpr2pElTEY=; b=h4m7NstcBi4L9hoXsh+pvsuMZQL0OMyILjCG70vowQ5huNz9Zu3WZT4UEuyDl4d3pm Whoe9NShEQN1CXUNsICpfk9OGt17dXAAAECsYYZdT2RM+Y2wTFjDxHNjUZUbkUYqWW0G +6k65McFiBgdnmvxYeBed883oKV6wNbskTliJX5JpoGtfvOiHuqpDyq9D1IsG0GYrLsG a0BocVvl+fL/kQuZu0JntieUTvqAN3hksrXqFvNuJ6aIkgNjI+85K56HuOEJAnDU5xvo CqECy1CVTvl5X70bry470JxYLXytSkJGN7tYm5t61asTttv2wlSm8Nz9Tfkm2ZyZ08Zh yLBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nk59jkXz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a17090669cb00b0073d710fec77si1772262ejs.251.2022.10.14.01.59.52; Fri, 14 Oct 2022 02:00:18 -0700 (PDT) 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; dkim=pass header.i=@intel.com header.s=Intel header.b=nk59jkXz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230085AbiJNI7Q (ORCPT + 99 others); Fri, 14 Oct 2022 04:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230003AbiJNI7M (ORCPT ); Fri, 14 Oct 2022 04:59:12 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77EC315626F; Fri, 14 Oct 2022 01:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665737951; x=1697273951; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=2LzFHhElpAS0tiULqCikh0gwGEfkJcjRgv1pg6Sxb14=; b=nk59jkXzKhRc9JREVnm/A8XueLeg1LhdRgiYSJ4IwpF6UthI1BbGO8zk 7o1kbeNeUbdECiR9AqohLMworOgGEZj2SpHBNb8FjE/AarOb/hWyouwpX vrrgfbdi/KqF6VQQ4kh4F8kuZquGLChMsE375lk7QPOsDGXZGV9Hmkjzj y+b6/ziX6gvBtAgLshbY23Rjr1Atyaon3FoTWUDc8UVxBWDjv12uHSAOy Kn8pM5LynD77RTfy9gaXQWjlz/PAKdkn4+oUqV3OFMC0iEawsxNN7Xjkx ks3KA8iNqcDkEoGIpOdkH2CTn+eQmzqO+mimvyuOYs6Vje9MRnGcZVqsS w==; X-IronPort-AV: E=McAfee;i="6500,9779,10499"; a="391635352" X-IronPort-AV: E=Sophos;i="5.95,182,1661842800"; d="scan'208";a="391635352" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 01:59:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10499"; a="696234495" X-IronPort-AV: E=Sophos;i="5.95,182,1661842800"; d="scan'208";a="696234495" Received: from power-sh.sh.intel.com ([10.239.183.122]) by fmsmga004.fm.intel.com with ESMTP; 14 Oct 2022 01:59:08 -0700 From: Zhang Rui To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-hwmon@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, peterz@infradead.org, jdelvare@suse.com, linux@roeck-us.net, len.brown@intel.com, rui.zhang@intel.com Subject: [PATCH V4 1/4] hwmon/coretemp: Rename indx to index Date: Fri, 14 Oct 2022 17:01:44 +0800 Message-Id: <20221014090147.1836-2-rui.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221014090147.1836-1-rui.zhang@intel.com> References: <20221014090147.1836-1-rui.zhang@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746652908450180111?= X-GMAIL-MSGID: =?utf-8?q?1746652908450180111?= Use variable name 'index' instead of 'indx' for the index in the core_data[] array. No functional change expected. Cc: stable@vger.kernel.org Suggested-by: Ingo Molnar Signed-off-by: Zhang Rui Acked-by: Guenter Roeck --- drivers/hwmon/coretemp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index ccf0af5b988a..bfdcfe8ccb34 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -515,15 +515,15 @@ coretemp_add_core(struct platform_device *pdev, unsigned int cpu, int pkg_flag) dev_err(&pdev->dev, "Adding Core %u failed\n", cpu); } -static void coretemp_remove_core(struct platform_data *pdata, int indx) +static void coretemp_remove_core(struct platform_data *pdata, int index) { - struct temp_data *tdata = pdata->core_data[indx]; + struct temp_data *tdata = pdata->core_data[index]; /* Remove the sysfs attributes */ sysfs_remove_group(&pdata->hwmon_dev->kobj, &tdata->attr_group); - kfree(pdata->core_data[indx]); - pdata->core_data[indx] = NULL; + kfree(pdata->core_data[index]); + pdata->core_data[index] = NULL; } static int coretemp_probe(struct platform_device *pdev) @@ -647,7 +647,7 @@ static int coretemp_cpu_offline(unsigned int cpu) struct platform_device *pdev = coretemp_get_pdev(cpu); struct platform_data *pd; struct temp_data *tdata; - int indx, target; + int index, target; /* * Don't execute this on suspend as the device remove locks @@ -661,12 +661,12 @@ static int coretemp_cpu_offline(unsigned int cpu) return 0; /* The core id is too big, just return */ - indx = TO_ATTR_NO(cpu); - if (indx > MAX_CORE_DATA - 1) + index = TO_ATTR_NO(cpu); + if (index > MAX_CORE_DATA - 1) return 0; pd = platform_get_drvdata(pdev); - tdata = pd->core_data[indx]; + tdata = pd->core_data[index]; cpumask_clear_cpu(cpu, &pd->cpumask); @@ -677,7 +677,7 @@ static int coretemp_cpu_offline(unsigned int cpu) */ target = cpumask_any_and(&pd->cpumask, topology_sibling_cpumask(cpu)); if (target >= nr_cpu_ids) { - coretemp_remove_core(pd, indx); + coretemp_remove_core(pd, index); } else if (tdata && tdata->cpu == cpu) { mutex_lock(&tdata->update_lock); tdata->cpu = target;