Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4633120rwb; Mon, 21 Nov 2022 09:51:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf4kHfkzkXVKQsN34ELCBrEgFyUn4bqxz6ks28uQUunZDR+gIdrYb/fXrnEH4GfChe/0xnap X-Received: by 2002:a17:902:da83:b0:189:2809:2f11 with SMTP id j3-20020a170902da8300b0018928092f11mr3431892plx.105.1669053101963; Mon, 21 Nov 2022 09:51:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669053101; cv=none; d=google.com; s=arc-20160816; b=FwReypYZ4YgJ4QDO/JbVxI+ukd3kKefI2uE+wxcNrQSUw742SxgyC6GD9c5k+lKYgf gPtx6M8FKbt8jZYrRqKmqSIAGfx3WY40rLwcWOMDdjJJuO8JPGy53G3zwfIs0KoX0PRt 5KEN2S9dPJPyF6dKn8Ulz3Ne3P3SiP3/cIwd8koNkuHBvevvKtUCxhgfB2sTDSbi+rfA 03SZ1uussWdFY46t9xkrtUIQUxp6JVc9mb2ErRzIAAedJVzo9TdEDTZhArVh7tde0Gj6 vNmqpul+Lj3DbIJw9esnZaZYk5Pm6pdypzvadXyEqyfCmI1194y6zVwrwyv9NkTJhVCl /VGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RVYmRlCIWUFfeVnOV5mudLBiIVI6uJJnon3FBZNLLUI=; b=TSCYKOEHU33GBo+0lv3Zn/aWL5f36BHc61EkUbbEOWfIELD6zusuDCG+hmjWkrz1im 0fqMY8trAEazlOWY5WsCaeK7xkEFqv3BLH01wTvxXiiVVh3FH4ZFYulU/sbc7HI7RPRu J6j+KM8Rtlp2EWA3CuWbhR+7UF5dbYv8ixhRpjTYTeJR+dwPezMgSAeEjv83neWMEpUC /hwkoefc8hREcrtLh5OujJpbwktKvC8K4gvygqq45Hfcn+Fdmqvz8gBEtF5uSJ4I1Rvl vUxkgIj06QhjlAqoJuZnMVZUI9x/UrBd0INQvFo4OxhULTtyn2L6KkRMn/fDobHtrmIQ TLww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jcz1PMWg; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw18-20020a17090b4d1200b00218611c0e9fsi16223026pjb.53.2022.11.21.09.51.30; Mon, 21 Nov 2022 09:51:41 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=jcz1PMWg; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229827AbiKURnl (ORCPT + 92 others); Mon, 21 Nov 2022 12:43:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbiKURnj (ORCPT ); Mon, 21 Nov 2022 12:43:39 -0500 Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02F0C2C122; Mon, 21 Nov 2022 09:43:38 -0800 (PST) Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-1322d768ba7so14517646fac.5; Mon, 21 Nov 2022 09:43:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RVYmRlCIWUFfeVnOV5mudLBiIVI6uJJnon3FBZNLLUI=; b=jcz1PMWg/P6eUBxRDkxKc0yQD7GP7vplwKzu1inK0mhWJoI8/LloPny5bXkEwBymN5 DE81ekBRjKVErsWjLKQIKkswXFOZa5bvoPUbkqafrlIq6oxhq6VQfXSUpSMoVBvgPJhu H/VFqb2KjN2B7qnEk/Xb9WoeNPDQiWVKGN4k9glKFGm56FT10T3L+0XhXw+y8E6X6vUq 0tu2oeQYspe06D815oLeil6BWq1FGQ/ZliZhLtVcUuJjmYdwoXBDVO50HCGOwCbfIaOF 8w7HZGRzCVQ3FAwz0vSJYuwzGAnJXKKtM4S5xKxO5rpbnC+9IQR3Q/uIGgWdXVhYcJev mBpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RVYmRlCIWUFfeVnOV5mudLBiIVI6uJJnon3FBZNLLUI=; b=vQdu379wv0eIS6YWT+Bi1sXTXVt+H7sxdhUomdCl06XLrm0Fv4FfCF88jNFlVZ7epT 7zYQq7CrhbUYMRomVQW/Chbp6Jf3+1swAUbnHSbj/Ll3jxPQF0DALWxyC6IFgoPTzDPy ASAsYn5D4LkvnKD531IK+gC7Iifubd6U1B2XLTJysAEUpRAfbhwnfmuJKYdTz4DOg2dh +kPI0I+RQClG9HwivgY9zuWESBysmI+FekJfMMrvoeRi3nwbPTYrL9o7WjzjzoSXotS4 h457nJ6tSV4FHgA6zk8yPpSJz0npArMCFrQtg948j82vE9sqBbybkOz4pt4kU+LgVi0N aIDA== X-Gm-Message-State: ANoB5pltUhQqTSCoY+X1bivVEmQhs8XIcIFA7wTYb/Ouml/NBMVyl19b jKttzjyZPbFb2CPEbHDOJg1c7yUDB1XA7X1xpJs= X-Received: by 2002:a05:6870:b07:b0:13b:d07f:f29d with SMTP id lh7-20020a0568700b0700b0013bd07ff29dmr2050631oab.96.1669052617328; Mon, 21 Nov 2022 09:43:37 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alex Deucher Date: Mon, 21 Nov 2022 12:43:25 -0500 Message-ID: Subject: Re: [PATCH] [next] drm/amdgpu: Replace remaining 1-element array with flex-array To: Paulo Miguel Almeida Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Rongguang Wei , Slark Xiao , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Applied. Thanks! Alex On Mon, Nov 21, 2022 at 2:26 AM Paulo Miguel Almeida wrote: > > One-element arrays are deprecated, and we are replacing them with > flexible array members instead. So, replace one-element array with > flexible-array member in struct GOP_VBIOS_CONTENT and refactor the > rest of the code accordingly. > > Important to mention is that doing a build before/after this patch > results in no functional binary output differences. > > This helps with the ongoing efforts to tighten the FORTIFY_SOURCE > routines on memcpy() and help us make progress towards globally > enabling -fstrict-flex-arrays=3 [1]. > > Link: https://github.com/KSPP/linux/issues/79 > Link: https://github.com/KSPP/linux/issues/238 > Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] > > Signed-off-by: Paulo Miguel Almeida > --- > This should be the last one-element array that had references in source > code. Given the way it was used, no *.c code change was required. > > I will move on to the atombios.h in the radeon driver. > --- > drivers/gpu/drm/amd/include/atombios.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/include/atombios.h b/drivers/gpu/drm/amd/include/atombios.h > index 4dc738c51771..b78360a71bc9 100644 > --- a/drivers/gpu/drm/amd/include/atombios.h > +++ b/drivers/gpu/drm/amd/include/atombios.h > @@ -9292,7 +9292,7 @@ typedef struct { > > typedef struct { > VFCT_IMAGE_HEADER VbiosHeader; > - UCHAR VbiosContent[1]; > + UCHAR VbiosContent[]; > }GOP_VBIOS_CONTENT; > > typedef struct { > -- > 2.37.3 >