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: <da8241fe-8d6e-d9f2-1394-fc758536100b@foss.st.com>
Date:   Wed, 1 Sep 2021 09:50:56 +0200
From:   Patrice CHOTARD <patrice.chotard@...s.st.com>
To:     Cai Huoqing <caihuoqing@...du.com>
CC:     Sean Young <sean@...s.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: rc: st_rc: Make use of the helper function
 devm_platform_ioremap_resource()

Hi Cai

On 9/1/21 7:54 AM, Cai Huoqing 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>
> ---
>  drivers/media/rc/st_rc.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
> index d79d1e3996b2..4e419dbbacd3 100644
> --- a/drivers/media/rc/st_rc.c
> +++ b/drivers/media/rc/st_rc.c
> @@ -231,7 +231,6 @@ static int st_rc_probe(struct platform_device *pdev)
>  	int ret = -EINVAL;
>  	struct rc_dev *rdev;
>  	struct device *dev = &pdev->dev;
> -	struct resource *res;
>  	struct st_rc_device *rc_dev;
>  	struct device_node *np = pdev->dev.of_node;
>  	const char *rx_mode;
> @@ -274,9 +273,7 @@ static int st_rc_probe(struct platform_device *pdev)
>  		goto err;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -
> -	rc_dev->base = devm_ioremap_resource(dev, res);
> +	rc_dev->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(rc_dev->base)) {
>  		ret = PTR_ERR(rc_dev->base);
>  		goto err;
> 
Reviewed-by: Patrice Chotard <patrice.chotard@...s.st.com>

Thanks
Patrice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ