lkml.org 
[lkml]   [2017]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd resources
From
Date
Hi David,

Is it a new rule?

We can fix it, but I can look over the Linux Kernel source and there are
a lot of examples that have the same problem. I can see even code that inserted
to 4.10 with the same problem.

Thanks for your time and review,
Aviad

On 8/4/2017 1:35 AM, David Miller wrote:
> From: Aviad Krawczyk <aviad.krawczyk@huawei.com>
> Date: Thu, 3 Aug 2017 17:54:09 +0800
>
>> +static int alloc_cmd_buf(struct hinic_api_cmd_chain *chain,
>> + struct hinic_api_cmd_cell *cell, int cell_idx)
>> +{
>> + struct hinic_hwif *hwif = chain->hwif;
>> + struct pci_dev *pdev = hwif->pdev;
>> + struct hinic_api_cmd_cell_ctxt *cell_ctxt;
>> + dma_addr_t cmd_paddr;
>> + u8 *cmd_vaddr;
>> + int err = 0;
>
> Order local variables from longest to shortest line.
>
>> +static int api_cmd_create_cell(struct hinic_api_cmd_chain *chain,
>> + int cell_idx,
>> + struct hinic_api_cmd_cell *pre_node,
>> + struct hinic_api_cmd_cell **node_vaddr)
>> +{
>> + struct hinic_hwif *hwif = chain->hwif;
>> + struct pci_dev *pdev = hwif->pdev;
>> + struct hinic_api_cmd_cell_ctxt *cell_ctxt;
>> + struct hinic_api_cmd_cell *node;
>> + dma_addr_t node_paddr;
>> + int err;
>
> Likewise.
>> +static void api_cmd_destroy_cell(struct hinic_api_cmd_chain *chain,
>> + int cell_idx)
>> +{
>> + struct hinic_hwif *hwif = chain->hwif;
>> + struct pci_dev *pdev = hwif->pdev;
>> + struct hinic_api_cmd_cell_ctxt *cell_ctxt;
>> + struct hinic_api_cmd_cell *node;
>> + dma_addr_t node_paddr;
>> + size_t node_size;
>
> Likewise.
>
> etc. etc. etc.
>
> Please audit your entire submission for this problem.
>
> Thanks.
>
> .
>

\
 
 \ /
  Last update: 2017-08-08 18:24    [W:0.059 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site