Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp637519rwi; Fri, 14 Oct 2022 06:53:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72IXqAUx4P8A4cRJEtkb9XambxL3upxaXc6dp9Qij9hX8SdMI96o4Tyd+zQL6ImFWUNEeZ X-Received: by 2002:a17:903:2594:b0:17c:6117:2434 with SMTP id jb20-20020a170903259400b0017c61172434mr5555741plb.135.1665755597054; Fri, 14 Oct 2022 06:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665755597; cv=none; d=google.com; s=arc-20160816; b=Z4tn0nCPklRdy/wAstM8M3OqY4kCooy/o1aE75srdZ/EJiCuUIIZOZc+TRwMwnr9OM fxoVLPdgOWLbo/NL4FAF/j6uSKqusrNM9CY50s3ZgSwy95kD/d7hX7527HpEhxLut2Ew h0vzUU3FCxQH865x/08op4wj/VmT9K3iL8uIbHvV+ZYlscIJq3/IWlTda7mqvDHHJTqs EwooWFxjoQBDjfFWnq9krUghXst00sLhIdwmodTMmp5VZCcE7i/CEp7/EwaLI86D3Xat 9ir4EJpmO2HH527kT43AZnaQDcgAlwNcmAML+96R9toDTRDoYSfLN///zbP560+irfs+ Foqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=B85YzJa+gzD30iQI+jRM1asD652V/dJZGGt/+VYQU/o=; b=KG+BkA6lV4N5RWphke8FmiOxPmzeg7n632LuH/GiJqPuIatF1Jrd9xcIlEXzVZRqAx OLv8EKWYtJIrP9Oju7LIDtDHCSzl8eD7aRu3jKnKO0HC/WmAYzV2ZtQJoCw+FFLLYbGD k7jXl33gXBlV/qT3TkrozBDpZFReP3E0WRMiS3IR8CL/bGuiOLiwEKf4ayFe0kw+ZLtV K8+PTOeSL3aTvKDyte0ilDbebtl41twLJQK4q2oF7KXyGotyxqkzBANVVkgoycu/tq14 rTBJ6zjnAPmnOMduhHpypc1OqaG7vKL/cteovFgg6VkJpdokl/VytS3WPGBC8cZfzHPD XF2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=T0We9qEM; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7-20020a056a000b8700b00563ad44ddf9si2674998pfj.380.2022.10.14.06.53.05; Fri, 14 Oct 2022 06:53:17 -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=@gmail.com header.s=20210112 header.b=T0We9qEM; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229550AbiJNN04 (ORCPT + 99 others); Fri, 14 Oct 2022 09:26:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbiJNN0x (ORCPT ); Fri, 14 Oct 2022 09:26:53 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3F491B76F6; Fri, 14 Oct 2022 06:26:51 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id k9so4301642pll.11; Fri, 14 Oct 2022 06:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=B85YzJa+gzD30iQI+jRM1asD652V/dJZGGt/+VYQU/o=; b=T0We9qEM1OuX233DTgvvqc5j/ONlheakLJyA/6o8ap4qO839PjW2okMknbno5w2Dwa YjiQevt7ClKSXV9S+51PC1WHOOAvUYLcyAbBRWEPTBbgWq60jZjAvX7R58Li/flyoMSk txq/eSU/kcFeHxJtcheasqPYrAh6YSLenZU41BsBGhEaP3lXPLyfkE2xZTqiXpx5oUwS 7BCq6DY6TIj1bgrFgxL8xg+kpiYml2TKnbz0TngAMXwYndTckSD58rejcWoMR/Eoeuvi 3JKAQ/6acDfqEb4f9zZIBKjZ0S/Bw5zz/fOWRdyzZ74p6I0OeYYePqL5fWLgL7yLB7m4 A3gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B85YzJa+gzD30iQI+jRM1asD652V/dJZGGt/+VYQU/o=; b=E+b20xoahOs5awk2c0vqk9JxH63K/Hi69pNK6NnIoHUtlSYVs5VaDGlo1GooMQaLMZ PYyGVzpjNKLrOgXJflHBmN8iRHFhS+I6B7YpaivQYB71M7eDgX6Jgqqncmiv6D9fl8Cv rjkiykHJsC7Pjfw5LcoLvSGi5iSvsY/5xDfxKCqM9kIZE6SjH1COwXmdnMOaLh76BucB q3XqBF9EAA8aXZJQSkbAdiZch6rQ1xR1SWwJjWnLNQZkwis0vr61AUkAveiCg9VE7VOi ZdEMaL76O8fJiD+w4sipJ+R8wtgbFpZK0G1BwYRLymyxW/FuzfY6JYyZxqvhI2+jWDAG DSzg== X-Gm-Message-State: ACrzQf3PYCudCoDKPJbUPOQqx9SI7ntLGfTk1nTVIqe+JGCYtunqE9AQ Sk+7CLtANJBUv1Dy0belez4= X-Received: by 2002:a17:90a:fa85:b0:20a:ddd3:d431 with SMTP id cu5-20020a17090afa8500b0020addd3d431mr17532500pjb.210.1665754011237; Fri, 14 Oct 2022 06:26:51 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id b12-20020aa78ecc000000b005627470944dsm1679224pfr.189.2022.10.14.06.26.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Oct 2022 06:26:49 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Fri, 14 Oct 2022 06:26:48 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH V4 1/4] hwmon/coretemp: Rename indx to index To: Zhang Rui , 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, len.brown@intel.com References: <20221014090147.1836-1-rui.zhang@intel.com> <20221014090147.1836-2-rui.zhang@intel.com> Content-Language: en-US From: Guenter Roeck In-Reply-To: <20221014090147.1836-2-rui.zhang@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On 10/14/22 02:01, Zhang Rui wrote: > 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;