Re: [PATCH net-next v5] eth: fbnic: Add PCIe hardware statistics

From: Andrew Lunn
Date: Mon Nov 11 2024 - 19:10:15 EST


> @@ -145,6 +147,8 @@ struct fbnic_dev *fbnic_devlink_alloc(struct pci_dev *pdev)
>
> fbd->mac_addr_boundary = FBNIC_RPC_TCAM_MACDA_DEFAULT_BOUNDARY;
>
> + fbnic_dbg_fbd_init(fbd);
> +
> return fbd;
> }

I thought it was odd that you create debugfs files in
fbnic_devlink_alloc(). But when you look at that function, it is
actually badly named, it is a collection of random initialisation, of
which devlink is just one.

I would suggest you call fbnic_dbg_fbd_init() in probe, like any
normal driver would.

Andrew