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: <20210919183325.7bb5a8d9@jic23-huawei>
Date:   Sun, 19 Sep 2021 18:33:25 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Cai Huoqing <caihuoqing@...du.com>, <linux-iio@...r.kernel.org>
Cc:     Lars-Peter Clausen <lars@...afoo.de>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: dac: stm32-dac:  Make use of the helper function
 devm_platform_ioremap_resource()

On Wed, 8 Sep 2021 18:56:38 +0800
Cai Huoqing <caihuoqing@...du.com> wrote:

> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
> 
> Signed-off-by: Cai Huoqing <caihuoqing@...du.com>

Applied to the togreg branch of iio.git and pushed out as testing for 0-day
to see if it can find any problems that we missed.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/stm32-dac-core.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/dac/stm32-dac-core.c b/drivers/iio/dac/stm32-dac-core.c
> index 906436780347..9a6a68b11b2a 100644
> --- a/drivers/iio/dac/stm32-dac-core.c
> +++ b/drivers/iio/dac/stm32-dac-core.c
> @@ -90,7 +90,6 @@ static int stm32_dac_probe(struct platform_device *pdev)
>  	const struct stm32_dac_cfg *cfg;
>  	struct stm32_dac_priv *priv;
>  	struct regmap *regmap;
> -	struct resource *res;
>  	void __iomem *mmio;
>  	struct reset_control *rst;
>  	int ret;
> @@ -106,8 +105,7 @@ static int stm32_dac_probe(struct platform_device *pdev)
>  	cfg = (const struct stm32_dac_cfg *)
>  		of_match_device(dev->driver->of_match_table, dev)->data;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	mmio = devm_ioremap_resource(dev, res);
> +	mmio = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(mmio))
>  		return PTR_ERR(mmio);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ