Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706741

Re: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd resources

From Aviad Krawczyk <aviad.krawczyk@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd resources
Date 2017-08-08 18:30 +0200
Message-ID <ucfyi-2uV-29@gated-at.bofh.it> (permalink)
References <ual57-6Bs-3@gated-at.bofh.it> <ualou-6Yh-25@gated-at.bofh.it> <uawWC-6uI-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
> 
> .
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V3 net-next 00/21] Huawei HiNIC Ethernet Driver Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:00 +0200
  [PATCH V3 net-next 15/21] net-next/hinic: Add ceqs Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:00 +0200
  [PATCH V3 net-next 04/21] net-next/hinic: Initialize api cmd hw Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:00 +0200
  [PATCH V3 net-next 20/21] net-next/hinic: Add ethtool and stats Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:10 +0200
  [PATCH V3 net-next 19/21] net-next/hinic: Add Tx operation Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:10 +0200
  [PATCH V3 net-next 21/21] net-next/hinic: Add select_queue and netpoll Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:10 +0200
  [PATCH V3 net-next 06/21] net-next/hinic: Add api cmd commands Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:20 +0200
  [PATCH V3 net-next 05/21] net-next/hinic: Add management messages Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:20 +0200
  [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd resources Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:20 +0200
    Re: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd  resources David Miller <davem@davemloft.net> - 2017-08-04 00:40 +0200
      Re: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd  resources Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-08 18:30 +0200
        Re: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd  resources David Miller <davem@davemloft.net> - 2017-08-08 19:10 +0200

csiph-web