netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings
@ 2024-08-20  1:27 Gustavo A. R. Silva
  2024-08-20 18:42 ` Simon Horman
  2024-08-22  0:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2024-08-20  1:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: netdev, linux-kernel, Gustavo A. R. Silva, linux-hardening

-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

Remove unnecessary flex-array member `data[]`, and with this fix
the following warnings:

drivers/nfc/pn533/usb.c:268:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/nfc/pn533/usb.c:275:38: warning: structure containing 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 <gustavoars@kernel.org>
---
 drivers/nfc/pn533/usb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nfc/pn533/usb.c b/drivers/nfc/pn533/usb.c
index a187f0e0b0f7..ffd7367ce119 100644
--- a/drivers/nfc/pn533/usb.c
+++ b/drivers/nfc/pn533/usb.c
@@ -254,7 +254,6 @@ struct pn533_acr122_ccid_hdr {
 	 * byte for reposnse msg
 	 */
 	u8 params[3];
-	u8 data[]; /* payload */
 } __packed;
 
 struct pn533_acr122_apdu_hdr {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings
  2024-08-20  1:27 [PATCH][next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
@ 2024-08-20 18:42 ` Simon Horman
  2024-08-22  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-08-20 18:42 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Krzysztof Kozlowski, netdev, linux-kernel, linux-hardening

On Mon, Aug 19, 2024 at 07:27:11PM -0600, Gustavo A. R. Silva wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
> 
> Remove unnecessary flex-array member `data[]`, and with this fix
> the following warnings:
> 
> drivers/nfc/pn533/usb.c:268:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/nfc/pn533/usb.c:275:38: warning: structure containing 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 <gustavoars@kernel.org>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings
  2024-08-20  1:27 [PATCH][next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
  2024-08-20 18:42 ` Simon Horman
@ 2024-08-22  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-08-22  0:30 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: krzk, netdev, linux-kernel, linux-hardening

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 19 Aug 2024 19:27:11 -0600 you wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
> 
> Remove unnecessary flex-array member `data[]`, and with this fix
> the following warnings:
> 
> drivers/nfc/pn533/usb.c:268:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/nfc/pn533/usb.c:275:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> 
> [...]

Here is the summary with links:
  - [next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings
    https://git.kernel.org/netdev/net-next/c/488d34643ec3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-22  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20  1:27 [PATCH][next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2024-08-20 18:42 ` Simon Horman
2024-08-22  0:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).