From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4390C76190 for ; Mon, 22 Jul 2019 21:15:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA34721955 for ; Mon, 22 Jul 2019 21:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563830149; bh=AIZzoT5ZYNcjgOzxp5tAPR6+/rNuqLReT3uMdcYoavY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=GzNl/tbcJkCtjqEGqQwKNoIzksuzRdJXH2zv3PDK8VTkknO/dCgz+vAJVmqdo8Wa6 DG387Ock0dFIa+oECY+fU2UTKtQMBEt4ulEnbo4Vy029/C0ZHFCTNuX72++1A9QaTx 8tXRZyco4R0U23bNbNHh3Z2Uju6RKI/j9UawcJG4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731057AbfGVVPs (ORCPT ); Mon, 22 Jul 2019 17:15:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:35454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729697AbfGVVPq (ORCPT ); Mon, 22 Jul 2019 17:15:46 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1822221955; Mon, 22 Jul 2019 21:15:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563830145; bh=AIZzoT5ZYNcjgOzxp5tAPR6+/rNuqLReT3uMdcYoavY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iRJji6EcKDZ3rNaenkThR3bEKTYeoPbgWZ5Em5QbX6S3sLNUNEmwShKrkD3Iz3et3 fsrBVi68W2MImveoLTFgx5nNRgtbWMIZ1mkJwIql8NEci4tBOmN/WV7j/Dk+txETd1 yDQ84WnlNQ4e7tkMX4/PwhqFjwh4AxDCeiZyQqhA= Date: Mon, 22 Jul 2019 16:15:42 -0500 From: Bjorn Helgaas To: "Chocron, Jonathan" Cc: "jingoohan1@gmail.com" , "mark.rutland@arm.com" , "lorenzo.pieralisi@arm.com" , "Gustavo.Pimentel@synopsys.com" , "robh+dt@kernel.org" , "linux-kernel@vger.kernel.org" , "Woodhouse, David" , "Hanoch, Uri" , "devicetree@vger.kernel.org" , "Wasserstrom, Barak" , "Saidi, Ali" , "Hawa, Hanna" , "Shenhar, Talel" , "Krupnik, Ronen" , "linux-pci@vger.kernel.org" , "benh@kernel.crashing.org" Subject: Re: [PATCH v2 6/8] PCI: al: Add support for DW based driver type Message-ID: <20190722211542.GB203187@google.com> References: <20190718094531.21423-1-jonnyc@amazon.com> <20190718094718.25083-2-jonnyc@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 21, 2019 at 03:08:18PM +0000, Chocron, Jonathan wrote: > On Fri, 2019-07-19 at 08:55 +0000, Gustavo Pimentel wrote: > > On Thu, Jul 18, 2019 at 10:47:16, Jonathan Chocron wrote: > > > +static int al_pcie_probe(struct platform_device *pdev) > > > +{ > > > + struct device *dev = &pdev->dev; > > > + struct al_pcie *al_pcie; > > > + struct dw_pcie *pci; > > > + struct resource *dbi_res; > > > + struct resource *controller_res; > > > + struct resource *ecam_res; > > > + int ret; > > > > Please sort the variables following the reverse tree order. > > > Done. > > I'd think that it would make sense to group variables which have a > common characteristic (e.g. resources read from the DT), even if it > mildly breaks the convention (as long as the general frame is longest > to shortest). Does this sound ok? > > BTW, I couldn't find any documentation regarding the reverse-tree > convention, do you have a pointer to some? What I personally do is sort declarations in the order they're used.