From patchwork Tue Nov 15 21:52:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 13044239 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BF11C43217 for ; Tue, 15 Nov 2022 21:52:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231345AbiKOVwg (ORCPT ); Tue, 15 Nov 2022 16:52:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiKOVwf (ORCPT ); Tue, 15 Nov 2022 16:52:35 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E593B869; Tue, 15 Nov 2022 13:52:34 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id D86DAB81B76; Tue, 15 Nov 2022 21:52:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3835C433D6; Tue, 15 Nov 2022 21:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668549151; bh=EX0dtFkOYtkcGU6zsa6IeJMRTQKuD4qbguL+7bW5s9I=; h=Date:From:To:Cc:Subject:From; b=WiJFUamwf5cFGkdpmf+Gx300gvWy+ricshy+HBYwQHZLKf6C5lgcox9Rdc/ZEUtfq QmQ5fiT0JtvVT3rjQ3x4yCRidX7zIhIqjizF/R/IEFtw4w/t2fkdvUoRl6NT1D9zRo 4ycbMoA48sFJk/F+dyDas0bEyXMnvONpEtrhKkuYWIuELAxN93sjb2QOU3j0nwXz6I zVDAMyN+PlBsN5ieHhmfzeo56ibKwm9fOnclG/XOSvcxyu53NrBleC1HYJ+iamy64w oGQKe8Gxvh1Bsi2e+fknZ2+1DkGbaMFwtUtbV+56z39uCWBiV0Uzm07EJMkcC+BlI6 BZ8r151Up+GJg== Date: Tue, 15 Nov 2022 15:52:15 -0600 From: "Gustavo A. R. Silva" To: Hante Meuleman , Franky Lin , Arend van Spriel , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: SHA-cyfmac-dev-list@infineon.com, brcm80211-dev-list.pdl@broadcom.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH 0/2][next] wifi: brcmfmac: common: Replace one-element array with flexible-array member Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi! This series aims to replace a one-element array with flexible-array member in drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h (in struct brcmf_dload_data_le) and use the struct_size() helper. 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://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/230 Link: https://github.com/KSPP/linux/issues/79 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Gustavo A. R. Silva (2): wifi: brcmfmac: replace one-element array with flexible-array member in struct brcmf_dload_data_le wifi: brcmfmac: Use struct_size() in code ralated to struct brcmf_dload_data_le drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 7 ++++--- .../net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-)