diff mbox

[v2] mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd'

Message ID 20160307183730.GU55664@google.com
State Accepted
Commit 4cf9339d2036287b734dfdcadcebc9e3daf380b5
Headers show

Commit Message

Brian Norris March 7, 2016, 6:37 p.m. UTC
With this removal, we don't need to 'get' the second DMA resource
either, as it's also unused.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
On Sat, Mar 05, 2016 at 09:34:14AM +0100, Robert Jarzmik wrote:
> Brian Norris <computersforpeace@gmail.com> writes:
> > @@ -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;
> 		}

Indeed, why not.

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

Comments

Robert Jarzmik March 7, 2016, 7:35 p.m. UTC | #1
Brian Norris <computersforpeace@gmail.com> writes:

> With this removal, we don't need to 'get' the second DMA resource
> either, as it's also unused.
>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> ---
> On Sat, Mar 05, 2016 at 09:34:14AM +0100, Robert Jarzmik wrote:
>> Brian Norris <computersforpeace@gmail.com> writes:
>> > @@ -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;
>> 		}
>
> Indeed, why not.
>
>  drivers/mtd/nand/pxa3xx_nand.c | 10 ----------
>  1 file changed, 10 deletions(-)
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

--
Robert
Brian Norris March 7, 2016, 8:49 p.m. UTC | #2
On Mon, Mar 07, 2016 at 08:35:34PM +0100, Robert Jarzmik wrote:
> Brian Norris <computersforpeace@gmail.com> writes:
> 
> > With this removal, we don't need to 'get' the second DMA resource
> > either, as it's also unused.
> >
> > Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> > ---
> > On Sat, Mar 05, 2016 at 09:34:14AM +0100, Robert Jarzmik wrote:
> >> Brian Norris <computersforpeace@gmail.com> writes:
> >> > @@ -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;
> >> 		}
> >
> > Indeed, why not.
> >
> >  drivers/mtd/nand/pxa3xx_nand.c | 10 ----------
> >  1 file changed, 10 deletions(-)
> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Applied to l2-mtd.git
diff mbox

Patch

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index f100c4da0423..d6508856da99 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -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);