Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6382173pxb; Mon, 8 Nov 2021 07:44:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpgh9U5aJgfW844QG3MNuhOVKsAuehr7XgxU1UoVwcPqIxVsgcmauK37DrJYFFbHbY+cSd X-Received: by 2002:a5d:9e04:: with SMTP id h4mr82537ioh.192.1636386273066; Mon, 08 Nov 2021 07:44:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636386273; cv=none; d=google.com; s=arc-20160816; b=M2r5XDKQZMaMS2D53gTrEFswKPyNjrRtYBwa4JYrb/KUgC8NZoPCRNdguk172djQwm 939zJG+OErsJvIGxVSTctHV9rkoJiw+/T6uXcGqkohdFVkgsK6ovhZYnLa+RyXh5d59v Ku03nzKXVZ4q9g+TPhXFCYj8EVKoMhuMRJKURc16E7PN/CZnv+U0md3Dh4a42I3/xD6D A0UU+aiiMeaPM2/2/h2lD/TL8fzgv0qddAylfejTHAVgABzQ5ub0iwg7YmiVl10IDT0c aj+ujBi6tYLoJ/KkAS7PZAXuo7ijlAz9fvPXT7Ed76AFFsil0s47zyga9NMdbTmAcLge ixiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WIqR4FVZE3ATQLzA7mh2CRlNTslT8SyWcCr8U5IQzXA=; b=Si3Ai89WPq11e5pSebjTTrzxbXahSqxMtPMt7aUkG98T0J9KcV/fxOBN6csxOUFSg4 vSJKpRqk7seMJOZthRdR8p7D/MCV6AfC0YIU28iY0odrICm9/t6BTy5LLOMiD3TVxn/B 5hpWa9mFKkkEpw4u4615yQIxtrk7Zl31YVXthvrPqZpz9acswYLtgcPR6qZJBf0efNz/ Po0/z93BycnWZ2A6QnbaadS1H2+obIT0+AqLu/BognVT7Aqhd+evVG+NOjm2KcKp5Ydc kT9frhAd6+ShpCX7pgnZGIWAsls5oQ1fx7O+2RwEDU+LRm5r+8DkbwuSoR/6/gnVl8DZ dC8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k61D9dl1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si36852009jat.22.2021.11.08.07.44.20; Mon, 08 Nov 2021 07:44:33 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k61D9dl1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236600AbhKHLRR (ORCPT + 99 others); Mon, 8 Nov 2021 06:17:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:54212 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239149AbhKHLQ6 (ORCPT ); Mon, 8 Nov 2021 06:16:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 396CF61359; Mon, 8 Nov 2021 11:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636370054; bh=v5kymqxyKmvAvPMLG99lLZzehfZMcI+K0hdQmyDJDP0=; h=From:To:Cc:Subject:Date:From; b=k61D9dl1CO6u+IxOeGYlKSKxTPYQAHbbqLThEby8SfhBMX0ageW4wKX/P496Gv/Jd teRPGeONVdfzR25diD0r0h8E1sSkXICTuaYPb7F+hNm9fByD/+JKZIH1mcUlRaZbRH PH/LNDgD+0JggPn4ItGI5hZC9L5NWDe8q2YtV2HAHE/4pUapd3MY4T+J3kPzgMCl20 0TblZ0t5MKBV4T2HP68As1A+1GzJxH5AlcvoTl0HIelh3PkWzWIGi1n5ma61p5mt5Y X4pl1cQne52cLmAd/Ulya4DMIO2GFMvXj1VwjHBG6qLo2pPbciPsui3/SLTs8iQVAc QkvnyI+vmbkNg== From: Arnd Bergmann To: Boris Ostrovsky , Juergen Gross Cc: Arnd Bergmann , Stefano Stabellini , Oscar Salvador , Pankaj Gupta , Andrew Morton , David Hildenbrand , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH] xen/balloon: fix unused-variable warning Date: Mon, 8 Nov 2021 12:14:02 +0100 Message-Id: <20211108111408.3940366-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann In configurations with CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=n and CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y, gcc warns about an unused variable: drivers/xen/balloon.c:83:12: error: 'xen_hotplug_unpopulated' defined but not used [-Werror=unused-variable] Since this is always zero when CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is disabled, turn it into a preprocessor constant in that case. Fixes: 121f2faca2c0 ("xen/balloon: rename alloc/free_xenballooned_pages") Signed-off-by: Arnd Bergmann --- drivers/xen/balloon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index ad9ba1e97450..ba2ea11e0d3d 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -80,9 +80,8 @@ static uint __read_mostly balloon_boot_timeout = 180; module_param(balloon_boot_timeout, uint, 0444); -static int xen_hotplug_unpopulated; - #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG +static int xen_hotplug_unpopulated; static struct ctl_table balloon_table[] = { { @@ -115,6 +114,8 @@ static struct ctl_table xen_root[] = { { } }; +#else +#define xen_hotplug_unpopulated 0 #endif /* -- 2.29.2