From patchwork Tue Sep 12 20:08:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 112388 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp41515qgf; Tue, 12 Sep 2017 13:08:51 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDWBl0bhzDfaPs9MkILSQ2PgKpI0sbOT7aHajUnycdgx7VKVbk6gPtSnK6fgNY4nuD87+mS X-Received: by 10.107.47.168 with SMTP id v40mr24178281iov.56.1505246931212; Tue, 12 Sep 2017 13:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505246931; cv=none; d=google.com; s=arc-20160816; b=eQtyzvArhiXHluejKC+SvyZhg0m4odBgPEXbnYZhhTFX55QJIjtbtMzALlYyssg6un meDOTZrrR8xBcBXBL//8tD2d7Od9zNfHvCjMsrzOmNBWcruPGbxNjilruud07YvzsdM1 8GcFAzXHX/JzaPTHNVw+LFbRODeiU3/PHWgJFiyoiR/1HsiW/PcMSHqzNS0621HAgNI9 t0t3GDHGdhi42f7mgxhUVc9ydl7YXYxk10HKHAM/brIpSZ9w0llv4qjGs76c9TclJ7dD T58tOtkoLKYTLEb3mB2GgMJMOjOlo7FteadZu22TeTh50r6a/vL3OgM0LXMUNqiXmpXR HgEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=BG5v72Z//8dLjk2j3rc3zCLnqeDGIJdEE+n527yIyM8=; b=NnZwt17jGgt9RmlDtT2NJYYaA1BJtkNrHpGZO62uCZlcIFB0iu+znIYqYKV98gaeXV IXx4m23ywVknJfziyJzhqaZ3qOdQx1uhH0kbTM0IH6gguX0+doBbFywFDsThYmAyqdyp hm7S5Emwrg5/X3S8dxjGwRZKuKwGRIU14mghd91B9W9CbWAVFcRjNc8+uiyIrxj8LpqW h9/uiUp81fZBfC0jo1BPhrUqxpoHuGX9O4QStwWNyXv4yTyNQL2iIqqJ/YpJiC5uleMj JfUW4gTsl9Fi5togY0CNCshAijVL6p5IS2Du4h8eYAUQkrtRUcjV04og0V9qVQnX2Ktn Xsbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c203si11009417iof.171.2017.09.12.13.08.50; Tue, 12 Sep 2017 13:08:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751542AbdILUIs (ORCPT + 26 others); Tue, 12 Sep 2017 16:08:48 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:54712 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949AbdILUIr (ORCPT ); Tue, 12 Sep 2017 16:08:47 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lyh7L-1dP8ZJ0FiJ-0168cI; Tue, 12 Sep 2017 22:08:34 +0200 From: Arnd Bergmann To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Arnd Bergmann , Eric Auger , linux-kernel@vger.kernel.org Subject: [PATCH] irqchip/gic-v4: fix building with ancient gcc Date: Tue, 12 Sep 2017 22:08:23 +0200 Message-Id: <20170912200832.3609124-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0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ender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc-4.5 and earlier don't like named initializers for anonymous union members: drivers/irqchip/irq-gic-v4.c: In function 'its_map_vlpi': drivers/irqchip/irq-gic-v4.c:176:3: error: unknown field 'map' specified in initializer drivers/irqchip/irq-gic-v4.c:176:3: error: missing braces around initializer drivers/irqchip/irq-gic-v4.c:176:3: error: (near initialization for 'info.') drivers/irqchip/irq-gic-v4.c: In function 'its_get_vlpi': drivers/irqchip/irq-gic-v4.c:192:3: error: unknown field 'map' specified in initializer drivers/irqchip/irq-gic-v4.c:192:3: error: missing braces around initializer drivers/irqchip/irq-gic-v4.c:192:3: error: (near initialization for 'info.') drivers/irqchip/irq-gic-v4.c: In function 'its_prop_update_vlpi': drivers/irqchip/irq-gic-v4.c:208:3: error: unknown field 'config' specified in initializer drivers/irqchip/irq-gic-v4.c:208:3: error: missing braces around initializer drivers/irqchip/irq-gic-v4.c:208:3: error: (near initialization for 'info.') drivers/irqchip/irq-gic-v4.c:208:3: error: initialization makes pointer from integer without a cast This is fairly easy to work around, by using extra curly braces. Signed-off-by: Arnd Bergmann --- drivers/irqchip/irq-gic-v4.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers/irqchip/irq-gic-v4.c index 2370e6d9e603..cd0bcc3b7e33 100644 --- a/drivers/irqchip/irq-gic-v4.c +++ b/drivers/irqchip/irq-gic-v4.c @@ -173,7 +173,9 @@ int its_map_vlpi(int irq, struct its_vlpi_map *map) { struct its_cmd_info info = { .cmd_type = MAP_VLPI, - .map = map, + { + .map = map, + }, }; /* @@ -189,7 +191,9 @@ int its_get_vlpi(int irq, struct its_vlpi_map *map) { struct its_cmd_info info = { .cmd_type = GET_VLPI, - .map = map, + { + .map = map, + }, }; return irq_set_vcpu_affinity(irq, &info); @@ -205,7 +209,9 @@ int its_prop_update_vlpi(int irq, u8 config, bool inv) { struct its_cmd_info info = { .cmd_type = inv ? PROP_UPDATE_AND_INV_VLPI : PROP_UPDATE_VLPI, - .config = config, + { + .config = config, + }, }; return irq_set_vcpu_affinity(irq, &info);