Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759063AbcCVLt0 (ORCPT ); Tue, 22 Mar 2016 07:49:26 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:34360 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758376AbcCVLtR (ORCPT ); Tue, 22 Mar 2016 07:49:17 -0400 MIME-Version: 1.0 In-Reply-To: <1458224359-32665-11-git-send-email-jonathanh@nvidia.com> References: <1458224359-32665-1-git-send-email-jonathanh@nvidia.com> <1458224359-32665-11-git-send-email-jonathanh@nvidia.com> Date: Tue, 22 Mar 2016 12:49:16 +0100 Message-ID: Subject: Re: [PATCH 10/15] irqchip/gic: Remove static irq_chip definition for eoimode1 From: Linus Walleij To: Jon Hunter Cc: Thomas Gleixner , Jason Cooper , Marc Zyngier , =?UTF-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Stephen Warren , Thierry Reding , Kevin Hilman , Geert Uytterhoeven , Grygorii Strashko , Lars-Peter Clausen , "linux-tegra@vger.kernel.org" , Linux-OMAP , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 887 Lines: 20 On Thu, Mar 17, 2016 at 3:19 PM, Jon Hunter wrote: > There are only 3 differences (not including the name) in the definitions > of the gic_chip and gic_eoimode1_chip structures. Instead of statically > defining the gic_eoimode1_chip structure, remove it and populate the > eoimode1 functions dynamically for the appropriate GIC irqchips. > > Signed-off-by: Jon Hunter > if (static_key_true(&supports_deactivate) && gic_nr == 0) { > - gic->chip = gic_eoimode1_chip; > + gic->chip.irq_mask = gic_eoimode1_mask_irq; > + gic->chip.irq_eoi = gic_eoimode1_eoi_irq; > + gic->chip.irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity; > + gic->chip.name = kasprintf(GFP_KERNEL, "GICv2"); I think you can just = "GICv2" there. No need to kasprintf() Yours, Linus Walleij