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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 22 Aug 2020 11:44:02 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Alexandru Ardelean <ardeleanalex@...il.com>,
        Tian Tao <tiantao6@...ilicon.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        Hartmut Knaack <knaack.h@....de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-iio <linux-iio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Alexandru Ardelean <alexandru.ardelean@...log.com>
Subject: Re: [PATCH] iio: adc: adi-axi-adc: Use kobj_to_dev() instead of
 container_of()

On Thu, 20 Aug 2020 16:07:04 +0300
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Thu, Aug 20, 2020 at 4:05 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Thu, Aug 20, 2020 at 12:10 PM Alexandru Ardelean
> > <ardeleanalex@...il.com> wrote:  
> > > On Thu, Aug 20, 2020 at 6:04 AM Tian Tao <tiantao6@...ilicon.com> wrote:  
> 
> > > > -       struct device *dev = container_of(kobj, struct device, kobj);
> > > > +       struct device *dev = kobj_to_dev(kobj);  
> 
> > And now this can be one line since dev is not used separately.  
> 
> On the other hand perhaps one object per line is better to read.
> 

Indeed, not clear one way or the others, so I'm going with the path of
least resistance.  Applied as is.

Thanks,

Jonathan


Powered by blists - more mailing lists