From: Andrew Lunn <andrew@lunn.ch>
To: Dexuan Cui <decui@microsoft.com>
Cc: davem@davemloft.net, kuba@kernel.org, kys@microsoft.com,
haiyangz@microsoft.com, sthemmin@microsoft.com,
wei.liu@kernel.org, liuwe@microsoft.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org
Subject: Re: [PATCH net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)
Date: Wed, 7 Apr 2021 03:07:44 +0200 [thread overview]
Message-ID: <YG0F4HkslqZHtBya@lunn.ch> (raw)
In-Reply-To: <20210406232321.12104-1-decui@microsoft.com>
> +static int gdma_query_max_resources(struct pci_dev *pdev)
> +{
> + struct gdma_context *gc = pci_get_drvdata(pdev);
> + struct gdma_general_req req = { 0 };
> + struct gdma_query_max_resources_resp resp = { 0 };
> + int err;
Network drivers need to use reverse christmas tree. I spotted a number
of functions getting this wrong. Please review the whole driver.
> +
> + gdma_init_req_hdr(&req.hdr, GDMA_QUERY_MAX_RESOURCES,
> + sizeof(req), sizeof(resp));
> +
> + err = gdma_send_request(gc, sizeof(req), &req, sizeof(resp), &resp);
> + if (err || resp.hdr.status) {
> + pr_err("%s, line %d: err=%d, err=0x%x\n", __func__, __LINE__,
> + err, resp.hdr.status);
I expect checkpatch complained about this. Don't use pr_err(), use
dev_err(pdev->dev, ... of netdev_err(ndev, ... You should always have
access to dev or ndev, so please change all pr_ calls.
> +static unsigned int num_queues = ANA_DEFAULT_NUM_QUEUE;
> +module_param(num_queues, uint, 0444);
No module parameters please.
Andrew
next parent reply other threads:[~2021-04-07 1:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210406232321.12104-1-decui@microsoft.com>
2021-04-07 1:07 ` Andrew Lunn [this message]
2021-04-07 8:02 ` [PATCH net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA) Dexuan Cui
2021-04-07 8:15 ` Leon Romanovsky
2021-04-07 8:28 ` Dexuan Cui
2021-04-07 12:44 ` Leon Romanovsky
2021-04-07 21:59 ` Dexuan Cui
2021-04-07 22:37 ` Bernd Petrovitsch
2021-04-08 7:30 ` Leon Romanovsky
2021-04-07 12:19 ` Andrew Lunn
2021-04-07 1:30 ` kernel test robot
2021-04-07 8:08 ` Dexuan Cui
2021-04-07 13:02 ` Wei Liu
2021-04-07 1:52 ` kernel test robot
2021-04-07 1:53 ` kernel test robot
2021-04-07 8:10 ` Leon Romanovsky
2021-04-07 8:40 ` Dexuan Cui
2021-04-07 12:51 ` Leon Romanovsky
2021-04-07 14:41 ` Haiyang Zhang
2021-04-07 14:55 ` Leon Romanovsky
2021-04-07 15:05 ` Haiyang Zhang
2021-04-07 17:07 ` Leon Romanovsky
2021-04-07 13:17 ` Wei Liu
2021-04-07 14:34 ` Haiyang Zhang
2021-04-07 15:00 ` Wei Liu
2021-04-07 15:16 ` Haiyang Zhang
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=YG0F4HkslqZHtBya@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuwe@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=sthemmin@microsoft.com \
--cc=wei.liu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).