From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752129AbdHCWeb (ORCPT ); Thu, 3 Aug 2017 18:34:31 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:50394 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752100AbdHCWe3 (ORCPT ); Thu, 3 Aug 2017 18:34:29 -0400 Date: Thu, 03 Aug 2017 15:34:28 -0700 (PDT) Message-Id: <20170803.153428.1458452200774139189.davem@davemloft.net> To: aviad.krawczyk@huawei.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bc.y@huawei.com, victor.gissin@huawei.com, zhaochen6@huawei.com, tony.qu@huawei.com Subject: Re: [PATCH V3 net-next 02/21] net-next/hinic: Initialize hw device components From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 03 Aug 2017 15:34:29 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aviad Krawczyk 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.