Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1487867

Re: [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type

From Peter Ujfalusi <peter.ujfalusi@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type
Date 2016-09-21 09:40 +0200
Message-ID <sjKim-64W-13@gated-at.bofh.it> (permalink)
References <shWQG-2fE-7@gated-at.bofh.it> <shWQG-2fE-37@gated-at.bofh.it> <sjGHM-3JI-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/21/16 06:52, Vinod Koul wrote:
> On Fri, Sep 16, 2016 at 11:33:23AM +0300, Peter Ujfalusi wrote:
>> Fixes compiler warning on 64bit architectures.
> 
> Would be good to give the warning message here

Let me revert this patch and patch #2 for the eDMA to get the warnings.

I will repost v2 with the updated commit messages.

> 
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> ---
>>  drivers/dma/ti-dma-crossbar.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
>> index e4f3bd1ae264..876e4ccaf033 100644
>> --- a/drivers/dma/ti-dma-crossbar.c
>> +++ b/drivers/dma/ti-dma-crossbar.c
>> @@ -16,8 +16,10 @@
>>  #include <linux/of_device.h>
>>  #include <linux/of_dma.h>
>>  
>> -#define TI_XBAR_DRA7		0
>> -#define TI_XBAR_AM335X		1
>> +enum ti_xbar_type {
>> +	TI_XBAR_DRA7 = 0,
>> +	TI_XBAR_AM335X,
>> +};
>>  
>>  static const struct of_device_id ti_dma_xbar_match[] = {
>>  	{
>> @@ -395,7 +397,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
>>  
>>  	xbar->dmarouter.dev = &pdev->dev;
>>  	xbar->dmarouter.route_free = ti_dra7_xbar_free;
>> -	xbar->dma_offset = (u32)match->data;
>> +	xbar->dma_offset = (enum ti_xbar_type)match->data;
>>  
>>  	mutex_init(&xbar->mutex);
>>  	platform_set_drvdata(pdev, xbar);
>> @@ -428,7 +430,7 @@ static int ti_dma_xbar_probe(struct platform_device *pdev)
>>  	if (unlikely(!match))
>>  		return -EINVAL;
>>  
>> -	switch ((u32)match->data) {
>> +	switch ((enum ti_xbar_type)match->data) {
>>  	case TI_XBAR_DRA7:
>>  		ret = ti_dra7_xbar_probe(pdev);
>>  		break;
>> -- 
>> 2.10.0
>>
> 


-- 
Péter

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-16 10:40 +0200
  [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-16 10:40 +0200
    Re: [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar  type Vinod Koul <vinod.koul@intel.com> - 2016-09-21 05:50 +0200
      Re: [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar  type Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-21 09:40 +0200
  [PATCH 6/9] dmaengine: omap-dma: enable COMPILE_TEST Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-16 10:40 +0200
  [PATCH 2/9] dmaengine: edma: Use enum for eDMA binding type (legacy vs TPCC) Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-16 10:40 +0200
  [PATCH 1/9] dmaengine: edma: Add missing MODULE_DEVICE_TABLE() for of_device_id structs Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-16 10:40 +0200
  [PATCH 4/9] dmaengine: edma: enable COMPILE_TEST Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-16 10:40 +0200

csiph-web