netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: luobin9@huawei.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	luoxianjun@huawei.com, yin.yinshi@huawei.com,
	cloud.wangxiaoyun@huawei.com
Subject: Re: [PATCH net-next] hinic: add set_channels ethtool_ops support
Date: Fri, 15 May 2020 10:07:24 -0700 (PDT)	[thread overview]
Message-ID: <20200515.100724.857120162566779862.davem@davemloft.net> (raw)
In-Reply-To: <20200515003547.27359-1-luobin9@huawei.com>

From: Luo bin <luobin9@huawei.com>
Date: Fri, 15 May 2020 00:35:47 +0000

> +void hinic_update_num_qps(struct hinic_hwdev *hwdev, u16 num_qp)
> +{
> +	struct hinic_cap *nic_cap = &hwdev->nic_cap;
> +
> +	nic_cap->num_qps = num_qp;
> +}

It is excessive to have a helper function that assigns a single struct
member, the layout of which is visible to all callers.  All callers
are also in a single function.

Please remove this helper and just go "hwdev->nic_cap.num_qps = xxx;"
at the call sites.

Thank you.

  reply	other threads:[~2020-05-15 17:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15  0:35 [PATCH net-next] hinic: add set_channels ethtool_ops support Luo bin
2020-05-15 17:07 ` David Miller [this message]
2020-05-15 17:21 ` Jakub Kicinski
2020-05-15 18:13 ` Michal Kubecek
2020-05-15 19:57   ` Michal Kubecek
2020-05-16  2:58   ` luobin (L)

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=20200515.100724.857120162566779862.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luobin9@huawei.com \
    --cc=luoxianjun@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=yin.yinshi@huawei.com \
    /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).