lkml.org 
[lkml]   [2020]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next] hinic: add set_channels ethtool_ops support
From
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.

\
 
 \ /
  Last update: 2020-05-15 19:07    [W:0.720 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site