Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp399854imi; Fri, 22 Jul 2022 01:17:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u7jdiWJ86mTkBYj+qM3Vw7LF+H5nAvfKQU8sGgGWP9VFHKRfgkSNcmCHaVuAVl3ELA44B+ X-Received: by 2002:a05:6402:ea9:b0:43b:b88f:62fe with SMTP id h41-20020a0564020ea900b0043bb88f62femr2207343eda.85.1658477855338; Fri, 22 Jul 2022 01:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658477855; cv=none; d=google.com; s=arc-20160816; b=eGQDjAdLNsnkRt26RSpLKMTg7yLEFaK8M1270KSvRBfpSLvw99S3KhzpTi1W1a6gmV FB3OatOEsheYmZskcwAqfn1Vhw6WfEEu+DGYn6xncPu7DKJv5HKKe1DxOHim3sDaUg/+ BzvAW8nUKuqBxzH3wBeOhKSASQe7xgDqHLWlnYNu+mX9QpkBu3preNiuWPpBfJIXG+s5 8ugSuGzQTBMyhNEiFlmkHWhunBmKxxdppV1N0YYleVZ4VYsxHVrQ9z6rmbJcpvdG+DEU Dyd0AqxwFMIgmH7U3oyU52vX09dO7UZwBVadXJ16qTBxOcvyMiTgABWhnnBDgFNL2LBb heTw== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=njGKKKUzRkwLS4SSMqAt2J6AMg8Xqrnwf0YuRNnzNyE=; b=zGizL7hln2OYSwr4gTwBgwIeuwZbakeZqDwQNb+ugo1Vprf5h2TCSeO2dhyVM/Hedz XXYp3X9AdSvkhU/C3vcP66GjhINka1w4RuF/9gKpn2xYOMNiraBeK2aIDHU5L+KgB9lJ 0dwig1cKAUG5TBxQDtjCqRKxhfUof8n/Zsmo5p7EBYMquQ71GodbbfYHR7KvYzw3CESx DDGMBOWLgiuKs2d6V+Enx1cAq+uI3HQAWybRD5tFV/tAtXWwxvujZj7L0Lb5JLLjqKRb sr1XyN93Uoqvq9q6aT09hJ2z6SWhmYlKaWpt4FAtC8S+f06NssZY1gHd2cWUbTBlVoue mAqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=snqK9Zpo; 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 sh34-20020a1709076ea200b0072b7c7bc036si5781423ejc.78.2022.07.22.01.17.10; Fri, 22 Jul 2022 01:17:35 -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=@xen0n.name header.s=mail header.b=snqK9Zpo; 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 S234890AbiGVIN0 (ORCPT + 99 others); Fri, 22 Jul 2022 04:13:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234703AbiGVING (ORCPT ); Fri, 22 Jul 2022 04:13:06 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 069239CE08 for ; Fri, 22 Jul 2022 01:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1658477577; bh=LWDnby6DHYYfy30ljiAO8OPFEpGRu2tko2sxtbpJc08=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=snqK9ZpooW8OVA3dP+6M4juLxvS1m+kdPwWjXflikrCQtp5yGNDHbEf4qsOnXf7oP jPnT0yyxhn6h4//K9REa7IhGA4qayhsJjJbJRAK6HLnk1nxlztXwrzNEahu/QwF39w eb9kEvuKKmqrAACTItvMB1seMLF8uXWZwmF0ro2M= Received: from [100.100.35.250] (unknown [58.34.185.106]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 5676F6061B; Fri, 22 Jul 2022 16:12:57 +0800 (CST) Message-ID: Date: Fri, 22 Jul 2022 16:12:55 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Thunderbird/104.0a1 Subject: Re: [PATCH 2/2] LoongArch: Remove unused variable Content-Language: en-US To: Bibo Mao , Huacai Chen Cc: WANG Xuerui , Jiaxun Yang , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org References: <20220720072152.3894559-1-maobibo@loongson.cn> <20220720072152.3894559-2-maobibo@loongson.cn> From: WANG Xuerui In-Reply-To: <20220720072152.3894559-2-maobibo@loongson.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 2022/7/20 15:21, Bibo Mao wrote: > There are some variables never used or referenced, this patch > removes these varaibles and make the code cleaner. > > Signed-off-by: Bibo Mao > --- > arch/loongarch/include/asm/loongson.h | 12 ------------ > arch/loongarch/kernel/env.c | 20 -------------------- > 2 files changed, 32 deletions(-) > > diff --git a/arch/loongarch/include/asm/loongson.h b/arch/loongarch/include/asm/loongson.h > index 6a8038725ba7..2df649e73371 100644 > --- a/arch/loongarch/include/asm/loongson.h > +++ b/arch/loongarch/include/asm/loongson.h > @@ -39,18 +39,6 @@ extern const struct plat_smp_ops loongson3_smp_ops; > > #define MAX_PACKAGES 16 > > -/* Chip Config register of each physical cpu package */ > -extern u64 loongson_chipcfg[MAX_PACKAGES]; > -#define LOONGSON_CHIPCFG(id) (*(volatile u32 *)(loongson_chipcfg[id])) > - > -/* Chip Temperature register of each physical cpu package */ > -extern u64 loongson_chiptemp[MAX_PACKAGES]; > -#define LOONGSON_CHIPTEMP(id) (*(volatile u32 *)(loongson_chiptemp[id])) > - > -/* Freq Control register of each physical cpu package */ > -extern u64 loongson_freqctrl[MAX_PACKAGES]; > -#define LOONGSON_FREQCTRL(id) (*(volatile u32 *)(loongson_freqctrl[id])) > - > #define xconf_readl(addr) readl(addr) > #define xconf_readq(addr) readq(addr) > > diff --git a/arch/loongarch/kernel/env.c b/arch/loongarch/kernel/env.c > index 467946ecf451..82b478a5c665 100644 > --- a/arch/loongarch/kernel/env.c > +++ b/arch/loongarch/kernel/env.c > @@ -17,21 +17,6 @@ u64 efi_system_table; > struct loongson_system_configuration loongson_sysconf; > EXPORT_SYMBOL(loongson_sysconf); > > -u64 loongson_chipcfg[MAX_PACKAGES]; > -u64 loongson_chiptemp[MAX_PACKAGES]; > -u64 loongson_freqctrl[MAX_PACKAGES]; > -unsigned long long smp_group[MAX_PACKAGES]; > - > -static void __init register_addrs_set(u64 *registers, const u64 addr, int num) > -{ > - u64 i; > - > - for (i = 0; i < num; i++) { > - *registers = (i << 44) | addr; > - registers++; > - } > -} > - > void __init init_environ(void) > { > int efi_boot = fw_arg0; > @@ -50,11 +35,6 @@ void __init init_environ(void) > efi_memmap_init_early(&data); > memblock_reserve(data.phys_map & PAGE_MASK, > PAGE_ALIGN(data.size + (data.phys_map & ~PAGE_MASK))); > - > - register_addrs_set(smp_group, TO_UNCACHE(0x1fe01000), 16); > - register_addrs_set(loongson_chipcfg, TO_UNCACHE(0x1fe00180), 16); > - register_addrs_set(loongson_chiptemp, TO_UNCACHE(0x1fe0019c), 16); > - register_addrs_set(loongson_freqctrl, TO_UNCACHE(0x1fe001d0), 16); > } > > static int __init init_cpu_fullname(void) These information, although removed here, are actually available in the official docs repo [1], so no harm in cleaning the code. Thanks. Reviewed-by: WANG Xuerui [1]: https://loongson.github.io/LoongArch-Documentation/Loongson-3A5000-usermanual-EN.html