From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederico Cadete Subject: Re: [PATCH 2] xmem/tmem: fix 'undefined variable' build error. Date: Tue, 28 May 2013 16:39:33 +0200 Message-ID: <20130528143933.GA6597@qspin.be> References: <20130525204842.GA8844@gmail.com> <20130528135321.GH724@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20130528135321.GH724@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, May 28, 2013 at 09:53:21AM -0400, Konrad Rzeszutek Wilk wrote: > You are missing an Signed-off-by here. Are you OK affixing it here? > Sorry, my bad. And checkpatch warned me about that... A fixed version of the patch follows below. Thanks for being so patient. Regards, Frederico From: Frederico Cadete Date: Tue, 28 May 2013 16:19:49 +0200 Subject: [PATCH 2] xmem/tmem: fix 'undefined variable' build error. In the (not so useful) kernel configuration where CONFIG_SWAP is undefined and CONFIG_XEN_SELFBALLOONING is defined, xen_tmem_init would use undefined variable 'static bool frontswap'. Added #else to have #define frontswap (0) in the case where CONFIG_FRONTSWAP is not defined. Signed-off-by: Frederico Cadete --- drivers/xen/tmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index 18e8bd8..cc072c6 100644 --- a/drivers/xen/tmem.c +++ b/drivers/xen/tmem.c @@ -41,6 +41,8 @@ module_param(selfballooning, bool, S_IRUGO); #ifdef CONFIG_FRONTSWAP static bool frontswap __read_mostly = true; module_param(frontswap, bool, S_IRUGO); +#else /* CONFIG_FRONTSWAP */ +#define frontswap (0) #endif /* CONFIG_FRONTSWAP */ #ifdef CONFIG_XEN_SELFBALLOONING -- 1.7.9.5