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]
Message-ID: <8ca3666f-8ff1-3c3c-d40b-81c024b37bdd@linux.intel.com>
Date:   Wed, 22 Apr 2020 16:50:00 -0500
From:   Richard Gong <richard.gong@...ux.intel.com>
To:     Sudeep Holla <sudeep.holla@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firmware: stratix10-svc: Drop unnecessary checking for
 and populating /firmware/ node

Hi Sudeep,

I tried and couldn't load stratix10-svc driver with your patch on kernel 
5.6.

Regards,
Richard

On 4/21/20 12:32 PM, Sudeep Holla wrote:
> Commit 3aa0582fdb82 ("of: platform: populate /firmware/ node from
> of_platform_default_populate_init()") changed the core-code to generate
> the platform devices, meaning there is no need for the driver to check
> the firmware node and populate it again here.
> 
> Let us just drop the unnecessary extra check done here as the core takes
> care of it.
> 
> Cc: Richard Gong <richard.gong@...ux.intel.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
> ---
>   drivers/firmware/stratix10-svc.c | 17 -----------------
>   1 file changed, 17 deletions(-)
> 
> Hi Richard,
> 
> I assume the subsys_initcall is essential here. If not we can remove the
> whole initcalls and replace it with module_platform_driver(). Let me know.
> Just found this by accident when grepping for something else.
> 
> Regards,
> Sudeep
> 
> diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
> index d5f0769f3761..791d70fe82c1 100644
> --- a/drivers/firmware/stratix10-svc.c
> +++ b/drivers/firmware/stratix10-svc.c
> @@ -1094,23 +1094,6 @@ static struct platform_driver stratix10_svc_driver = {
>   
>   static int __init stratix10_svc_init(void)
>   {
> -	struct device_node *fw_np;
> -	struct device_node *np;
> -	int ret;
> -
> -	fw_np = of_find_node_by_name(NULL, "firmware");
> -	if (!fw_np)
> -		return -ENODEV;
> -
> -	np = of_find_matching_node(fw_np, stratix10_svc_drv_match);
> -	if (!np)
> -		return -ENODEV;
> -
> -	of_node_put(np);
> -	ret = of_platform_populate(fw_np, stratix10_svc_drv_match, NULL, NULL);
> -	if (ret)
> -		return ret;
> -
>   	return platform_driver_register(&stratix10_svc_driver);
>   }
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ