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: <20201116071023.GB8715@yilunxu-OptiPlex-7050>
Date:   Mon, 16 Nov 2020 15:10:23 +0800
From:   Xu Yilun <yilun.xu@...el.com>
To:     Moritz Fischer <mdf@...nel.org>
Cc:     gregkh@...uxfoundation.org, linux-fpga@...r.kernel.org,
        linux-kernel@...r.kernel.org, trix@...hat.com, yilun.xu@...el.com
Subject: Re: [RESEND PATCH 03/10] fpga: fpga-mgr: dfl-fme-mgr: Simplify
 registration

Tested on DFL FPGA platform, it is OK.

Thanks,
Yilun

On Sun, Nov 15, 2020 at 11:51:20AM -0800, Moritz Fischer wrote:
> Simplify registration using new devm_fpga_mgr_register() API.
> 
> Reviewed-by: Tom Rix <trix@...hat.com>
> Signed-off-by: Moritz Fischer <mdf@...nel.org>
> ---
>  drivers/fpga/dfl-fme-mgr.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c
> index b3f7eee3c93f..d5861d13b306 100644
> --- a/drivers/fpga/dfl-fme-mgr.c
> +++ b/drivers/fpga/dfl-fme-mgr.c
> @@ -314,18 +314,8 @@ static int fme_mgr_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	mgr->compat_id = compat_id;
> -	platform_set_drvdata(pdev, mgr);
>  
> -	return fpga_mgr_register(mgr);
> -}
> -
> -static int fme_mgr_remove(struct platform_device *pdev)
> -{
> -	struct fpga_manager *mgr = platform_get_drvdata(pdev);
> -
> -	fpga_mgr_unregister(mgr);
> -
> -	return 0;
> +	return devm_fpga_mgr_register(dev, mgr);
>  }
>  
>  static struct platform_driver fme_mgr_driver = {
> @@ -333,7 +323,6 @@ static struct platform_driver fme_mgr_driver = {
>  		.name    = DFL_FPGA_FME_MGR,
>  	},
>  	.probe   = fme_mgr_probe,
> -	.remove  = fme_mgr_remove,
>  };
>  
>  module_platform_driver(fme_mgr_driver);
> -- 
> 2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ