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:   Wed, 16 Oct 2019 09:19:36 -0500
From:   Corey Minyard <minyard@....org>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     arnd@...db.de, gregkh@...uxfoundation.org,
        openipmi-developer@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org,
        Alistair Popple <alistair@...ple.id.au>,
        Cédric Le Goater <clg@...d.org>
Subject: Re: [PATCH -next] ipmi: bt-bmc: use devm_platform_ioremap_resource()
 to simplify code

On Wed, Oct 16, 2019 at 05:21:31PM +0800, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.

Adding the module author and others. I can't see a reason to not do
this.

-corey

> 
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>  drivers/char/ipmi/bt-bmc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
> index 40b9927..d36aeac 100644
> --- a/drivers/char/ipmi/bt-bmc.c
> +++ b/drivers/char/ipmi/bt-bmc.c
> @@ -444,15 +444,13 @@ static int bt_bmc_probe(struct platform_device *pdev)
>  
>  	bt_bmc->map = syscon_node_to_regmap(pdev->dev.parent->of_node);
>  	if (IS_ERR(bt_bmc->map)) {
> -		struct resource *res;
>  		void __iomem *base;
>  
>  		/*
>  		 * Assume it's not the MFD-based devicetree description, in
>  		 * which case generate a regmap ourselves
>  		 */
> -		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -		base = devm_ioremap_resource(&pdev->dev, res);
> +		base = devm_platform_ioremap_resource(pdev, 0);
>  		if (IS_ERR(base))
>  			return PTR_ERR(base);
>  
> -- 
> 2.7.4
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ