All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: linux-mtd@lists.infradead.org,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Subject: [PATCH v2] mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd'
Date: Mon, 7 Mar 2016 10:37:30 -0800	[thread overview]
Message-ID: <20160307183730.GU55664@google.com> (raw)
In-Reply-To: <877fhhwcft.fsf@belgarion.home>

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(-)

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);
-- 
2.7.0.rc3.207.g0ac5344

  reply	other threads:[~2016-03-07 18:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05  3:12 [PATCH] mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd' Brian Norris
2016-03-05  8:34 ` Robert Jarzmik
2016-03-07 18:37   ` Brian Norris [this message]
2016-03-07 19:35     ` [PATCH v2] " Robert Jarzmik
2016-03-07 20:49       ` Brian Norris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160307183730.GU55664@google.com \
    --to=computersforpeace@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=linux-mtd@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.