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: <20200919063254.GA1044@kunai>
Date:   Sat, 19 Sep 2020 08:32:54 +0200
From:   <wsa@...nel.org>
To:     "tiantao (H)" <tiantao6@...wei.com>
Cc:     Tian Tao <tiantao6@...ilicon.com>, <linux-i2c@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>
Subject: Re: [PATCH] i2c: Switch to using the new API kobj_to_dev()

On Sat, Sep 19, 2020 at 09:01:12AM +0800, tiantao (H) wrote:
> 
> 
> 在 2020/9/19 5:09, wsa@...nel.org 写道:
> > 
> > >   static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
> > >   {
> > > -	struct device * const dev = container_of(kobj, struct device, kobj);
> > > +	struct device * const dev = kobj_to_dev(kobj);
> > >   	return to_i2c_client(dev);
> > 
> > Can't we make this a oneliner then merging the last two lines?
> > 
> I think two lines have better readability, and if you prefer one line, I can
> send v2 to fix that!

I just found d75d53cd571c ("i2c: Fix sparse warning in i2c.h"), so we
should leave the two lines. Thanks!


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ