Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1703479
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 net-next 02/21] net-next/hinic: Initialize hw device components |
| Date | 2017-08-04 00:40 +0200 |
| Message-ID | <uawWB-6uI-9@gated-at.bofh.it> (permalink) |
| References | <ual57-6Bs-3@gated-at.bofh.it> <ual58-6Bs-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Aviad Krawczyk <aviad.krawczyk@huawei.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.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH V3 net-next 02/21] net-next/hinic: Initialize hw device components Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-03 12:00 +0200 Re: [PATCH V3 net-next 02/21] net-next/hinic: Initialize hw device components David Miller <davem@davemloft.net> - 2017-08-04 00:40 +0200
csiph-web