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: <01e401d845a9$22e481e0$68ad85a0$@samsung.com>
Date:   Fri, 1 Apr 2022 18:16:14 +0900
From:   "Chanho Park" <chanho61.park@...sung.com>
To:     "'Krzysztof Kozlowski'" <krzysztof.kozlowski@...aro.org>,
        "'Alim Akhtar'" <alim.akhtar@...sung.com>,
        "'Avri Altman'" <avri.altman@....com>,
        "'James E.J. Bottomley'" <jejb@...ux.ibm.com>,
        "'Martin K. Petersen'" <martin.petersen@...cle.com>,
        <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: ufs: ufshcd-pltfrm: simplify usages of pdev->dev

> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> Sent: Friday, April 1, 2022 5:51 PM
> To: Alim Akhtar <alim.akhtar@...sung.com>; Avri Altman
> <avri.altman@....com>; James E.J. Bottomley <jejb@...ux.ibm.com>; Martin
K.
> Petersen <martin.petersen@...cle.com>; linux-scsi@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> Subject: [PATCH] scsi: ufs: ufshcd-pltfrm: simplify usages of pdev->dev
> 
> The 'struct device' pointer is already cached as local variable in
> ufshcd_pltfrm_init(), so use it.

Reviewed-by: Chanho Park <chanho61.park@...sung.com>

Best Regards,
Chanho Park

> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
>  drivers/scsi/ufs/ufshcd-pltfrm.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-
> pltfrm.c
> index 87975d1a21c8..cca4b2181a81 100644
> --- a/drivers/scsi/ufs/ufshcd-pltfrm.c
> +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
> @@ -341,7 +341,7 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
> 
>  	err = ufshcd_alloc_host(dev, &hba);
>  	if (err) {
> -		dev_err(&pdev->dev, "Allocation failed\n");
> +		dev_err(dev, "Allocation failed\n");
>  		goto out;
>  	}
> 
> @@ -349,13 +349,13 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
> 
>  	err = ufshcd_parse_clock_info(hba);
>  	if (err) {
> -		dev_err(&pdev->dev, "%s: clock parse failed %d\n",
> +		dev_err(dev, "%s: clock parse failed %d\n",
>  				__func__, err);
>  		goto dealloc_host;
>  	}
>  	err = ufshcd_parse_regulator_info(hba);
>  	if (err) {
> -		dev_err(&pdev->dev, "%s: regulator init failed %d\n",
> +		dev_err(dev, "%s: regulator init failed %d\n",
>  				__func__, err);
>  		goto dealloc_host;
>  	}
> @@ -368,8 +368,8 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
>  		goto dealloc_host;
>  	}
> 
> -	pm_runtime_set_active(&pdev->dev);
> -	pm_runtime_enable(&pdev->dev);
> +	pm_runtime_set_active(dev);
> +	pm_runtime_enable(dev);
> 
>  	return 0;
> 
> --
> 2.32.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ