Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp463882ybl; Fri, 24 Jan 2020 03:44:38 -0800 (PST) X-Google-Smtp-Source: APXvYqxXmqT/GUI9YBNX7kfdJ+fc6P3y87JYOdmJMaMQCJIf8tiwx+1OAWhFYyry+8jAG62JXVQg X-Received: by 2002:aca:ab0e:: with SMTP id u14mr1731742oie.1.1579866278582; Fri, 24 Jan 2020 03:44:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579866278; cv=none; d=google.com; s=arc-20160816; b=fSWyM0auRY2VPzZmGAQjgkypDatKpEsDYc9wPc7+2ZTcuN21DygJL78w4shhqvA0Px MnJEq3CJmCtidYTsto8nBE/Ok5Zx9bfKPFb0RzYovPnkulvPI04VHFgSZchgyw7/vy2n bBTvOfoKhmQkHIv1ACgq9J/CzxuqA1X/Z+Zdo5CuHaZG+Qyv/0ot0CAgaEkf81UfbdEB B7c2F70pWtbZNFC3vLYZrWAKNWL8s4baxPp4KGSpsj44Tslx1itW13H2OFoZ6/nMLCEe oMcMqWoTxiG7gYTwalKA4MBvbje0gFO0xHvSXTQZJXwAVF6RNGyblzA3eB4lCVJJ1MfC dSBg== 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:dkim-signature; bh=6QRUD1yaQPUyr/7NjvJ/XUfSTFPMJPOv0k6vx6QEWoc=; b=EouQRmXiVhqJE0htXwFU8yNKb0t1ZebhmmTwmXqXEITNjI+fQagJcbH/9cT2DeMuXb kR+dchCk2KvAcrE8aXQmn0cORl0VODypbg9dUG5XKIK0unoklqADWJpRRb+dnqVzhPHy p6YzGgRXmaEsCRrC6liMFLxi1vTeRFuvePvUuRnjumAZLMh9FP4SaDvJVU6TLjsp7rIy glBiavEIUJFywmQTL9xAfyF19XpRs53Fke5RJrXdLu1CwcfdR/Pr5ydsXJ0Sdd8M28BA GbMjpQjSizdKivLHAvwFT461MLrAmP1vxBs1ZN5+HdAjehr2Sn+CAzQl9Ms8KTeFWiPw UlbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=juHgfbyB; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si2766383otf.84.2020.01.24.03.44.27; Fri, 24 Jan 2020 03:44:38 -0800 (PST) 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=@alien8.de header.s=dkim header.b=juHgfbyB; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392075AbgAXLnU (ORCPT + 99 others); Fri, 24 Jan 2020 06:43:20 -0500 Received: from mail.skyhub.de ([5.9.137.197]:52392 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729188AbgAXLJR (ORCPT ); Fri, 24 Jan 2020 06:09:17 -0500 Received: from zn.tnic (p200300EC2F0C660015FB9CFA6160A1DF.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:6600:15fb:9cfa:6160:a1df]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C8E7C1EC01AD; Fri, 24 Jan 2020 12:09:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1579864155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6QRUD1yaQPUyr/7NjvJ/XUfSTFPMJPOv0k6vx6QEWoc=; b=juHgfbyBv6GNjVGcVsiCuy9UpEKTuJZtjrsYhHhQg6tgWxXmh+bNxx6vQ5M8Sd/VOYaL3M qEj6M7CH3e1U5Jnno9DLQ0mtUp7Pbk8DDQ3M5HOi+HqPW+Q2IbTBh5rTUgLoSBqwddgdtY rCWyijhJg8BiUJDxvTZeZIC84P/4cv4= Date: Fri, 24 Jan 2020 12:09:07 +0100 From: Borislav Petkov To: Zhenzhong Duan Cc: Arvind Sankar , linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Dave Hansen , "Rafael J. Wysocki" Subject: Re: [PATCH v2] x86/boot/KASLR: Fix unused variable warning Message-ID: <20200124110907.GA6750@zn.tnic> References: <20200103033929.4956-1-zhenzhong.duan@gmail.com> <20200109184055.GI5603@zn.tnic> <20200109204638.GA523773@rani.riverdale.lan> <20200110090032.GB19453@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 13, 2020 at 10:43:14AM +0800, Zhenzhong Duan wrote: > Just tried Arvind's patch, result is not that bad. Below are all > warnings during build: > In fact, only gop.c and kaslr.c have compile warning. gop.c is not part of arch/x86/boot/compressed/ So I'd take a patch adding -Wunused to arch/x86/boot/compressed/Makefile and fixing the single warning in kaslr.c The extrawarn W=1 stuff gives a lot more (below) and there I guess I'd take only well thought out patches, each fixing all -Wmissing-prototypes in a single compilation unit. In file included from arch/x86/boot/compressed/string.c:11: arch/x86/boot/compressed/../string.c:43:5: warning: no previous prototype for ‘bcmp’ [-Wmissing-prototypes] arch/x86/boot/compressed/../string.c:146:6: warning: no previous prototype for ‘simple_strtol’ [-Wmissing-prototypes] arch/x86/boot/compressed/string.c:53:7: warning: no previous prototype for ‘memmove’ [-Wmissing-prototypes] In file included from arch/x86/boot/compressed/string.c:11: arch/x86/boot/compressed/../string.c:43:5: warning: no previous prototype for ‘bcmp’ [-Wmissing-prototypes] arch/x86/boot/compressed/../string.c:146:6: warning: no previous prototype for ‘simple_strtol’ [-Wmissing-prototypes] arch/x86/boot/compressed/string.c:53:7: warning: no previous prototype for ‘memmove’ [-Wmissing-prototypes] In file included from arch/x86/boot/compressed/cmdline.c:14: arch/x86/boot/compressed/../cmdline.c:28:5: warning: no previous prototype for ‘__cmdline_find_option’ [-Wmissing-prototypes] arch/x86/boot/compressed/../cmdline.c:100:5: warning: no previous prototype for ‘__cmdline_find_option_bool’ [-Wmissing-prototypes] arch/x86/boot/compressed/cmdline.c:15:15: warning: no previous prototype for ‘get_cmd_line_ptr’ [-Wmissing-prototypes] arch/x86/boot/compressed/eboot.c:26:28: warning: no previous prototype for ‘efi_system_table’ [-Wmissing-prototypes] arch/x86/boot/compressed/eboot.c:318:6: warning: no previous prototype for ‘setup_graphics’ [-Wmissing-prototypes] arch/x86/boot/compressed/eboot.c:357:23: warning: no previous prototype for ‘efi_pe_entry’ [-Wmissing-prototypes] arch/x86/boot/compressed/pgtable_64.c:110:22: warning: no previous prototype for ‘paging_prepare’ [-Wmissing-prototypes] arch/x86/boot/compressed/pgtable_64.c:193:6: warning: no previous prototype for ‘cleanup_trampoline’ [-Wmissing-prototypes] arch/x86/boot/compressed/eboot.c:711:21: warning: no previous prototype for ‘efi_main’ [-Wmissing-prototypes] arch/x86/boot/compressed/misc.c:340:28: warning: no previous prototype for ‘extract_kernel’ [-Wmissing-prototypes] ... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette