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: <aed598bbe094633859f477dd99ff7d086261b071.camel@redhat.com>
Date: Tue, 16 May 2023 11:39:08 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>, Jiawen Wu
	 <jiawenwu@...stnetic.com>
Cc: netdev@...r.kernel.org, jarkko.nikula@...ux.intel.com, 
 andriy.shevchenko@...ux.intel.com, mika.westerberg@...ux.intel.com, 
 jsd@...ihalf.com, Jose.Abreu@...opsys.com, andrew@...n.ch,
 hkallweit1@...il.com,  linux@...linux.org.uk, linux-i2c@...r.kernel.org,
 linux-gpio@...r.kernel.org,  mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next v8 6/9] net: txgbe: Support GPIO to SFP socket

On Tue, 2023-05-16 at 10:12 +0300, Andy Shevchenko wrote:
> On Tue, May 16, 2023 at 5:39 AM Jiawen Wu <jiawenwu@...stnetic.com> wrote:
> 
> ...
> 
> > > > +   struct gpio_irq_chip *girq;
> > > > +   struct wx *wx = txgbe->wx;
> > > > +   struct gpio_chip *gc;
> > > > +   struct device *dev;
> > > > +   int ret;
> > > 
> > > > +   dev = &wx->pdev->dev;
> > > 
> > > This can be united with the defintion above.
> > > 
> > >       struct device *dev = &wx->pdev->dev;
> > > 
> > 
> > This is a question that I often run into, when I want to keep this order,
> > i.e. lines longest to shortest, but the line of the pointer which get later
> > is longer. For this example:
> > 
> >         struct wx *wx = txgbe->wx;
> >         struct device *dev = &wx->pdev->dev;
> 
> So, we locate assignments according to the flow. I do not see an issue here.

That would break the reverse x-mass tree order.

> > should I split the line, or put the long line abruptly there?
> 
> The latter is fine.

This is minor, but I have to disagree. My understanding is that
respecting the reversed x-mass tree is preferred. In case of dependent
initialization as the above, the preferred style it the one used by
this patch.

Cheers,

Paolo



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ