From: David Miller <davem@davemloft.net>
To: zou_wei@huawei.com
Cc: aviad.krawczyk@huawei.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next v2] hinic: Use ARRAY_SIZE for nic_vf_cmd_msg_handler
Date: Wed, 29 Apr 2020 11:43:27 -0700 (PDT) [thread overview]
Message-ID: <20200429.114327.1585519928398105692.davem@davemloft.net> (raw)
In-Reply-To: <1588133860-55722-1-git-send-email-zou_wei@huawei.com>
From: Zou Wei <zou_wei@huawei.com>
Date: Wed, 29 Apr 2020 12:17:40 +0800
> fix coccinelle warning, use ARRAY_SIZE
>
> drivers/net/ethernet/huawei/hinic/hinic_sriov.c:713:43-44: WARNING: Use ARRAY_SIZE
>
> ----------
Please don't put this "-------" here.
> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
> index b24788e..af70cca 100644
> --- a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
> +++ b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
> @@ -704,17 +704,15 @@ int nic_pf_mbox_handler(void *hwdev, u16 vf_id, u8 cmd, void *buf_in,
> struct hinic_hwdev *dev = hwdev;
> struct hinic_func_to_io *nic_io;
> struct hinic_pfhwdev *pfhwdev;
> - u32 i, cmd_number;
> + u32 i;
> int err = 0;
Please preserve the reverse christmas tree ordering of local variables.
next prev parent reply other threads:[~2020-04-29 18:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 4:17 [PATCH -next v2] hinic: Use ARRAY_SIZE for nic_vf_cmd_msg_handler Zou Wei
2020-04-29 18:43 ` David Miller [this message]
2020-04-30 1:38 ` Samuel Zou
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=20200429.114327.1585519928398105692.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=aviad.krawczyk@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zou_wei@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).