Skip to contentSkip to conversation

mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd'

PATCH Superseded Brian Norris 2 participants 5 messages Mar 5, 2016 – Mar 7, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd'

---
 drivers/mtd/nand/pxa3xx_nand.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mtd/nand/pxa3xx_nand.c +0 -2
index f100c4da0423..a60c413c8d7f 100644
@@ -211,7 +211,6 @@ struct pxa3xx_nand_info {
 	struct dma_chan		*dma_chan;
 	dma_cookie_t		dma_cookie;
 	int			drcmr_dat;
-	int			drcmr_cmd;
 
 	unsigned char		*data_buff;
 	unsigned char		*oob_buff;
@@ -1812,7 +1811,6 @@ static int alloc_nand_resource(struct platform_device *pdev)
 			ret = -ENXIO;
 			goto fail_disable_clk;
 		}
-		info->drcmr_cmd = r->start;
 	}
 
 	irq = platform_get_irq(pdev, 0);
Signature · 1 line
2.7.0.rc3.207.g0ac5344
#1 lore raw
Quoted 1 line · Brian Norris

Hi Brian,

drivers/mtd/nand/pxa3xx_nand.c static int alloc_nand_resource(struct platform_device *pdev) · line 1814

Quoted 6 lines
drivers/mtd/nand/pxa3xx_nand.c +0 -1
@@ -1812,7 +1811,6 @@ static int alloc_nand_resource(struct platform_device *pdev)
 			ret = -ENXIO;
 			goto fail_disable_clk;
 		}
-		info->drcmr_cmd = r->start;
 	}

If you kill this field, why not kill also this block just above ?

		r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
		if (r == NULL) {
			dev_err(&pdev->dev,
				"no resource defined for cmd DMA\n");
			ret = -ENXIO;
			goto fail_disable_clk;
		}

Cheers.

Signature · 1 line
Robert
#2 lore raw

PATCH v2 1/1 mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd'

With this removal, we don't need to 'get' the second DMA resource either, as it's also unused.

---

Quoted 8 lines · Robert Jarzmik

Review static int alloc_nand_resource(struct platform_device *pdev) · line 1814

Quoted 6 lines · Brian Norris
(quoted diff) +0 -1
@@ -1812,7 +1811,6 @@ static int alloc_nand_resource(struct platform_device *pdev)
 			ret = -ENXIO;
 			goto fail_disable_clk;
 		}
-		info->drcmr_cmd = r->start;
 	}

If you kill this field, why not kill also this block just above ?

Quoted 7 lines
		r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
		if (r == NULL) {
			dev_err(&pdev->dev,
				"no resource defined for cmd DMA\n");
			ret = -ENXIO;
			goto fail_disable_clk;
		}

Indeed, why not.

 drivers/mtd/nand/pxa3xx_nand.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/mtd/nand/pxa3xx_nand.c +0 -10
index f100c4da0423..d6508856da99 100644
@@ -211,7 +211,6 @@ struct pxa3xx_nand_info {
 	struct dma_chan		*dma_chan;
 	dma_cookie_t		dma_cookie;
 	int			drcmr_dat;
-	int			drcmr_cmd;
 
 	unsigned char		*data_buff;
 	unsigned char		*oob_buff;
@@ -1804,15 +1803,6 @@ static int alloc_nand_resource(struct platform_device *pdev)
 			goto fail_disable_clk;
 		}
 		info->drcmr_dat = r->start;
-
-		r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
-		if (r == NULL) {
-			dev_err(&pdev->dev,
-				"no resource defined for cmd DMA\n");
-			ret = -ENXIO;
-			goto fail_disable_clk;
-		}
-		info->drcmr_cmd = r->start;
 	}
 
 	irq = platform_get_irq(pdev, 0);
Signature · 1 line
2.7.0.rc3.207.g0ac5344
Acked-by on v2 1/1
#3 lore raw
Quoted 22 lines · Brian Norris

With this removal, we don't need to 'get' the second DMA resource either, as it's also unused.

---

Quoted 8 lines · Robert Jarzmik

drivers/mtd/nand/pxa3xx_nand.c static int alloc_nand_resource(struct platform_device *pdev) · line 1814

Quoted 6 lines · Brian Norris
drivers/mtd/nand/pxa3xx_nand.c +0 -1
@@ -1812,7 +1811,6 @@ static int alloc_nand_resource(struct platform_device *pdev)
 			ret = -ENXIO;
 			goto fail_disable_clk;
 		}
-		info->drcmr_cmd = r->start;
 	}

If you kill this field, why not kill also this block just above ?

Quoted 7 lines
		r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
		if (r == NULL) {
			dev_err(&pdev->dev,
				"no resource defined for cmd DMA\n");
			ret = -ENXIO;
			goto fail_disable_clk;
		}
Quoted 4 lines

Indeed, why not.

 drivers/mtd/nand/pxa3xx_nand.c | 10 ----------
 1 file changed, 10 deletions(-)

Cheers.

--
Robert

author Applied
#4 lore raw
Quoted 24 lines · Robert Jarzmik
Quoted 22 lines · Brian Norris

With this removal, we don't need to 'get' the second DMA resource either, as it's also unused.

---

Quoted 15 lines · Robert Jarzmik

drivers/mtd/nand/pxa3xx_nand.c static int alloc_nand_resource(struct platform_device *pdev) · line 1814

Quoted 6 lines · Brian Norris
drivers/mtd/nand/pxa3xx_nand.c +0 -1
@@ -1812,7 +1811,6 @@ static int alloc_nand_resource(struct platform_device *pdev)
 			ret = -ENXIO;
 			goto fail_disable_clk;
 		}
-		info->drcmr_cmd = r->start;
 	}

If you kill this field, why not kill also this block just above ?

		r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
		if (r == NULL) {
			dev_err(&pdev->dev,
				"no resource defined for cmd DMA\n");
			ret = -ENXIO;
			goto fail_disable_clk;
		}
Quoted 5 lines
Quoted 4 lines

Indeed, why not.

 drivers/mtd/nand/pxa3xx_nand.c | 10 ----------
 1 file changed, 10 deletions(-)

Applied to l2-mtd.git