From nobody Thu Oct 2 04:49:35 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D0FE1A5B9D; Mon, 22 Sep 2025 14:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758550109; cv=none; b=dihjKOp1cKHF4oJp/RRihzzHHw0V8W21alUutW0Q5+F8Hh5qjD+UvhcEEZKVO3Y2xrXXrnvBQl3T41WHA42HfGP6vMIWsSYGvQwhUjwyKja/Vw8O5bSqVIaaFCFS4uUZz8myeSVEDx6N50TyXYLQ9xzF8UU9e9Kqkhr6PGGsnHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758550109; c=relaxed/simple; bh=g63gUXV32iglXiLeG7nvTC7diJKbKHpwkEKeH1j4s8c=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=eQIfRbkNLBn/l1VgPZYbl/P0wzxcf/p+ADkj8HiGbcO0E0P+cwLa8B7hwBzdvOJfwTer8F0EL2TxbhX/EJboarG9pWRG9kzRpA8H8xXtLogw5Gh2O7QX5KGuIohIl+yblwpkBbmy1qmZm5LXASGp/ry9Zqv0257Izrhzv27t65Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k5zXeMzS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k5zXeMzS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65114C4CEF0; Mon, 22 Sep 2025 14:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758550108; bh=g63gUXV32iglXiLeG7nvTC7diJKbKHpwkEKeH1j4s8c=; h=Date:From:To:Cc:Subject:From; b=k5zXeMzSlp3xP70jqm61JYaYoQ4w1GhTQ2rSacA+JSjb3OjVFd4a7mtqT1/8DFhBw n5tKCxSKO+izxKAB0BOFyYNErDEC0ag8YwjTfPGw3sqNr1EAsC5dJxY4lRuNwWe8Zh 1cpoUokDYNEx83cus6b1t4KsU1zWZPDLg3lxicCuvD0SYu3l6lcb6PxUcUddOnBNVn wcs48j1PwT5KmfQWVI2M6rCndOAkTzXSi4h8J0YVmkxOKovXr+sLsB3lzBe+lZxti4 6cQ6Wza8JP3JMMuaMlyxTT8+oFGQIZ4JLrdYcGZb5EgyAOVaGRONg2OVqLQaFkw6ES 7MYbuHPhjkNQQ== Date: Mon, 22 Sep 2025 16:08:21 +0200 From: "Gustavo A. R. Silva" To: Lorenzo Bianconi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH][next] net: airoha: Avoid -Wflex-array-member-not-at-end warning Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Move the conflicting declaration to the end of the corresponding structure. Notice that `struct airoha_foe_entry` is a flexible structure, this is a structure that contains a flexible-array member. Fix the following warning: drivers/net/ethernet/airoha/airoha_eth.h:474:33: warning: structure contain= ing a flexible array member is not at the end of another structure [-Wflex-= array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Simon Horman --- drivers/net/ethernet/airoha/airoha_eth.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/etherne= t/airoha/airoha_eth.h index 77fd13d466dc..cd13c1c1224f 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.h +++ b/drivers/net/ethernet/airoha/airoha_eth.h @@ -471,7 +471,6 @@ struct airoha_flow_table_entry { }; }; =20 - struct airoha_foe_entry data; struct hlist_node l2_subflow_node; /* PPE L2 subflow entry */ u32 hash; =20 @@ -480,6 +479,9 @@ struct airoha_flow_table_entry { =20 struct rhash_head node; unsigned long cookie; + + /* Must be last --ends in a flexible-array member. */ + struct airoha_foe_entry data; }; =20 struct airoha_wdma_info { --=20 2.43.0