mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhangfei Gao <zhangfei.gao@linaro.org>
To: Tian Tao <tiantao6@hisilicon.com>,
	wangzhou1@hisilicon.com, arnd@arndb.de,
	gregkh@linuxfoundation.org, linux-accelerators@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Cc: linuxarm@huawei.com
Subject: Re: [PATCH] uacce: Use kobj_to_dev() instead of container_of()
Date: Thu, 20 Aug 2020 10:52:50 +0800	[thread overview]
Message-ID: <9f2bbd04-79fa-95e6-50ec-e0dd270f6c61@linaro.org> (raw)
In-Reply-To: <1597889792-53139-1-git-send-email-tiantao6@hisilicon.com>



On 2020/8/20 上午10:16, Tian Tao wrote:
> Use kobj_to_dev() instead of container_of()
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>

Thanks
> ---
>   drivers/misc/uacce/uacce.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
> index a5b8dab..a9da7b1 100644
> --- a/drivers/misc/uacce/uacce.c
> +++ b/drivers/misc/uacce/uacce.c
> @@ -370,7 +370,7 @@ static struct attribute *uacce_dev_attrs[] = {
>   static umode_t uacce_dev_is_visible(struct kobject *kobj,
>   				    struct attribute *attr, int n)
>   {
> -	struct device *dev = container_of(kobj, struct device, kobj);
> +	struct device *dev = kobj_to_dev(kobj);
>   	struct uacce_device *uacce = to_uacce_device(dev);
>   
>   	if (((attr == &dev_attr_region_mmio_size.attr) &&


      reply	other threads:[~2020-08-20  2:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  2:16 Tian Tao
2020-08-20  2:52 ` Zhangfei Gao [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=9f2bbd04-79fa-95e6-50ec-e0dd270f6c61@linaro.org \
    --to=zhangfei.gao@linaro.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-accelerators@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=tiantao6@hisilicon.com \
    --cc=wangzhou1@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

all inboxes | Powered by JetHome®