Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1867153ybd; Sun, 23 Jun 2019 18:45:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq3ns2Vst+fzukAwCXQ5xOGfUeHeTJdK/zaykX9AqW/yYlZKaobJ12e++K8R2w0aV4js3B X-Received: by 2002:a63:d756:: with SMTP id w22mr23129368pgi.156.1561340706068; Sun, 23 Jun 2019 18:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561340706; cv=none; d=google.com; s=arc-20160816; b=tBdqsJ7+CfSmUbeN9k1Kq1tJvHPJgAss5h/8IpO3Czh7r4NNTiRpH4Uu7Fn52Pocjx kYJ/OV8SVnG1N311z/kwM6qyrFIAweDZ71vnDhM+kq7YNENCqqTQORODbX9mhP/Vtuvb uFNllNhen97cwHi+1zuwj5aBEBk36k1QTT2kpbRC3hj5NYEJr+lp9cyy9OXnfIpY3OYH BcDQFd+tL56gbLeBGcWCuwhUDWvD2/lrilXqhMaUgPPGiu7yo9kFMkcPkLdh6qy72/PP DoZ+BJTXQaUJSwAEZ5wTEpJniYktrVqo2JJGRsXry5SLZLh1WU+tCSgoxm0MHt9g7CCz C5mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ZlPwg89aeZlsnPgkE6vcWwuhxWt9w6WLxSdnps+0WXE=; b=BdRNsjmSzvBUase+vCnp9OMepnp/rqOhSCuZCxbvj2bc4qHSumxYtObxsVITDzQgyI OH49lCdAt89Z0XEbd5PbemaNZhKZxN4fXoK4x1ZGmRTooxz3lyxe73nunfe4Ea01bD+Y SzROnwg+AlTZgDidPCP+FSlVu51epCAY4LZkpKG26OiEf0Z5gQgYwOOJaXjZhFHl83XP Mq8Dav9k3flLrjolxDLFgv0KB1dMQJIMeTMN+mXHDGOEFvnFSkqaGu1AqH/tlEuW3pRp j01hDrwExXAkpelHzyfzJ7xAusUVHrQ4f1beDBhPxJxosfqO8bxdKX6buR3qvvUcz1q8 /vog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 39si8843846pla.73.2019.06.23.18.44.50; Sun, 23 Jun 2019 18:45:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727051AbfFXBme (ORCPT + 99 others); Sun, 23 Jun 2019 21:42:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40568 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726961AbfFXBmR (ORCPT ); Sun, 23 Jun 2019 21:42:17 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C6643082A24; Mon, 24 Jun 2019 01:35:33 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-23.pek2.redhat.com [10.72.12.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BBBF600C4; Mon, 24 Jun 2019 01:35:29 +0000 (UTC) Date: Mon, 24 Jun 2019 09:35:20 +0800 From: Dave Young To: Tiezhu Yang Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, vgoyal@redhat.com Subject: Re: [PATCH v2] kexec: fix warnig of crash_zero_bytes in crash.c Message-ID: <20190624013520.GA2976@dhcp-128-65.nay.redhat.com> References: <43d6fe3a.18e.16b814a09ba.Coremail.kernelpatch@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <43d6fe3a.18e.16b814a09ba.Coremail.kernelpatch@126.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 24 Jun 2019 01:35:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/23/19 at 06:24am, Tiezhu Yang wrote: > Fix the following sparse warning: > > arch/x86/kernel/crash.c:59:15: > warning: symbol 'crash_zero_bytes' was not declared. Should it be static? > > First, make crash_zero_bytes static. In addition, crash_zero_bytes > is used when CONFIG_KEXEC_FILE is set, so make it only available > under CONFIG_KEXEC_FILE. Otherwise, if CONFIG_KEXEC_FILE is not set, > the following warning will appear when make crash_zero_bytes static: > > arch/x86/kernel/crash.c:59:22: > warning: ‘crash_zero_bytes’ defined but not used [-Wunused-variable] > > Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call") > Signed-off-by: Tiezhu Yang > Cc: Vivek Goyal > --- > arch/x86/kernel/crash.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c > index 576b2e1..f13480e 100644 > --- a/arch/x86/kernel/crash.c > +++ b/arch/x86/kernel/crash.c > @@ -56,7 +56,9 @@ struct crash_memmap_data { > */ > crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss = NULL; > EXPORT_SYMBOL_GPL(crash_vmclear_loaded_vmcss); > -unsigned long crash_zero_bytes; > +#ifdef CONFIG_KEXEC_FILE > +static unsigned long crash_zero_bytes; > +#endif > > static inline void cpu_crash_vmclear_loaded_vmcss(void) > { > -- > 1.8.3.1 Acked-by: Dave Young Thanks Dave