Subject: Re: [PATCH net-next 4/4] net: hns3: clear hns unused parameter alarm

From: Simon Horman <[email-masked]>
Date: Mon, 15 May 2023 22:01:00 +0200

On Mon, May 15, 2023 at 09:46:43PM +0800, Hao Lan wrote:
> From: Peiyang Wang <[email-masked]>
> 
> Several functions in the hns3 driver have unused parameters.
> The compiler will warn about them when building
> with -Wunused-parameter option of hns3.
> 
> Signed-off-by: Peiyang Wang <[email-masked]>
> Signed-off-by: Hao Lan <[email-masked]>

...

> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
> index 1b360aa52e5d..8c0016b359b7 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
> @@ -693,7 +693,7 @@ static inline unsigned int hns3_page_order(struct hns3_enet_ring *ring)
>  
>  /* iterator for handling rings in ring group */
>  #define hns3_for_each_ring(pos, head) \
> -	for (pos = (head).ring; (pos); pos = (pos)->next)
> +	for ((pos) = (head).ring; (pos); (pos) = (pos)->next)

Hi,

A minor nit from my side.

This hunk does not seem related to the topic of this patch.

>  
>  #define hns3_get_handle(ndev) \
>  	(((struct hns3_nic_priv *)netdev_priv(ndev))->ae_handle)

...