* [PATCH] scsi: ufs: ufshcd-pltfrm: simplify usages of pdev->dev @ 2022-04-01 8:50 ` Krzysztof Kozlowski 2022-04-01 9:16 ` Chanho Park 2022-04-07 3:00 ` Martin K. Petersen 0 siblings, 2 replies; 3+ messages in thread From: Krzysztof Kozlowski @ 2022-04-01 8:50 UTC (permalink / raw) To: Alim Akhtar, Avri Altman, James E.J. Bottomley, Martin K. Petersen, linux-scsi, linux-kernel Cc: Krzysztof Kozlowski The 'struct device' pointer is already cached as local variable in ufshcd_pltfrm_init(), so use it. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] scsi: ufs: ufshcd-pltfrm: simplify usages of pdev->dev 2022-04-01 8:50 ` [PATCH] scsi: ufs: ufshcd-pltfrm: simplify usages of pdev->dev Krzysztof Kozlowski @ 2022-04-01 9:16 ` Chanho Park 2022-04-07 3:00 ` Martin K. Petersen 1 sibling, 0 replies; 3+ messages in thread From: Chanho Park @ 2022-04-01 9:16 UTC (permalink / raw) To: 'Krzysztof Kozlowski', 'Alim Akhtar', 'Avri Altman', 'James E.J. Bottomley', 'Martin K. Petersen', linux-scsi, linux-kernel > -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Friday, April 1, 2022 5:51 PM > To: Alim Akhtar <alim.akhtar@samsung.com>; Avri Altman > <avri.altman@wdc.com>; James E.J. Bottomley <jejb@linux.ibm.com>; Martin K. > Petersen <martin.petersen@oracle.com>; linux-scsi@vger.kernel.org; linux- > kernel@vger.kernel.org > Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.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@samsung.com> Best Regards, Chanho Park > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: ufshcd-pltfrm: simplify usages of pdev->dev 2022-04-01 8:50 ` [PATCH] scsi: ufs: ufshcd-pltfrm: simplify usages of pdev->dev Krzysztof Kozlowski 2022-04-01 9:16 ` Chanho Park @ 2022-04-07 3:00 ` Martin K. Petersen 1 sibling, 0 replies; 3+ messages in thread From: Martin K. Petersen @ 2022-04-07 3:00 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Alim Akhtar, Avri Altman, James E.J. Bottomley, Martin K. Petersen, linux-scsi, linux-kernel Krzysztof, > The 'struct device' pointer is already cached as local variable in > ufshcd_pltfrm_init(), so use it. Applied to 5.19/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-07 3:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20220401085104epcas2p4a13c6ec6b67da7cf7a165b92e811a545@epcas2p4.samsung.com>
2022-04-01 8:50 ` [PATCH] scsi: ufs: ufshcd-pltfrm: simplify usages of pdev->dev Krzysztof Kozlowski
2022-04-01 9:16 ` Chanho Park
2022-04-07 3:00 ` Martin K. Petersen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome