From: Paolo Bonzini Subject: Re: [PATCH 08/23] xen: statically initialize cpu_evtchn_mask_p Date: Mon, 24 Jan 2011 18:44:10 +0100 Message-ID: <4D3DBA6A.3080700@redhat.com> References: <1286898271-32018-1-git-send-email-konrad.wilk@oracle.com> <1286898271-32018-9-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1286898271-32018-9-git-send-email-konrad.wilk@oracle.com> Sender: linux-kernel-owner@vger.kernel.org To: Konrad Rzeszutek Wilk Cc: linux-kernel@vger.kernel.org, Jan Beulich , xen-devel@lists.xensource.com, Jeremy Fitzhardinge , Konrad Rzeszutek Wilk , Stefano Stabellini , Jeremy Fitzhardinge List-Id: xen-devel@lists.xenproject.org On 10/12/2010 05:44 PM, Konrad Rzeszutek Wilk wrote: > -static struct cpu_evtchn_s *cpu_evtchn_mask_p; > + > +static __initdata struct cpu_evtchn_s init_evtchn_mask = { > + .bits[0 ... (NR_EVENT_CHANNELS/BITS_PER_LONG)-1] = ~0ul, > +}; > +static struct cpu_evtchn_s *cpu_evtchn_mask_p =&init_evtchn_mask; > + > static inline unsigned long *cpu_evtchn_mask(int cpu) > { > return cpu_evtchn_mask_p[cpu].bits; This causes a modpost warning: WARNING: drivers/xen/built-in.o(.data+0x0): Section mismatch in reference from the variable cpu_evtchn_mask_p to the variable .init.data:init_evtchn_mask The variable cpu_evtchn_mask_p references the variable __initdata init_evtchn_mask If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, This is harmless, the variable is initialized to non-init data in an __init function. The added noise is ugly, though. Paolo