All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xuechaojing@huawei.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	luoshaokai@huawei.com, cloud.wangxiaoyun@huawei.com,
	chiqijun@huawei.com, wulike1@huawei.com
Subject: Re: [PATCH net-next v4 1/3] hinic: add rss support
Date: Mon, 17 Jun 2019 13:34:28 -0700 (PDT)	[thread overview]
Message-ID: <20190617.133428.1681715924857496492.davem@davemloft.net> (raw)
In-Reply-To: <20190617054601.3056-2-xuechaojing@huawei.com>

From: Xue Chaojing <xuechaojing@huawei.com>
Date: Mon, 17 Jun 2019 05:45:59 +0000

> +static int hinic_rss_init(struct hinic_dev *nic_dev)
> +{
> +	u8 default_rss_key[HINIC_RSS_KEY_SIZE] = { 0 };
> +	u32 indir_tbl[HINIC_RSS_INDIR_SIZE] = { 0 };
> +	u8 tmpl_idx = nic_dev->rss_tmpl_idx;
> +	int err, i;
> +
> +	netdev_rss_key_fill(default_rss_key, sizeof(default_rss_key));

Since netdev_rss_key_fill() fills the entire object, you don't need the
variable initializer for default_rss_key here, please remove it.

> +int hinic_rss_set_indir_tbl(struct hinic_dev *nic_dev, u32 tmpl_idx,
> +			    const u32 *indir_table)
> +{
> +	for (i = 0; i < HINIC_RSS_INDIR_SIZE; i++) {
> +		indir_tbl->entry[i] = (u8)(*(indir_table + i));

Please index the array normally using "indir_table[i]", I also suspect
the u8 cast is also unnecessary.

  reply	other threads:[~2019-06-17 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17  5:45 [PATCH net-next v4 0/3] hinic: add rss support and rss parameters configuration Xue Chaojing
2019-06-17  5:45 ` [PATCH net-next v4 1/3] hinic: add rss support Xue Chaojing
2019-06-17 20:34   ` David Miller [this message]
2019-06-17  5:46 ` [PATCH net-next v4 2/3] hinic: move ethtool code into hinic_ethtool Xue Chaojing
2019-06-17  5:46 ` [PATCH net-next v4 3/3] hinic: add support for rss parameters with ethtool Xue Chaojing

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=20190617.133428.1681715924857496492.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=chiqijun@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoshaokai@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=wulike1@huawei.com \
    --cc=xuechaojing@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 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.