[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yv69QNVsCVeCMdjf@lunn.ch>
Date: Fri, 19 Aug 2022 00:29:20 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Mengyuan Lou <mengyuanlou@...-swift.com>
Cc: netdev@...r.kernel.org, jiawenwu@...-swift.com
Subject: Re: [RFC PATCH net-next] net: ngbe: Add build support for ngbe
> +static int ngbe_probe(struct pci_dev *pdev,
> + const struct pci_device_id __always_unused *ent)
> +{
> + struct ngbe_adapter *adapter = NULL;
> + struct net_device *netdev;
> + int err;
> +
> + err = pci_enable_device_mem(pdev);
> + if (err)
> + return err;
> +
> + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
> + if (err) {
> + dev_err(&pdev->dev,
> + "No usable DMA configuration, aborting\n");
> + goto err_pci_disable_dev;
> + }
> +
> + err = pci_request_selected_regions(pdev,
> + pci_select_bars(pdev, IORESOURCE_MEM),
> + ngbe_driver_name);
> + if (err) {
> + dev_err(&pdev->dev,
> + "pci_request_selected_regions failed 0x%x\n", err);
> + goto err_pci_disable_dev;
> + }
nitpick: Since include/linux/errno.h uses decimal, i think it would be
better to print the error code in decimal.
Otherwise this looks pretty good.
Andrew
Powered by blists - more mailing lists