Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp857188ybd; Wed, 26 Jun 2019 07:09:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxafgbDVD7bRt6I8kGcV9LEvaP1xK8BHTV4O4iF12LY6reRX9jT4DJCfuHKdOOPQHz0ivI X-Received: by 2002:a63:1b66:: with SMTP id b38mr3192099pgm.54.1561558169762; Wed, 26 Jun 2019 07:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561558169; cv=none; d=google.com; s=arc-20160816; b=aUIkyVv+VU+Dk8vMXGiI415hV40+nrifiBLV28bf/wpg6T53/gsE/om+YRsvHXIauB WwZoKOPNmioO0qoaUG1wvmoqlW/ojE3UN/N6/GzD3niYEiTHpinIqnnp3EOjQ7jA1WWT b0Wze9BVsNEzXNNDXKdRSCQoSIfvLfpqpiErwiLTeVlZ9m3jgJXeaj0KzEoVKEYoTm8v pFNJe3QlsJl/eWmewit+x3/du7W1Dhx5dvOKWnUGEcLg+L30fVu+WJ1DPuhwzTS4JjCF 0CF0SHlPpWm+MHQyM/kkie+zP0BkEOcjOqXh+nTn0Pvd7ulY8CIWPme/sjaym6xwMQDj 2nAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=nrf4YhrjU86Fm8glLH2+q0CeNX8zUFQc6avfpF5+lC0=; b=Z9/DD74AlQGscov+PSkZ9sqdF4o359/6yzN+898MFgdEeLD6nRSzGYl+POIYgzXQdo Rr5W/XUEmlYx176nYu4J+TqORRjRITjzHeQNzRs8We6eQASdyMXFXW1lzGfyGgQImx+/ HW2HzIvednCyCjH/42kVvwckXGpdd7DeJzPAM5jvUcr9H5bIi6jXwWH9cl863OPWvRjG 3Ex5uV+Z/9giSOCM8h9Qsyc94ZQUCcuQNA8HWShasHvG57RfVYndWPatJnH0WL1/Pdoe oWLXp1dHP8eo2ZnDtRo/tbP8jGm4tng64+DtmINfDS+3/fx2qr3oZYNymH7/Re2Cw1J7 7Fsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=P0cWMohr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si10199645pge.279.2019.06.26.07.09.12; Wed, 26 Jun 2019 07:09:29 -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; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=P0cWMohr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727641AbfFZOIW (ORCPT + 99 others); Wed, 26 Jun 2019 10:08:22 -0400 Received: from terminus.zytor.com ([198.137.202.136]:41987 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfFZOIW (ORCPT ); Wed, 26 Jun 2019 10:08:22 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x5QE79ek4135902 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 26 Jun 2019 07:07:09 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x5QE79ek4135902 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019061801; t=1561558030; bh=nrf4YhrjU86Fm8glLH2+q0CeNX8zUFQc6avfpF5+lC0=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=P0cWMohrhKOZQOuEz3it1JZkqVsMSRoHdmZF6SS6CAaEaYTEgTV12MK/+Wl9r+xmZ jmjv96oZHYGxFkNYNnDttIRmKNd4guIkmzrInedU9zpUiGhPqMIsg4lkatJER1MzJ/ uQoyj5W9fH83Bh3rRyRs+twG/9RjtUlf08UrIJ5XZMQ1H9CSlPB8rSoVoDL5U5DeXz 3xf0J8/jVvp1QIP6HoHPGNxR/PPtt9mWZIiNXuytU8trPt5KsHGfDcOiImLG1z3NVO 4EZmilcOYDbp5Zm3pHASmS3TCAj9QGzvrWq2nl95B8oYdZYjuKa9CSPNC5Ku916NOc cdp5BAxk54OUQ== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x5QE78sN4135892; Wed, 26 Jun 2019 07:07:08 -0700 Date: Wed, 26 Jun 2019 07:07:08 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Tiezhu Yang Message-ID: Cc: mingo@kernel.org, tglx@linutronix.de, dyoung@redhat.com, kernelpatch@126.com, vgoyal@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com Reply-To: hpa@zytor.com, linux-kernel@vger.kernel.org, vgoyal@redhat.com, tglx@linutronix.de, kernelpatch@126.com, dyoung@redhat.com, mingo@kernel.org In-Reply-To: <117ef0c6.3d30.16b87c9cfbf.Coremail.kernelpatch@126.com> References: <117ef0c6.3d30.16b87c9cfbf.Coremail.kernelpatch@126.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cleanups] x86/kexec: Make variable static and config dependent Git-Commit-ID: 53b7607382b0b99d6ae1ef5b1b0fa042b00ac7f4 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=2.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_12_24,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, DKIM_VALID_EF,FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 53b7607382b0b99d6ae1ef5b1b0fa042b00ac7f4 Gitweb: https://git.kernel.org/tip/53b7607382b0b99d6ae1ef5b1b0fa042b00ac7f4 Author: Tiezhu Yang AuthorDate: Mon, 24 Jun 2019 12:41:18 +0800 Committer: Thomas Gleixner CommitDate: Wed, 26 Jun 2019 16:02:45 +0200 x86/kexec: Make variable static and config dependent The following sparse warning is emitted: arch/x86/kernel/crash.c:59:15: warning: symbol 'crash_zero_bytes' was not declared. Should it be static? The variable is only used in this compilation unit, but it is also only used when CONFIG_KEXEC_FILE is enabled. Just making it static would result in a 'defined but not used' warning for CONFIG_KEXEC_FILE=n. Make it static and move it into the existing CONFIG_KEXEC_FILE section. [ tglx: Massaged changelog and moved it into the existing ifdef ] Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call") Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Gleixner Acked-by: Dave Young Cc: bp@alien8.de Cc: hpa@zytor.com Cc: kexec@lists.infradead.org Cc: vgoyal@redhat.com Cc: Vivek Goyal Link: https://lkml.kernel.org/r/117ef0c6.3d30.16b87c9cfbf.Coremail.kernelpatch@126.com --- 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 576b2e1bfc12..27157d66f807 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -56,7 +56,6 @@ 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; static inline void cpu_crash_vmclear_loaded_vmcss(void) { @@ -181,6 +180,9 @@ void native_machine_crash_shutdown(struct pt_regs *regs) } #ifdef CONFIG_KEXEC_FILE + +static unsigned long crash_zero_bytes; + static int get_nr_ram_ranges_callback(struct resource *res, void *arg) { unsigned int *nr_ranges = arg;