From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3] xen/keyhandler: Rework keyhandler infrastructure Date: Thu, 24 Sep 2015 12:47:58 +0100 Message-ID: <5603E2EE.6040804@citrix.com> References: <1443092706-29270-1-git-send-email-andrew.cooper3@citrix.com> <5603FE9A02000078000A5430@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5603FE9A02000078000A5430@prv-mh.provo.novell.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: Jan Beulich Cc: Keir Fraser , Xen-devel List-Id: xen-devel@lists.xenproject.org On 24/09/15 12:46, Jan Beulich wrote: >>>> On 24.09.15 at 13:05, wrote: >> +static struct keyhandler { >> + union { >> + keyhandler_fn_t *fn; >> + irq_keyhandler_fn_t *irq_fn; >> + }; >> + >> + const char *desc; /* Description for help message. */ >> + bool_t irq_callback, /* Call in irq context? if not, tasklet context. */ >> + diagnostic; /* Include in 'dump all' handler. */ >> +} key_table[128] __read_mostly = >> +{ >> +#define KEYHANDLER(k, f, desc, diag) \ >> + [k] = { .fn = (f), desc, 0, diag } >> + >> +#define IRQ_KEYHANDLER(k, f, desc, diag) \ >> + [k] = { .irq_fn = (f), desc, 1, diag } > I'm sorry for noticing only now, but I'm afraid these (looking as > odd - but correct - as the other ones did) won't build with older > gcc either. Urgh yes. I think we might have to just explicitly typecast the pointer, because .irq_fn is uninitialised in older GCC. Would that be ok? ~Andrew