Skip to contentSkip to conversation

dmaengine: mmp_pdma: fix mismerge

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 28, 2014 – Jan 29, 2014 dmaengine

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: mmp_pdma: fix mismerge

The merge between 2b7f65b11d87f "mmp_pdma: Style neatening" and 8010dad55a0ab0 "dma: add dma_get_any_slave_channel(), for use in of_xlate()" caused a build error by leaving obsolete code in place:

mmp_pdma.c: In function 'mmp_pdma_dma_xlate':
mmp_pdma.c:909:31: error: 'candidate' undeclared mmp_pdma.c:912:3: error: label 'retry' used but not defined mmp_pdma.c:901:24: warning: unused variable 'c' [-Wunused-variable]

This removes the extraneous lines.

drivers/dma/mmp_pdma.c +0 -8
index 32e58ee..69c6a12 100644
@@ -898,19 +898,11 @@ static struct dma_chan *mmp_pdma_dma_xlate(struct of_phandle_args *dma_spec,
 {
 	struct mmp_pdma_device *d = ofdma->of_dma_data;
 	struct dma_chan *chan;
-	struct mmp_pdma_chan *c;
 
 	chan = dma_get_any_slave_channel(&d->device);
 	if (!chan)
 		return NULL;
 
-	/* dma_get_slave_channel will return NULL if we lost a race between
-	 * the lookup and the reservation */
-	chan = dma_get_slave_channel(candidate);
-
-	if (!chan)
-		goto retry;
-
 	to_mmp_pdma_chan(chan)->drcmr = dma_spec->args[0];
 
 	return chan;
#1 lore raw
Quoted 4 lines · Arnd Bergmann

The merge between 2b7f65b11d87f "mmp_pdma: Style neatening" and 8010dad55a0ab0 "dma: add dma_get_any_slave_channel(), for use in of_xlate()" caused a build error by leaving obsolete code in place:

Quoted 8 lines

mmp_pdma.c: In function 'mmp_pdma_dma_xlate':
mmp_pdma.c:909:31: error: 'candidate' undeclared mmp_pdma.c:912:3: error: label 'retry' used but not defined mmp_pdma.c:901:24: warning: unused variable 'c' [-Wunused-variable]

This removes the extraneous lines.

Applied thanks

--
~Vinod

Quoted 26 lines
drivers/dma/mmp_pdma.c +0 -8
index 32e58ee..69c6a12 100644
@@ -898,19 +898,11 @@ static struct dma_chan *mmp_pdma_dma_xlate(struct of_phandle_args *dma_spec,
 {
 	struct mmp_pdma_device *d = ofdma->of_dma_data;
 	struct dma_chan *chan;
-	struct mmp_pdma_chan *c;
 
 	chan = dma_get_any_slave_channel(&d->device);
 	if (!chan)
 		return NULL;
 
-	/* dma_get_slave_channel will return NULL if we lost a race between
-	 * the lookup and the reservation */
-	chan = dma_get_slave_channel(candidate);
-
-	if (!chan)
-		goto retry;
-
 	to_mmp_pdma_chan(chan)->drcmr = dma_spec->args[0];
 
 	return chan;