lkml.org 
[lkml]   [2020]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH -next v2] hinic: Use ARRAY_SIZE for nic_vf_cmd_msg_handler
From
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.

\
 
 \ /
  Last update: 2020-04-29 20:45    [W:0.028 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site