lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 May 2020 10:07:24 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     luobin9@...wei.com
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        luoxianjun@...wei.com, yin.yinshi@...wei.com,
        cloud.wangxiaoyun@...wei.com
Subject: Re: [PATCH net-next] hinic: add set_channels ethtool_ops support

From: Luo bin <luobin9@...wei.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.

Powered by blists - more mailing lists