Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2498896pxb; Mon, 18 Jan 2021 21:16:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxn0GLFXpQ0LTxht7ak0n1a8EacWFnvCL400kcuX4kap85qYaYp5sNNrPaFFNij7yU6Y23u X-Received: by 2002:a17:906:bce3:: with SMTP id op3mr1865087ejb.485.1611033371669; Mon, 18 Jan 2021 21:16:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611033371; cv=none; d=google.com; s=arc-20160816; b=wyPKvq1X+IDuc7mJ+a7swjeDjAObqaOpPE/1dKHp0PmisXT4gde1785Ntk3RxxVrdv JnWx/oSR+UkYjHm69UTwqj7JCxSrx/lEKNL5/dBIODpEZJhaGyBrqiDwa3OXRW/2leXv hRgp8/TNCstkQ8cYod+55lCH92Yem4Sx25XCwpAVMRygRuRu8jEsIJYEz9/0b0833TBh OsGXNfms0Xeg3/DyvZb6YhCQ13IM33OEOgoH7K1w+aWcvlsqfGVMUiB9EZY3fH26D59h OvY5RcebQWoFABV3J3UVMdMCnhalK0QDeWXnRlZzpBjZ3KeRXuvEiLTRi8g4//Gz9nZo x4bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DWf7qf2dNQJNV6I/OVmgaA3BlxssBU5reZBj8IC1TeU=; b=WZ1PuxrWTZtPvUU0842q7NYUw4+BSL529nmAF0c3l1lnwGWz8DUgUXJpWZrbin9te1 DaHZOfGlgo/MGtCwyl1CiXhWNuE/1NnWn+RLTWfVpCrYe8VmneD2lOVdBL2QlqINUCcs oO7D4TcvNcAjBA3EQV8BwzVJVu2BYsz8SBsStxLVT7VKS1ORcuWl2IplcVKdhilotDl3 gY8ZG+LiwvLIeVdrrjl4rHnWKhv5bMkf3uN44uyyceAF4gbDH8SAoxpTDwNWF/98jpmC U8KwAQ4HmqX2ujADQ73ENPG1Rf5xfGgg56a5uwm6wXnPEG+to92oKdU+PmqCjkKCtspq iItw== 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 y35si8589894edy.362.2021.01.18.21.15.48; Mon, 18 Jan 2021 21:16:11 -0800 (PST) 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 S2394171AbhARUHD (ORCPT + 99 others); Mon, 18 Jan 2021 15:07:03 -0500 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:47487 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394159AbhARUGL (ORCPT ); Mon, 18 Jan 2021 15:06:11 -0500 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1l1amH-001sJb-0B; Mon, 18 Jan 2021 21:05:28 +0100 Received: from p5b13a61e.dip0.t-ipconnect.de ([91.19.166.30] helo=[192.168.178.139]) by inpost2.zedat.fu-berlin.de (Exim 4.94) with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (envelope-from ) id 1l1amG-001eR9-7v; Mon, 18 Jan 2021 21:05:28 +0100 Subject: Re: [PATCH] sh: kernel: traps: remove unused variable To: Anders Roxell , ysato@users.sourceforge.jp, dalias@libc.org Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201210124422.3858524-1-anders.roxell@linaro.org> From: John Paul Adrian Glaubitz Message-ID: <0c036e4f-837c-c854-ef28-24cb55153a55@physik.fu-berlin.de> Date: Mon, 18 Jan 2021 21:05:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201210124422.3858524-1-anders.roxell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 91.19.166.30 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/20 1:44 PM, Anders Roxell wrote: > When building defconfig the following warning shows up: > > arch/sh/kernel/traps.c: In function 'nmi_trap_handler': > arch/sh/kernel/traps.c:183:15: warning: unused variable 'cpu' [-Wunused-variable] > unsigned int cpu = smp_processor_id(); > ^~~ > > Remove an unused variable 'cpu'. > > Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()") > Signed-off-by: Anders Roxell > --- > arch/sh/kernel/traps.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c > index f5beecdac693..e76b22157099 100644 > --- a/arch/sh/kernel/traps.c > +++ b/arch/sh/kernel/traps.c > @@ -180,7 +180,6 @@ static inline void arch_ftrace_nmi_exit(void) { } > > BUILD_TRAP_HANDLER(nmi) > { > - unsigned int cpu = smp_processor_id(); > TRAP_HANDLER_DECL; > > arch_ftrace_nmi_enter(); Good catch. Now I have one warning less when building the kernel for my SH-7785LCR ;-). Acked-by: John Paul Adrian Glaubitz -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaubitz@debian.org `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913