All of lore.kernel.org
 help / color / mirror / Atom feed
From: <wsa@kernel.org>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: <linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>
Subject: Re: [PATCH] i2c: Switch to using the new API kobj_to_dev()
Date: Fri, 18 Sep 2020 23:09:11 +0200	[thread overview]
Message-ID: <20200918210911.GF52206@kunai> (raw)
In-Reply-To: <1600133898-35883-1-git-send-email-tiantao6@hisilicon.com>

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]


>  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?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-09-18 21:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15  1:38 [PATCH] i2c: Switch to using the new API kobj_to_dev() Tian Tao
2020-09-18 21:09 ` wsa [this message]
2020-09-19  1:01   ` tiantao (H)
2020-09-19  6:32     ` wsa
2020-09-21  9:14 ` Wolfram Sang

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=20200918210911.GF52206@kunai \
    --to=wsa@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.