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] [day] [month] [year] [list]
Message-ID: <CAM9Jb+gdgYSe9r_ce9Mhaj+dyKH5kocSjD_GOpoKowtG8Sxn4Q@mail.gmail.com>
Date:   Tue, 2 Jun 2020 23:12:46 +0200
From:   Pankaj Gupta <pankaj.gupta.linux@...il.com>
To:     Shuai He <hexiaoshuaishuai@...il.com>
Cc:     Dan Williams <dan.j.williams@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>,
        Dave Jiang <dave.jiang@...el.com>, linux-nvdimm@...ts.01.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/dax/bus: Use kobj_to_dev() API

> Use kobj_to_dev() API instead of container_of().
>
> Signed-off-by: Shuai He <hexiaoshuaishuai@...il.com>
> ---
>  drivers/dax/bus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
> index df238c8..24625d2 100644
> --- a/drivers/dax/bus.c
> +++ b/drivers/dax/bus.c
> @@ -331,7 +331,7 @@ static DEVICE_ATTR_RO(numa_node);
>
>  static umode_t dev_dax_visible(struct kobject *kobj, struct attribute *a, int n)
>  {
> -       struct device *dev = container_of(kobj, struct device, kobj);
> +       struct device *dev = kobj_to_dev(kobj);
>         struct dev_dax *dev_dax = to_dev_dax(dev);
>
>         if (a == &dev_attr_target_node.attr && dev_dax_target_node(dev_dax) < 0)

Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ