From patchwork Fri Feb 3 16:47:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9554695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7491F604A7 for ; Fri, 3 Feb 2017 16:48:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76A972808C for ; Fri, 3 Feb 2017 16:48:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69CAD28319; Fri, 3 Feb 2017 16:48:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 069972808C for ; Fri, 3 Feb 2017 16:48:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1AEF6EBB6; Fri, 3 Feb 2017 16:48:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1FD3E6EBB6 for ; Fri, 3 Feb 2017 16:48:04 +0000 (UTC) Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0LmiNA-1bx2sk35m0-00hAd9; Fri, 03 Feb 2017 17:47:58 +0100 From: Arnd Bergmann To: Alex Deucher Subject: [PATCH] drm/amdgpu: fix warning on older gcc releases Date: Fri, 3 Feb 2017 17:47:26 +0100 Message-Id: <20170203164756.3625272-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:Rk0qk35embrfZ1l2W4J2jQS7cN4YCmxFTGdJCMyYi18k8GHg+XL 34Bhl+yVIFjeL+Gs8/uW3iziRe3HCeA4hTTrR13Y5NA/11gD6uvD0Waisqu+W/HBr2S+g7Z 7jPy68m6zipGwoiVSQGBi8ESovRNFUtBUpNH6HbIcxn3elJcNqmErM4FAvzhoKronH1d777 vASLbVSY7w8iwSfeiEZTw== X-UI-Out-Filterresults: notjunk:1; V01:K0:kmjOvCZJxos=:2Ddr0mEVD/8cpLR3Qngmth r0uXqkEUmuG0foFROVVGM/UEx8CugcU0SlFgY0KaqpZU5GPU/A2KC/nAj2MGsAnGumAJM1Rdb nHtl3ntJT5GKtrLVSaYwRPLrL9rP2WOh/TYZtJZ9By6XSVvVI2Czy5OISFZMKyaHOF9RUuuDL AZcPXjxoSRSbc90ukASNd4cuhikqt30AFexhG1N+PsUzdD8ctkM+k6CjuSY2Q3k8+TUSI7as3 11rEEfSEY/aKcmxV7Z4OG5X/v9d2GoQL6n58cuXipgnUer1ikUjK/3RDmhxy8kGLxf7PrhtH8 SSucLKoa6OH1agypUmtA8heoeXGaXAz3gpqbWvBonJaZRVNuO3nZGAHdd1gZldXCqvgT/qQls YdQZqmeXLQZ3btzzs0ondfITaJ1fV0CovEm/W7xeU2c7B8UD4JoE6EmSnqbd4gCh3IsSKo4fE FMdxKrln19iV5BsLWXOEmG9Cl727wtnld/5EUSVAg5d8CjsFj1dVRrC548ssJ+BygxkCvyrrf /oX0O7855EmWoZAoF9HK2xTMRCga9rwBhsVIBVMjEZp8y+8N4ogbMOqv9LX6qm+1tcLzzugD1 0Vi4ZbvxdbOhiyMQVVM+gRO4wxV7+yjcb8N2d7dyhwbaypcH4SLtFX9MPDE8vLuaWcPwzcyfR GMf1jCLeuaPxw1Y4+RHwGpDAYsg7NcZnB9bNxuZyz9mdbj5dKqHZYUvHcdn5+JoSUslpLInT+ UJGYQnw5sPaVt9Cq Cc: Tom St Denis , Arnd Bergmann , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Rex Zhu , =?UTF-8?q?Christian=20K=C3=B6nig?= , Monk Liu X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP gcc-4.8 warns about '{0}' being used an an initializer for nested structures: drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function ‘gfx_v8_0_ring_emit_ce_meta_init’: drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:7263:2: warning: missing braces around initializer [-Wmissing-braces] } ce_payload = {0}; drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function ‘gfx_v8_0_ring_emit_de_meta_init’: drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:7290:2: warning: missing braces around initializer [-Wmissing-braces] } de_payload = {0}; Using an empty {} initializer however has the same effect and works on all versions. Fixes: acad2b2a7b70 ("drm/amdgpu:implement CE/DE meta-init routines") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 35f9cd83b821..cf1cb406b5ed 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -7260,7 +7260,7 @@ static void gfx_v8_0_ring_emit_ce_meta_init(struct amdgpu_ring *ring, uint64_t c static union { struct amdgpu_ce_ib_state regular; struct amdgpu_ce_ib_state_chained_ib chained; - } ce_payload = {0}; + } ce_payload = {}; if (ring->adev->virt.chained_ib_support) { ce_payload_addr = csa_addr + offsetof(struct amdgpu_gfx_meta_data_chained_ib, ce_payload); @@ -7287,7 +7287,7 @@ static void gfx_v8_0_ring_emit_de_meta_init(struct amdgpu_ring *ring, uint64_t c static union { struct amdgpu_de_ib_state regular; struct amdgpu_de_ib_state_chained_ib chained; - } de_payload = {0}; + } de_payload = {}; gds_addr = csa_addr + 4096; if (ring->adev->virt.chained_ib_support) {