linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Alexandru Ardelean <ardeleanalex@gmail.com>,
	Tian Tao <tiantao6@hisilicon.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio <linux-iio@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject: Re: [PATCH] iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of()
Date: Sat, 22 Aug 2020 11:44:02 +0100	[thread overview]
Message-ID: <20200822114402.5dd84fce@archlinux> (raw)
In-Reply-To: <CAHp75Vf1C17eQzbuaxukzqxTgKO9Lv6fKDZ5JqfwMFWcvbMxFA@mail.gmail.com>

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

> On Thu, Aug 20, 2020 at 4:05 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Thu, Aug 20, 2020 at 12:10 PM Alexandru Ardelean
> > <ardeleanalex@gmail.com> wrote:  
> > > On Thu, Aug 20, 2020 at 6:04 AM Tian Tao <tiantao6@hisilicon.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



      reply	other threads:[~2020-08-22 10:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  3:01 [PATCH] iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of() Tian Tao
2020-08-20  9:09 ` Alexandru Ardelean
2020-08-20 13:05   ` Andy Shevchenko
2020-08-20 13:07     ` Andy Shevchenko
2020-08-22 10:44       ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200822114402.5dd84fce@archlinux \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=ardeleanalex@gmail.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=tiantao6@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).