[v5,05/10] net/nfp: replace zero length array with flex array

Message ID 20231129024221.57653-6-stephen@networkplumber.org (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers
Series Replace zero length arrays |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Nov. 29, 2023, 2:39 a.m. UTC
  Zero length arrays are GNU extension. Replace with
standard flex array.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_cmsg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Chaoyong He Nov. 30, 2023, 1:21 a.m. UTC | #1
Looks good to me, thanks.

Acked-by: Chaoyong He <chaoyong.he@corigine.com>

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Wednesday, November 29, 2023 10:39 AM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Niklas Söderlund
> <niklas.soderlund@corigine.com>; Tyler Retzlaff
> <roretzla@linux.microsoft.com>; Chaoyong He <chaoyong.he@corigine.com>
> Subject: [PATCH v5 05/10] net/nfp: replace zero length array with flex array
> 
> Zero length arrays are GNU extension. Replace with standard flex array.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Niklas Söderlund <niklas.soderlund@corigine.com>
> Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> Acked-by: Chaoyong He <chaoyong.he@corigine.com>
> ---
>  drivers/net/nfp/flower/nfp_flower_cmsg.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.h
> b/drivers/net/nfp/flower/nfp_flower_cmsg.h
> index c2938fb6f63c..f00d2e838d8f 100644
> --- a/drivers/net/nfp/flower/nfp_flower_cmsg.h
> +++ b/drivers/net/nfp/flower/nfp_flower_cmsg.h
> @@ -73,7 +73,7 @@ struct nfp_flower_cmsg_mac_repr {
>  		uint8_t info;
>  		uint8_t nbi_port;
>  		uint8_t phys_port;
> -	} ports[0];
> +	} ports[];
>  };
> 
>  /*
> --
> 2.42.0
  

Patch

diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h
index c2938fb6f63c..f00d2e838d8f 100644
--- a/drivers/net/nfp/flower/nfp_flower_cmsg.h
+++ b/drivers/net/nfp/flower/nfp_flower_cmsg.h
@@ -73,7 +73,7 @@  struct nfp_flower_cmsg_mac_repr {
 		uint8_t info;
 		uint8_t nbi_port;
 		uint8_t phys_port;
-	} ports[0];
+	} ports[];
 };
 
 /*