lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/8] PCI: al: Add support for DW based driver type
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 <jonnyc@amazon.com> 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.

\
 
 \ /
  Last update: 2019-07-22 23:16    [W:0.139 / U:1.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site