Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp424206ybl; Fri, 10 Jan 2020 00:48:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzKsfprEshPaVnHSzBKf4bYSHvZACslxBjoUVJtulxggQ+i5JsgaoPX5W06FU0QLkkgTFxh X-Received: by 2002:a05:6808:52:: with SMTP id v18mr1295039oic.152.1578646132466; Fri, 10 Jan 2020 00:48:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578646132; cv=none; d=google.com; s=arc-20160816; b=hKLy/jxC+tw1R4brXeQijNaIEyiGdbyk4m5BbNJR0TTSarW/DbKICcK4jwFzkk8C5w HJDpPrm2lsJmfZ4woPwTfLDE8DsUGQauWnD5blQXyx3ciJu/R0TuOlMwL4/w8i0pHkSp kbsKBa1BI30Kb3cpzfWCTWS9bwv+Gra1K5SMACiBevrG1LkJCv/z+i+3RtsuaHwnLmNm HBgRQnx/clw7l7XNyK3sAACrLv92X2UYE4BVoSadr0PBnp7JaNrL7aTU6yP2vlSZt7yg MR6qIwRBNRQI9RaJdBv4Nd8Zy0dYd1x4gX7e6D9mZTixEQDAZ4RNo7HYegSEteM1bHoc 9xgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gE41CI+UO29+oRSh0CE+A4Cy7VX9Ko+r2yjHEZQRQIw=; b=tC68FRkqoayJ6yYy355tv1L6E+9e7isTcxJDZPT+3/6AJwOwZ3+3Y/AzGVyn+DtI1+ I3lHwN/dCt1L4vGo9xn7GWQ2WOhKajdcxN/frvRknuyg010DNA33cLd6hYjuarfxnsg5 jy9ILM/fPqnfpY1Y/Cci1byF8xOcRKfkrKr0yaQYMtsKFn5+/5VIpCGiKfXWzpq/8aGA 0WqVmE/7DzQ0ZxkY98b3kw88CDze8YwpBLCSo2v36cEFFqGwtrTouwY4N3f2r+fV78PL dAfT/b8F5Mw58Kun5Nu3P6Tx7U7jeAELQa/yiw6XYC+OPdIaDVLIUCc8oe6i+faDKy9M AcNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="LBg/03wb"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 77si743524oie.10.2020.01.10.00.48.40; Fri, 10 Jan 2020 00:48:52 -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=@gmail.com header.s=20161025 header.b="LBg/03wb"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727189AbgAJIqf (ORCPT + 99 others); Fri, 10 Jan 2020 03:46:35 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34831 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727150AbgAJIqf (ORCPT ); Fri, 10 Jan 2020 03:46:35 -0500 Received: by mail-lj1-f194.google.com with SMTP id j1so1300027lja.2 for ; Fri, 10 Jan 2020 00:46:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gE41CI+UO29+oRSh0CE+A4Cy7VX9Ko+r2yjHEZQRQIw=; b=LBg/03wbU8KDXflVCoE8juUy0G/qXD24pxuCidV/FEYY/d8lfHd+QZBG47Rud3w99N v0pv58Bj7M8Njpq8BtrM5jQ02W3ZpsSvEYwe83ie/jYvIEUPz3uo8YY/5nD646MZKKAe GBjDbrq/08bKdk93vDhwMcxibL8ey5atFivZK+TJHCKSlPNSNN2jpElvzo5bwtZ2iBYp F/y5SIhXaxDbW71ysnVIu2LbJZmTNIb3yEPGYUxFcaEP6ctnur4dJa1tBBq7UAmIZP2q 1DSyVbsPJ7nvtGWY7nyzVEGnlIhQp4ooOYz8AFIav/RrObR1N2S+hdgwr6FXKBrzlXeA iGcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gE41CI+UO29+oRSh0CE+A4Cy7VX9Ko+r2yjHEZQRQIw=; b=I2tjwWpdnZdtEvclhES0tHaFa3ncLzTFWuC8m69Dr0pglY+kLnRkWXqTaPro5Z83FY X7srwMso+EG3Vd0+U8hcAwpzGehOHdfzPhWSZ0cN9a/70VgTD3XNpuuXXCqcrDqz3Rzy lHcHoYA0t0RupnQh8sqhRH6xQBBh45CmXL7DliSpSSlrrxjJQpd7WwgSeq6hLxcBuvR5 9733ADPPShpusUQ7tE4BAvEKikzXUK/urlb8Yx6CEd9gCCMvY+AriRwMqxlKO2gq1ONg QyHCzqzR1bp4yAJP6QwlXBo2TjjhmQvDS8xmkjyl9AharZBnl8v2AqD4PWPOacV7/6Ix AQBw== X-Gm-Message-State: APjAAAXXObAc/3khcbM1logdmUTxhiyv3n0AonTDTuU6diJumfatGz6m ZkOvzhKSnG0nCsPClhUg4pU1FO39Dy6XAi9p6Og= X-Received: by 2002:a05:651c:104:: with SMTP id a4mr1841938ljb.104.1578645993591; Fri, 10 Jan 2020 00:46:33 -0800 (PST) MIME-Version: 1.0 References: <20200103033929.4956-1-zhenzhong.duan@gmail.com> <874kx4bb1m.fsf@nanos.tec.linutronix.de> In-Reply-To: <874kx4bb1m.fsf@nanos.tec.linutronix.de> From: Zhenzhong Duan Date: Fri, 10 Jan 2020 16:46:21 +0800 Message-ID: Subject: Re: [PATCH v2] x86/boot/KASLR: Fix unused variable warning To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Chao Fan , Dave Hansen , "Rafael J. Wysocki" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 10, 2020 at 5:00 AM Thomas Gleixner wrote: > > Zhenzhong Duan writes: > > > Local variable 'i' is referenced only when CONFIG_MEMORY_HOTREMOVE and > > CONFIG_ACPI are defined, but definition of variable 'i' is out of guard= . > > If any of the two macros is undefined, below warning triggers during > > build, fix it by moving 'i' in the guard. > > > > arch/x86/boot/compressed/kaslr.c:698:6: warning: unused variable =E2=80= =98i=E2=80=99 [-Wunused-variable] > > > > Also use true/false instead of 1/0 for boolean return. > > No. This is not the scope of the unused variable issue. This want's to > be a separate patch. I'm trying to combine trivial changes into one, so you maintainers don't mind to pick two trivial patches? :) Regards Zhenzhong