lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170803.153428.1458452200774139189.davem@davemloft.net>
Date:   Thu, 03 Aug 2017 15:34:28 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     aviad.krawczyk@...wei.com
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        bc.y@...wei.com, victor.gissin@...wei.com, zhaochen6@...wei.com,
        tony.qu@...wei.com
Subject: Re: [PATCH V3 net-next 02/21] net-next/hinic: Initialize hw device
 components

From: Aviad Krawczyk <aviad.krawczyk@...wei.com>
Date: Thu, 3 Aug 2017 17:54:08 +0800

> +static int get_capability(struct hinic_hwdev *hwdev,
> +			  struct hinic_dev_cap *dev_cap)
> +{
> +	struct hinic_hwif *hwif = hwdev->hwif;
> +	struct hinic_cap *nic_cap = &hwdev->nic_cap;
> +	int num_aeqs, num_ceqs, num_irqs, num_qps;

Please order local variable declarations from longest to shortest
line (aka: reverse christmas tree order).

Move the initialization down into the code if that is necessary
to achiever this.

> +static int get_dev_cap(struct hinic_hwdev *hwdev)
> +{
> +	struct hinic_pfhwdev *pfhwdev;
> +	struct hinic_hwif *hwif = hwdev->hwif;
> +	struct pci_dev *pdev = hwif->pdev;
> +	int err;

Likewise.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ