From: Andrew Lunn <andrew@lunn.ch>
To: Mengyuan Lou <mengyuanlou@net-swift.com>
Cc: netdev@vger.kernel.org, jiawenwu@net-swift.com
Subject: Re: [RFC PATCH net-next] net: ngbe: Add build support for ngbe
Date: Fri, 19 Aug 2022 00:29:20 +0200 [thread overview]
Message-ID: <Yv69QNVsCVeCMdjf@lunn.ch> (raw)
In-Reply-To: <20220816075331.22084-1-mengyuanlou@net-swift.com>
> +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
prev parent reply other threads:[~2022-08-18 22:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 7:53 [RFC PATCH net-next] net: ngbe: Add build support for ngbe Mengyuan Lou
2022-08-18 22:29 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yv69QNVsCVeCMdjf@lunn.ch \
--to=andrew@lunn.ch \
--cc=jiawenwu@net-swift.com \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.