diff mbox

[01/28] dmaengine: use DMA_COMPLETE for dma completion status

Message ID 20131030130325.GA18788@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vinod Koul Oct. 30, 2013, 1:03 p.m. UTC
On Tue, Oct 29, 2013 at 09:47:55AM -0700, Olof Johansson wrote:
> This patch broke some TI platforms (using edma) due to namespace
> conflicts. The error is:
> 
> ../../include/linux/dmaengine.h:54:2: error: expected identifier
> before numeric constant   (for DMA_COMPLETE)
> 
> .. it's because they define DMA_COMPLETE in include/platform_data/edma.h.
> 
> The edma driver seems to overall lack prefixes and thus pollutes
> global namespaces, so it should be fixed up.
Yup this needs some work.

I fixed up the error with below, can you pls verify. Pls note this is compile
tested only!

-----><8---------------------------

From: Vinod Koul <vinod.koul@intel.com>
Date: Wed, 30 Oct 2013 18:22:30 +0530
Subject: [PATCH] dmanengine: fix edma driver to not define DMA_COMPLETE

edma header defines DMA_COMPLETE, this causes issues as commit adfedd9a32e4 move
DMA_SUCCESS to DMA_COMPLETE. edma should properly namespace its defines and
needs a future fix

Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 arch/arm/common/edma.c             |    4 ++--
 drivers/dma/edma.c                 |    4 ++--
 include/linux/platform_data/edma.h |    8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

Comments

Olof Johansson Nov. 11, 2013, 7:13 p.m. UTC | #1
On Wed, Oct 30, 2013 at 06:33:25PM +0530, Vinod Koul wrote:
> On Tue, Oct 29, 2013 at 09:47:55AM -0700, Olof Johansson wrote:
> > This patch broke some TI platforms (using edma) due to namespace
> > conflicts. The error is:
> > 
> > ../../include/linux/dmaengine.h:54:2: error: expected identifier
> > before numeric constant   (for DMA_COMPLETE)
> > 
> > .. it's because they define DMA_COMPLETE in include/platform_data/edma.h.
> > 
> > The edma driver seems to overall lack prefixes and thus pollutes
> > global namespaces, so it should be fixed up.
> Yup this needs some work.
> 
> I fixed up the error with below, can you pls verify. Pls note this is compile
> tested only!
> 
> -----><8---------------------------
> 
> From: Vinod Koul <vinod.koul@intel.com>
> Date: Wed, 30 Oct 2013 18:22:30 +0530
> Subject: [PATCH] dmanengine: fix edma driver to not define DMA_COMPLETE
> 
> edma header defines DMA_COMPLETE, this causes issues as commit adfedd9a32e4 move
> DMA_SUCCESS to DMA_COMPLETE. edma should properly namespace its defines and
> needs a future fix
> 
> Reported-by: Olof Johansson <olof@lixom.net>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>

Thanks, I've applied this to fixes together with the follow-up from
Sebastian. Cc:ing Mark since it touches drivers/soc.


-Olof
Vinod Koul Nov. 12, 2013, 4 a.m. UTC | #2
On Mon, Nov 11, 2013 at 11:13:39AM -0800, Olof Johansson wrote:
> On Wed, Oct 30, 2013 at 06:33:25PM +0530, Vinod Koul wrote:
> > On Tue, Oct 29, 2013 at 09:47:55AM -0700, Olof Johansson wrote:
> > > This patch broke some TI platforms (using edma) due to namespace
> > > conflicts. The error is:
> > > 
> > > ../../include/linux/dmaengine.h:54:2: error: expected identifier
> > > before numeric constant   (for DMA_COMPLETE)
> > > 
> > > .. it's because they define DMA_COMPLETE in include/platform_data/edma.h.
> > > 
> > > The edma driver seems to overall lack prefixes and thus pollutes
> > > global namespaces, so it should be fixed up.
> > Yup this needs some work.
> > 
> > I fixed up the error with below, can you pls verify. Pls note this is compile
> > tested only!
> > 
> > -----><8---------------------------
> > 
> > From: Vinod Koul <vinod.koul@intel.com>
> > Date: Wed, 30 Oct 2013 18:22:30 +0530
> > Subject: [PATCH] dmanengine: fix edma driver to not define DMA_COMPLETE
> > 
> > edma header defines DMA_COMPLETE, this causes issues as commit adfedd9a32e4 move
> > DMA_SUCCESS to DMA_COMPLETE. edma should properly namespace its defines and
> > needs a future fix
> > 
> > Reported-by: Olof Johansson <olof@lixom.net>
> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> 
> Thanks, I've applied this to fixes together with the follow-up from
> Sebastian. Cc:ing Mark since it touches drivers/soc.
I had applied this a while back and pushed only thing remaining was Sebastian's
patch.  Since this is dependent on the series I am sending to Linus in a day ro
two, would prefer things to go thru this tree only.

Let me know if you are okay and will apply Sebastian fix on my next

--
~Vinod
Vinod Koul Nov. 12, 2013, 4:47 a.m. UTC | #3
On Mon, Nov 11, 2013 at 09:11:18PM -0800, Olof Johansson wrote:
> On Mon, Nov 11, 2013 at 8:00 PM, Vinod Koul <vinod.koul@intel.com> wrote:
> > On Mon, Nov 11, 2013 at 11:13:39AM -0800, Olof Johansson wrote:
> >> On Wed, Oct 30, 2013 at 06:33:25PM +0530, Vinod Koul wrote:
> >> > On Tue, Oct 29, 2013 at 09:47:55AM -0700, Olof Johansson wrote:
> >> > > This patch broke some TI platforms (using edma) due to namespace
> >> > > conflicts. The error is:
> >> > >
> >> > > ../../include/linux/dmaengine.h:54:2: error: expected identifier
> >> > > before numeric constant   (for DMA_COMPLETE)
> >> > >
> >> > > .. it's because they define DMA_COMPLETE in include/platform_data/edma.h.
> >> > >
> >> > > The edma driver seems to overall lack prefixes and thus pollutes
> >> > > global namespaces, so it should be fixed up.
> >> > Yup this needs some work.
> >> >
> >> > I fixed up the error with below, can you pls verify. Pls note this is compile
> >> > tested only!
> >> >
> >> > -----><8---------------------------
> >> >
> >> > From: Vinod Koul <vinod.koul@intel.com>
> >> > Date: Wed, 30 Oct 2013 18:22:30 +0530
> >> > Subject: [PATCH] dmanengine: fix edma driver to not define DMA_COMPLETE
> >> >
> >> > edma header defines DMA_COMPLETE, this causes issues as commit adfedd9a32e4 move
> >> > DMA_SUCCESS to DMA_COMPLETE. edma should properly namespace its defines and
> >> > needs a future fix
> >> >
> >> > Reported-by: Olof Johansson <olof@lixom.net>
> >> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> >>
> >> Thanks, I've applied this to fixes together with the follow-up from
> >> Sebastian. Cc:ing Mark since it touches drivers/soc.
> > I had applied this a while back and pushed only thing remaining was Sebastian's
> > patch.  Since this is dependent on the series I am sending to Linus in a day ro
> > two, would prefer things to go thru this tree only.
> >
> > Let me know if you are okay and will apply Sebastian fix on my next
> 
> Ah, go ahead -- I thought it hadn't been picked up yet since there
> were still failures (i.e. due to Sebastian's fixes). Feel free to add
> my Acked-by where you still can. :-)
Sure, applied this one

> I have a couple of small fixes to take care of warnings with LPAE
> configs that I hope to get out tonight or tomorrow morning, it'd be
> nice to see them go in too (just printk format warning fixes).
Sure, I will hold off for few more days for more coverage. Also if you/Sebastian
can check more if anything still breaks and we fix it before sending would be
good too

--
~Vinod
Olof Johansson Nov. 12, 2013, 5:11 a.m. UTC | #4
On Mon, Nov 11, 2013 at 8:00 PM, Vinod Koul <vinod.koul@intel.com> wrote:
> On Mon, Nov 11, 2013 at 11:13:39AM -0800, Olof Johansson wrote:
>> On Wed, Oct 30, 2013 at 06:33:25PM +0530, Vinod Koul wrote:
>> > On Tue, Oct 29, 2013 at 09:47:55AM -0700, Olof Johansson wrote:
>> > > This patch broke some TI platforms (using edma) due to namespace
>> > > conflicts. The error is:
>> > >
>> > > ../../include/linux/dmaengine.h:54:2: error: expected identifier
>> > > before numeric constant   (for DMA_COMPLETE)
>> > >
>> > > .. it's because they define DMA_COMPLETE in include/platform_data/edma.h.
>> > >
>> > > The edma driver seems to overall lack prefixes and thus pollutes
>> > > global namespaces, so it should be fixed up.
>> > Yup this needs some work.
>> >
>> > I fixed up the error with below, can you pls verify. Pls note this is compile
>> > tested only!
>> >
>> > -----><8---------------------------
>> >
>> > From: Vinod Koul <vinod.koul@intel.com>
>> > Date: Wed, 30 Oct 2013 18:22:30 +0530
>> > Subject: [PATCH] dmanengine: fix edma driver to not define DMA_COMPLETE
>> >
>> > edma header defines DMA_COMPLETE, this causes issues as commit adfedd9a32e4 move
>> > DMA_SUCCESS to DMA_COMPLETE. edma should properly namespace its defines and
>> > needs a future fix
>> >
>> > Reported-by: Olof Johansson <olof@lixom.net>
>> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
>>
>> Thanks, I've applied this to fixes together with the follow-up from
>> Sebastian. Cc:ing Mark since it touches drivers/soc.
> I had applied this a while back and pushed only thing remaining was Sebastian's
> patch.  Since this is dependent on the series I am sending to Linus in a day ro
> two, would prefer things to go thru this tree only.
>
> Let me know if you are okay and will apply Sebastian fix on my next

Ah, go ahead -- I thought it hadn't been picked up yet since there
were still failures (i.e. due to Sebastian's fixes). Feel free to add
my Acked-by where you still can. :-)

I have a couple of small fixes to take care of warnings with LPAE
configs that I hope to get out tonight or tomorrow morning, it'd be
nice to see them go in too (just printk format warning fixes).


-Olof
diff mbox

Patch

diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 8e1a024..41bca32 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -404,7 +404,7 @@  static irqreturn_t dma_irq_handler(int irq, void *data)
 					BIT(slot));
 			if (edma_cc[ctlr]->intr_data[channel].callback)
 				edma_cc[ctlr]->intr_data[channel].callback(
-					channel, DMA_COMPLETE,
+					channel, EDMA_DMA_COMPLETE,
 					edma_cc[ctlr]->intr_data[channel].data);
 		}
 	} while (sh_ipr);
@@ -459,7 +459,7 @@  static irqreturn_t dma_ccerr_handler(int irq, void *data)
 								callback) {
 						edma_cc[ctlr]->intr_data[k].
 						callback(k,
-						DMA_CC_ERROR,
+						EDMA_DMA_CC_ERROR,
 						edma_cc[ctlr]->intr_data
 						[k].data);
 					}
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 29fa358..cb69f3a 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -407,7 +407,7 @@  static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
 	edma_pause(echan->ch_num);
 
 	switch (ch_status) {
-	case DMA_COMPLETE:
+	case EDMA_DMA_COMPLETE:
 		spin_lock_irqsave(&echan->vchan.lock, flags);
 
 		edesc = echan->edesc;
@@ -426,7 +426,7 @@  static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
 		spin_unlock_irqrestore(&echan->vchan.lock, flags);
 
 		break;
-	case DMA_CC_ERROR:
+	case EDMA_DMA_CC_ERROR:
 		spin_lock_irqsave(&echan->vchan.lock, flags);
 
 		edma_read_slot(EDMA_CHAN_SLOT(echan->slot[0]), &p);
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
index 179fb91..f50821c 100644
--- a/include/linux/platform_data/edma.h
+++ b/include/linux/platform_data/edma.h
@@ -67,10 +67,10 @@  struct edmacc_param {
 #define ITCCHEN		BIT(23)
 
 /*ch_status paramater of callback function possible values*/
-#define DMA_COMPLETE 1
-#define DMA_CC_ERROR 2
-#define DMA_TC1_ERROR 3
-#define DMA_TC2_ERROR 4
+#define EDMA_DMA_COMPLETE 1
+#define EDMA_DMA_CC_ERROR 2
+#define EDMA_DMA_TC1_ERROR 3
+#define EDMA_DMA_TC2_ERROR 4
 
 enum address_mode {
 	INCR = 0,