Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3584703rwe; Mon, 29 Aug 2022 15:10:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Q//DeFqlaNx/c8Sqsg7U0fdXTJPK1jDFTh7LRkhUKBbesdJ8VI0dpdPJHXMJJgRvjFihx X-Received: by 2002:a17:907:868d:b0:730:f0ba:6328 with SMTP id qa13-20020a170907868d00b00730f0ba6328mr15293207ejc.444.1661811029863; Mon, 29 Aug 2022 15:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661811029; cv=none; d=google.com; s=arc-20160816; b=JbuL0Xcbr5qR1MOjIUYW8VtktJ2LkmSml/l011fPDPQ1nLM93vzJFMGsGAdX7T1Gok Ygi+jRo3WX5UHU9KpjP5qSob2O9/zmHP4RGZ/9NCzXJ2+ehc2rrehqcNELyUzCMB2HI2 SCAqran33NE94IHuuK04fvc2hpTkyWO/IA44wHCfkhGfkwn6US3mDQrcNOHqqVfBtoxs kvEvAUkn4b9tPvVqz83mrkvuoO7W4N247W3qji4ausPd5IFxFzqWRMwVDVVVTgwRasmV 6B0Bnn6lXjfFZjOi66qI7NGwaJW8mKVq60fCcNSk/M+6up+JRroJ1B5WadAY3309IZd8 o89g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=2xTvC9CJWBqoQsWWsgwbAmOvGON6wD5OEVYvmxX2YyA=; b=vqohcMZIQpHPh/XhSbv5ZYVNcgUE6J4s4PXGwe00yqFTe/AFZiaPn9nwwcAWNX7iDd rKa4iZepcWQ40FOLpkFQ/41G0BHQ8uAgWe0mgUhEU9nFBJhBUpIpRnIxyn4d06RF5DPI LnvhknZHWUjrRfPhhKTNSfeKvOV2Ei6z8d38/rv/lgl6hX57WRBSo+HTLMUElDGbYpwV sCK9GyqogRW5PYuOthhLMiPoPzRXnr8rnnc/3JsBNfR7T4L/ZTvTGHAzUX9gTvZ9Gf60 4+XdplYUQ+KhAGgFU5zx2fG9/8O8E44kHiOEdtoGVPw4kp+RXN8PL19dN0eUkcz6EOdM Ho/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A63hqZQ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v2-20020a056402174200b00447a73226a8si6655243edx.612.2022.08.29.15.10.05; Mon, 29 Aug 2022 15:10:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A63hqZQ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229909AbiH2VwP (ORCPT + 99 others); Mon, 29 Aug 2022 17:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbiH2VwL (ORCPT ); Mon, 29 Aug 2022 17:52:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E62FC9F8F0; Mon, 29 Aug 2022 14:52:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 82708612A0; Mon, 29 Aug 2022 21:52:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF3DEC43147; Mon, 29 Aug 2022 21:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661809929; bh=SLuDKCSxqiHHDmnwI3+58YA9f0120J1/hz6TFh+Tap4=; h=Date:From:To:Cc:Subject:From; b=A63hqZQ7KTiL4okMhc6hTVpb6ErLGiUIk4+WN4Nphl6T64TEAGF+8dqUIhP27Gbih hZv0pfr+ZoFWsA/39vyd80zby7RFugYSA75SfVP0YOLs/qALtf9EOc4N9STMXCKwLB uwlUuEFvEfP2L9Rypr5tVY3uuZ8tiHluuho4EUvzSn67qZ/rAneVlJlnFPWNPbNqBt xK0bJSN1+ZeR6DbIGQ6oEhNozVcFqTJ1h0kU1ZU/AM3acPUw5qoVjx9ig8cl3NpOod bNWRrtZCHYYEhSKkE8iugEKc37PIungBP7bsoh1LkSrYWN6YmTFUJqgqZR5DcmZI5x QItokQItp8okA== Date: Mon, 29 Aug 2022 16:52:03 -0500 From: "Gustavo A. R. Silva" To: Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH][next] ALSA: hda/hdmi: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length array declaration in union audio_infoframe with the new DECLARE_FLEX_ARRAY() helper macro. This helper allows for a flexible-array member in a union. Link: https://github.com/KSPP/linux/issues/193 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva --- sound/pci/hda/patch_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 6c209cd26c0c..2191d445d74e 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -229,7 +229,7 @@ struct dp_audio_infoframe { union audio_infoframe { struct hdmi_audio_infoframe hdmi; struct dp_audio_infoframe dp; - u8 bytes[0]; + DECLARE_FLEX_ARRAY(u8, bytes); }; /* -- 2.34.1