Re: [PATCH V2 net-next 2/3] net: hns3: dump more reg info based on ras mod

From: Simon Horman
Date: Fri Dec 15 2023 - 03:01:35 EST


On Thu, Dec 14, 2023 at 10:11:34PM +0800, Jijie Shao wrote:
> From: Peiyang Wang <wangpeiyang1@xxxxxxxxxx>
>
> Dump more reg info base on ras mod before reset, which is useful to
> analyze the ras error.
>
> Signed-off-by: Peiyang Wang <wangpeiyang1@xxxxxxxxxx>
> Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>

...

> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
> index 68b738affa66..45a783a50643 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
> @@ -5,6 +5,7 @@
> #define __HCLGE_ERR_H
>
> #include "hclge_main.h"
> +#include "hclge_debugfs.h"

Hi Jijie Shao and Peiyang Wang,

hclge_debugfs.h defines a number of constants, such as hclge_dbg_tqp_reg.

With the above include added, these constants are now also defined
in files that include hclge_err.h. Which leads to them
being defined but unused in hclge_main.c.

At a glance, it seems that these constants are only used in hclge_debugfs.c.
Perhaps they could simply be moved there?

Flagged by gcc-13 W=1 allmodconfig builds.

> #include "hnae3.h"
>
> #define HCLGE_MPF_RAS_INT_MIN_BD_NUM 10

...