From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751982AbdBMKhI (ORCPT ); Mon, 13 Feb 2017 05:37:08 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:38583 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbdBMKhH (ORCPT ); Mon, 13 Feb 2017 05:37:07 -0500 Date: Mon, 13 Feb 2017 11:37:03 +0100 (CET) From: Thomas Gleixner To: Marc Zyngier cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Christoffer Dall , Jason Cooper , Eric Auger Subject: Re: [RFC PATCH 17/33] irqchip/gic-v3-its: Add VLPI configuration hook In-Reply-To: <1484648454-21216-18-git-send-email-marc.zyngier@arm.com> Message-ID: References: <1484648454-21216-1-git-send-email-marc.zyngier@arm.com> <1484648454-21216-18-git-send-email-marc.zyngier@arm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Jan 2017, Marc Zyngier wrote: > +static int its_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info) > +{ > + struct its_device *its_dev = irq_data_get_irq_chip_data(d); > + struct its_cmd_info *info = vcpu_info; > + u32 event = its_get_event_id(d); > + > + /* Need a v4 ITS */ > + if (!its_dev->its->is_v4 || !info) > + return -EINVAL; > + > + switch (info->cmd_type) { > + case MAP_VLPI: > + { Looking at the later patches which add functionality here, I'd rather avoid these massive case { } blocks and stick the functionality into seperate helper functions. Thanks, tglx