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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 1 Mar 2021 10:26:51 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Yang Li <yang.lee@...ux.alibaba.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] driver core: Switch to using the new API kobj_to_dev()

On Mon, Mar 01, 2021 at 05:13:24PM +0800, Yang Li wrote:
> fixed the following coccicheck:
> ./include/linux/device.h:590:46-47: WARNING opportunity for
> kobj_to_dev()
> 
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
> ---
>  include/linux/device.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/device.h b/include/linux/device.h
> index ba66073..31d7137 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -587,7 +587,7 @@ struct device_link {
>  
>  static inline struct device *kobj_to_dev(struct kobject *kobj)
>  {
> -	return container_of(kobj, struct device, kobj);
> +	return kobj_to_dev(kobj);
>  }

Did you test this change?  Please do so...

{sigh}

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ