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: <CAFCwf12mapgw=dFkqHr__P4ur6R3D=fyCVW2KSzMLL0qu0t3HQ@mail.gmail.com>
Date:   Sun, 28 Feb 2021 22:13:11 +0200
From:   Oded Gabbay <oded.gabbay@...il.com>
To:     Yang Li <yang.lee@...ux.alibaba.com>
Cc:     Oded Gabbay <ogabbay@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] banalabs: Switch to using the new API kobj_to_dev()

On Tue, Feb 23, 2021 at 11:12 AM Yang Li <yang.lee@...ux.alibaba.com> wrote:
>
> fixed the following coccicheck:
> ./drivers/misc/habanalabs/common/sysfs.c:347:60-61: WARNING opportunity
> for kobj_to_dev()
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
> ---
>  drivers/misc/habanalabs/common/sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/habanalabs/common/sysfs.c b/drivers/misc/habanalabs/common/sysfs.c
> index 4366d8f..79c1ddf 100644
> --- a/drivers/misc/habanalabs/common/sysfs.c
> +++ b/drivers/misc/habanalabs/common/sysfs.c
> @@ -344,7 +344,7 @@ static ssize_t eeprom_read_handler(struct file *filp, struct kobject *kobj,
>                         struct bin_attribute *attr, char *buf, loff_t offset,
>                         size_t max_size)
>  {
> -       struct device *dev = container_of(kobj, struct device, kobj);
> +       struct device *dev = kobj_to_dev(kobj);
>         struct hl_device *hdev = dev_get_drvdata(dev);
>         char *data;
>         int rc;
> --
> 1.8.3.1
>

Reviewed-by: Oded Gabbay <ogabbay@...nel.org>
Applied to -next.

Thanks,
Oded

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ