All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] ata: bf54x: cut drvdata assignment
@ 2017-05-30  9:46 Linus Walleij
  2017-05-30  9:46 ` [PATCH 2/6] ata: ep93xx: " Linus Walleij
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Linus Walleij @ 2017-05-30  9:46 UTC (permalink / raw)
  To: Tejun Heo, Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Linus Walleij

ata_host_alloc_pinfo() assigns the host pointer to the
struct device * drvdata, do not assign it a second time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/ata/pata_bf54x.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 9c5780a7e1b9..0e55a8da2748 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1597,8 +1597,6 @@ static int bfin_atapi_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	platform_set_drvdata(pdev, host);
-
 	return 0;
 }
 
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] ata: ep93xx: cut drvdata assignment
  2017-05-30  9:46 [PATCH 1/6] ata: bf54x: cut drvdata assignment Linus Walleij
@ 2017-05-30  9:46 ` Linus Walleij
  2017-05-30  9:46 ` [PATCH 3/6] ata: dwc_460ex: " Linus Walleij
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2017-05-30  9:46 UTC (permalink / raw)
  To: Tejun Heo, Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Linus Walleij

ata_host_alloc_pinfo() assigns the host pointer to the
struct device * drvdata, do not assign drv_data like this.
Since ata_host_alloc_pinfo() is called after this site, the
correct value is set eventually, but this assignment is just
plain pointless.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/ata/pata_ep93xx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index bf1b910c5d69..0a550190955a 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -944,7 +944,6 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
 		goto err_rel_gpio;
 	}
 
-	platform_set_drvdata(pdev, drv_data);
 	drv_data->pdev = pdev;
 	drv_data->ide_base = ide_base;
 	drv_data->udma_in_phys = mem_res->start + IDEUDMADATAIN;
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] ata: dwc_460ex: cut drvdata assignment
  2017-05-30  9:46 [PATCH 1/6] ata: bf54x: cut drvdata assignment Linus Walleij
  2017-05-30  9:46 ` [PATCH 2/6] ata: ep93xx: " Linus Walleij
@ 2017-05-30  9:46 ` Linus Walleij
  2017-05-30  9:46 ` [PATCH 4/6] ata: rb532_cf: " Linus Walleij
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2017-05-30  9:46 UTC (permalink / raw)
  To: Tejun Heo, Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Linus Walleij

ata_host_alloc_pinfo() assigns the host pointer to the
struct device * drvdata, do not assign it a second time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/ata/sata_dwc_460ex.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index e0939bd5ea73..ce128d5a6ded 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1285,7 +1285,6 @@ static int sata_dwc_probe(struct platform_device *ofdev)
 	if (err)
 		dev_err(&ofdev->dev, "failed to activate host");
 
-	dev_set_drvdata(&ofdev->dev, host);
 	return 0;
 
 error_out:
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] ata: rb532_cf: cut drvdata assignment
  2017-05-30  9:46 [PATCH 1/6] ata: bf54x: cut drvdata assignment Linus Walleij
  2017-05-30  9:46 ` [PATCH 2/6] ata: ep93xx: " Linus Walleij
  2017-05-30  9:46 ` [PATCH 3/6] ata: dwc_460ex: " Linus Walleij
@ 2017-05-30  9:46 ` Linus Walleij
  2017-05-30  9:46 ` [PATCH 5/6] ata: samsung_cf: " Linus Walleij
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2017-05-30  9:46 UTC (permalink / raw)
  To: Tejun Heo, Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Linus Walleij

ata_host_alloc_pinfo() assigns the host pointer to the
struct device * drvdata, do not assign it a second time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/ata/pata_rb532_cf.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index c8b6a780a290..653b9a0bf727 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -148,8 +148,6 @@ static int rb532_pata_driver_probe(struct platform_device *pdev)
 	if (!ah)
 		return -ENOMEM;
 
-	platform_set_drvdata(pdev, ah);
-
 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
 	if (!info)
 		return -ENOMEM;
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] ata: samsung_cf: cut drvdata assignment
  2017-05-30  9:46 [PATCH 1/6] ata: bf54x: cut drvdata assignment Linus Walleij
                   ` (2 preceding siblings ...)
  2017-05-30  9:46 ` [PATCH 4/6] ata: rb532_cf: " Linus Walleij
@ 2017-05-30  9:46 ` Linus Walleij
  2017-05-30  9:46 ` [PATCH 6/6] ata: sata_fsl: " Linus Walleij
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2017-05-30  9:46 UTC (permalink / raw)
  To: Tejun Heo, Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Linus Walleij

ata_host_alloc_pinfo() assigns the host pointer to the
struct device * drvdata, do not assign it a second time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/ata/pata_samsung_cf.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c
index 431c7de30ce6..50801c40b029 100644
--- a/drivers/ata/pata_samsung_cf.c
+++ b/drivers/ata/pata_samsung_cf.c
@@ -582,8 +582,6 @@ static int __init pata_s3c_probe(struct platform_device *pdev)
 	/* Set endianness and enable the interface */
 	pata_s3c_hwinit(info, pdata);
 
-	platform_set_drvdata(pdev, host);
-
 	ret = ata_host_activate(host, info->irq,
 				info->irq ? pata_s3c_irq : NULL,
 				0, &pata_s3c_sht);
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] ata: sata_fsl: cut drvdata assignment
  2017-05-30  9:46 [PATCH 1/6] ata: bf54x: cut drvdata assignment Linus Walleij
                   ` (3 preceding siblings ...)
  2017-05-30  9:46 ` [PATCH 5/6] ata: samsung_cf: " Linus Walleij
@ 2017-05-30  9:46 ` Linus Walleij
  2017-05-30 12:22 ` [PATCH 1/6] ata: bf54x: " Sergei Shtylyov
  2017-05-30 15:55 ` Tejun Heo
  6 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2017-05-30  9:46 UTC (permalink / raw)
  To: Tejun Heo, Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Linus Walleij

ata_host_alloc_pinfo() assigns the host pointer to the
struct device * drvdata, do not assign it a second time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/ata/sata_fsl.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 01734d54c69c..95bf3abda6f6 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1523,8 +1523,6 @@ static int sata_fsl_probe(struct platform_device *ofdev)
 	ata_host_activate(host, irq, sata_fsl_interrupt, SATA_FSL_IRQ_FLAG,
 			  &sata_fsl_sht);
 
-	platform_set_drvdata(ofdev, host);
-
 	host_priv->intr_coalescing.show = fsl_sata_intr_coalescing_show;
 	host_priv->intr_coalescing.store = fsl_sata_intr_coalescing_store;
 	sysfs_attr_init(&host_priv->intr_coalescing.attr);
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/6] ata: bf54x: cut drvdata assignment
  2017-05-30  9:46 [PATCH 1/6] ata: bf54x: cut drvdata assignment Linus Walleij
                   ` (4 preceding siblings ...)
  2017-05-30  9:46 ` [PATCH 6/6] ata: sata_fsl: " Linus Walleij
@ 2017-05-30 12:22 ` Sergei Shtylyov
  2017-05-30 15:55 ` Tejun Heo
  6 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2017-05-30 12:22 UTC (permalink / raw)
  To: Linus Walleij, Tejun Heo, Bartlomiej Zolnierkiewicz; +Cc: linux-ide

Hello!

On 05/30/2017 12:46 PM, Linus Walleij wrote:

> ata_host_alloc_pinfo() assigns the host pointer to the
> struct device * drvdata, do not assign it a second time.

    It's actually driver_data, not drvdata.
    Personally, I now prefer expressing the *struct* fields the C++ way:
device::driver_data. :-)

>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

MBR, Sergei


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/6] ata: bf54x: cut drvdata assignment
  2017-05-30  9:46 [PATCH 1/6] ata: bf54x: cut drvdata assignment Linus Walleij
                   ` (5 preceding siblings ...)
  2017-05-30 12:22 ` [PATCH 1/6] ata: bf54x: " Sergei Shtylyov
@ 2017-05-30 15:55 ` Tejun Heo
  6 siblings, 0 replies; 8+ messages in thread
From: Tejun Heo @ 2017-05-30 15:55 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Bartlomiej Zolnierkiewicz, linux-ide

On Tue, May 30, 2017 at 11:46:39AM +0200, Linus Walleij wrote:
> ata_host_alloc_pinfo() assigns the host pointer to the
> struct device * drvdata, do not assign it a second time.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Applied 1-6 to libata/for-4.13.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-30 15:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30  9:46 [PATCH 1/6] ata: bf54x: cut drvdata assignment Linus Walleij
2017-05-30  9:46 ` [PATCH 2/6] ata: ep93xx: " Linus Walleij
2017-05-30  9:46 ` [PATCH 3/6] ata: dwc_460ex: " Linus Walleij
2017-05-30  9:46 ` [PATCH 4/6] ata: rb532_cf: " Linus Walleij
2017-05-30  9:46 ` [PATCH 5/6] ata: samsung_cf: " Linus Walleij
2017-05-30  9:46 ` [PATCH 6/6] ata: sata_fsl: " Linus Walleij
2017-05-30 12:22 ` [PATCH 1/6] ata: bf54x: " Sergei Shtylyov
2017-05-30 15:55 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.