[PATCH v2] stmmac: Replace deprecated PCI functions

Paolo Abeni pabeni at redhat.com
Thu Feb 20 00:59:08 PST 2025


On 2/18/25 2:21 PM, Philipp Stanner wrote:
> @@ -520,9 +522,9 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id
>  {
>  	struct plat_stmmacenet_data *plat;
>  	struct stmmac_pci_info *info;
> -	struct stmmac_resources res;
> +	struct stmmac_resources res = {};

I'm sorry for nit picking, but please respect the reverse christmas
tree above - what is relevant is the full line lenght.

> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
> index 352b01678c22..9d45af70d8a2 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
> @@ -155,7 +155,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
>  {
>  	struct stmmac_pci_info *info = (struct stmmac_pci_info *)id->driver_data;
>  	struct plat_stmmacenet_data *plat;
> -	struct stmmac_resources res;
> +	struct stmmac_resources res = {};
>  	int i;
>  	int ret;

Even more nit-picking: since you are touching this code chunck, could
you please fix the variables declaration order above?

Also, please add the target tree in the subj prefix, in this case
'net-next'.

Thanks!

Paolo




More information about the linux-arm-kernel mailing list