diff mbox series

[v6,41/52] memory: tegra124-emc: Use devm_platform_ioremap_resource()

Message ID 20201025221735.3062-42-digetx@gmail.com (mailing list archive)
State New, archived
Headers show
Series Introduce memory interconnect for NVIDIA Tegra SoCs | expand

Commit Message

Dmitry Osipenko Oct. 25, 2020, 10:17 p.m. UTC
Use devm_platform_ioremap_resource() helper which makes code a bit
cleaner.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/memory/tegra/tegra124-emc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Krzysztof Kozlowski Oct. 27, 2020, 10:27 a.m. UTC | #1
On Mon, Oct 26, 2020 at 01:17:24AM +0300, Dmitry Osipenko wrote:
> Use devm_platform_ioremap_resource() helper which makes code a bit
> cleaner.

Such cleanups (and few other in this patchset) should be at beginning of
patchset or even as part of a separate one.  I think there is not much
stopping anyone from applying these... except that you put them in the
middle of big dependency.

Best regards,
Krzysztof
Dmitry Osipenko Oct. 27, 2020, 8:30 p.m. UTC | #2
27.10.2020 13:27, Krzysztof Kozlowski пишет:
> On Mon, Oct 26, 2020 at 01:17:24AM +0300, Dmitry Osipenko wrote:
>> Use devm_platform_ioremap_resource() helper which makes code a bit
>> cleaner.
> 
> Such cleanups (and few other in this patchset) should be at beginning of
> patchset or even as part of a separate one.  I think there is not much
> stopping anyone from applying these... except that you put them in the
> middle of big dependency.

Some of these cleanup patches can't be applied separately without a need
to make a rebase. I think it should be more preferred to have all the
patches within a single series.

I'll try to reorder the patches in v7 if this will ease the review, thanks.
Krzysztof Kozlowski Oct. 28, 2020, 7:28 p.m. UTC | #3
On Tue, Oct 27, 2020 at 11:30:31PM +0300, Dmitry Osipenko wrote:
> 27.10.2020 13:27, Krzysztof Kozlowski пишет:
> > On Mon, Oct 26, 2020 at 01:17:24AM +0300, Dmitry Osipenko wrote:
> >> Use devm_platform_ioremap_resource() helper which makes code a bit
> >> cleaner.
> > 
> > Such cleanups (and few other in this patchset) should be at beginning of
> > patchset or even as part of a separate one.  I think there is not much
> > stopping anyone from applying these... except that you put them in the
> > middle of big dependency.
> 
> Some of these cleanup patches can't be applied separately without a need
> to make a rebase. I think it should be more preferred to have all the
> patches within a single series.
> 
> I'll try to reorder the patches in v7 if this will ease the review, thanks.

If feasible, that would be good. Thanks.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c
index 48e772ec544d..2814b1b4a1d9 100644
--- a/drivers/memory/tegra/tegra124-emc.c
+++ b/drivers/memory/tegra/tegra124-emc.c
@@ -1181,7 +1181,6 @@  static int tegra_emc_probe(struct platform_device *pdev)
 {
 	struct device_node *np;
 	struct tegra_emc *emc;
-	struct resource *res;
 	u32 ram_code;
 	int err;
 
@@ -1191,8 +1190,7 @@  static int tegra_emc_probe(struct platform_device *pdev)
 
 	emc->dev = &pdev->dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	emc->regs = devm_ioremap_resource(&pdev->dev, res);
+	emc->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(emc->regs))
 		return PTR_ERR(emc->regs);