linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings.
@ 2018-05-17  9:59 Srinivas Kandagatla
  2018-05-17  9:59 ` [PATCH] dmaengine: qcom: bam_dma: fix invalid assignment warning Srinivas Kandagatla
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Srinivas Kandagatla @ 2018-05-17  9:59 UTC (permalink / raw)
  To: agross, vkoul, dmaengine
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, Srinivas Kandagatla

Building kernel with W=1 throws up below warnings:
bam_dma.c:459: warning: Function parameter or member 'dir'
	not described in 'bam_chan_init_hw'
bam_dma.c:697: warning: Function parameter or member 'chan'
	not described in 'bam_dma_terminate_all'
bam_dma.c:697: warning: Excess function parameter 'bchan'
	description in 'bam_dma_terminate_all'
bam_dma.c:964: warning: Function parameter or member 'bchan'
	not described in 'bam_start_dma'

Fix these!.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/dma/qcom/bam_dma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 4a828c18099a..a05fff8a1447 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -451,7 +451,7 @@ static void bam_reset_channel(struct bam_chan *bchan)
 /**
  * bam_chan_init_hw - Initialize channel hardware
  * @bchan: bam channel
- *
+ * @dir: DMA transfer direction
  * This function resets and initializes the BAM channel
  */
 static void bam_chan_init_hw(struct bam_chan *bchan,
@@ -687,7 +687,7 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
 
 /**
  * bam_dma_terminate_all - terminate all transactions on a channel
- * @bchan: bam dma channel
+ * @chan: bam dma channel
  *
  * Dequeues and frees all transactions
  * No callbacks are done
@@ -958,7 +958,7 @@ static void bam_apply_new_config(struct bam_chan *bchan,
 
 /**
  * bam_start_dma - start next transaction
- * @bchan - bam dma channel
+ * @bchan: bam dma channel
  */
 static void bam_start_dma(struct bam_chan *bchan)
 {
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] dmaengine: qcom: bam_dma: fix invalid assignment warning
  2018-05-17  9:59 [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings Srinivas Kandagatla
@ 2018-05-17  9:59 ` Srinivas Kandagatla
  2018-05-17 10:50 ` [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings Vinod Koul
  2018-05-17 10:59 ` Vinod
  2 siblings, 0 replies; 7+ messages in thread
From: Srinivas Kandagatla @ 2018-05-17  9:59 UTC (permalink / raw)
  To: agross, vkoul, dmaengine
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, Srinivas Kandagatla

Building kernel with W=1 throws below invalid assignment warnings.
bam_dma.c:676:44: warning: invalid assignment: +=
bam_dma.c:676:44:    left side has type unsigned long
bam_dma.c:676:44:    right side has type restricted __le16
bam_dma.c:921:41: warning: invalid assignment: +=
bam_dma.c:921:41:    left side has type unsigned long
bam_dma.c:921:41:    right side has type restricted __le16

Fix them!.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/dma/qcom/bam_dma.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index a05fff8a1447..fac1ac910d75 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -673,7 +673,7 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
 				remainder = 0;
 			}
 
-			async_desc->length += desc->size;
+			async_desc->length += le16_to_cpu(desc->size);
 			desc++;
 		} while (remainder > 0);
 	}
@@ -918,7 +918,8 @@ static enum dma_status bam_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
 				continue;
 
 			for (i = 0; i < async_desc->num_desc; i++)
-				residue += async_desc->curr_desc[i].size;
+				residue += le16_to_cpu(
+						async_desc->curr_desc[i].size);
 		}
 	}
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings.
  2018-05-17  9:59 [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings Srinivas Kandagatla
  2018-05-17  9:59 ` [PATCH] dmaengine: qcom: bam_dma: fix invalid assignment warning Srinivas Kandagatla
@ 2018-05-17 10:50 ` Vinod Koul
  2018-05-17 10:53   ` Srinivas Kandagatla
  2018-05-17 10:59 ` Vinod
  2 siblings, 1 reply; 7+ messages in thread
From: Vinod Koul @ 2018-05-17 10:50 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: agross, dmaengine, linux-arm-msm, linux-kernel, linux-arm-kernel

On 17-05-18, 10:59, Srinivas Kandagatla wrote:
> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
> index 4a828c18099a..a05fff8a1447 100644
> --- a/drivers/dma/qcom/bam_dma.c
> +++ b/drivers/dma/qcom/bam_dma.c
> @@ -451,7 +451,7 @@ static void bam_reset_channel(struct bam_chan *bchan)
>  /**
>   * bam_chan_init_hw - Initialize channel hardware
>   * @bchan: bam channel
> - *
> + * @dir: DMA transfer direction

Do you want to add an empty line here?

>   * This function resets and initializes the BAM channel
-- 
~Vinod

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings.
  2018-05-17 10:50 ` [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings Vinod Koul
@ 2018-05-17 10:53   ` Srinivas Kandagatla
  2018-05-17 10:55     ` Vinod
  0 siblings, 1 reply; 7+ messages in thread
From: Srinivas Kandagatla @ 2018-05-17 10:53 UTC (permalink / raw)
  To: Vinod Koul
  Cc: agross, dmaengine, linux-arm-msm, linux-kernel, linux-arm-kernel



On 17/05/18 11:50, Vinod Koul wrote:
> On 17-05-18, 10:59, Srinivas Kandagatla wrote:
>> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
>> index 4a828c18099a..a05fff8a1447 100644
>> --- a/drivers/dma/qcom/bam_dma.c
>> +++ b/drivers/dma/qcom/bam_dma.c
>> @@ -451,7 +451,7 @@ static void bam_reset_channel(struct bam_chan *bchan)
>>   /**
>>    * bam_chan_init_hw - Initialize channel hardware
>>    * @bchan: bam channel
>> - *
>> + * @dir: DMA transfer direction
> 
> Do you want to add an empty line here?
> 
TBH, Am not 100% sure it it adds any value.

Most of the function docs in the file have this same issue.. :-)

let me know if you still want an empty line, I can respin.

--srini

>>    * This function resets and initializes the BAM channel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings.
  2018-05-17 10:53   ` Srinivas Kandagatla
@ 2018-05-17 10:55     ` Vinod
  2018-05-17 10:56       ` Srinivas Kandagatla
  0 siblings, 1 reply; 7+ messages in thread
From: Vinod @ 2018-05-17 10:55 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: agross, dmaengine, linux-arm-msm, linux-kernel, linux-arm-kernel

On 17-05-18, 11:53, Srinivas Kandagatla wrote:
> 
> 
> On 17/05/18 11:50, Vinod Koul wrote:
> > On 17-05-18, 10:59, Srinivas Kandagatla wrote:
> > > diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
> > > index 4a828c18099a..a05fff8a1447 100644
> > > --- a/drivers/dma/qcom/bam_dma.c
> > > +++ b/drivers/dma/qcom/bam_dma.c
> > > @@ -451,7 +451,7 @@ static void bam_reset_channel(struct bam_chan *bchan)
> > >   /**
> > >    * bam_chan_init_hw - Initialize channel hardware
> > >    * @bchan: bam channel
> > > - *
> > > + * @dir: DMA transfer direction
> > 
> > Do you want to add an empty line here?
> > 
> TBH, Am not 100% sure it it adds any value.
> 
> Most of the function docs in the file have this same issue.. :-)
> 
> let me know if you still want an empty line, I can respin.

Yeah that's why asked, I can edit while applying so no issues

-- 
~Vinod

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings.
  2018-05-17 10:55     ` Vinod
@ 2018-05-17 10:56       ` Srinivas Kandagatla
  0 siblings, 0 replies; 7+ messages in thread
From: Srinivas Kandagatla @ 2018-05-17 10:56 UTC (permalink / raw)
  To: Vinod; +Cc: agross, dmaengine, linux-arm-msm, linux-kernel, linux-arm-kernel



On 17/05/18 11:55, Vinod wrote:
>> let me know if you still want an empty line, I can respin.
> Yeah that's why asked, I can edit while applying so no issues
Thanks, that will work!

--srini

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings.
  2018-05-17  9:59 [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings Srinivas Kandagatla
  2018-05-17  9:59 ` [PATCH] dmaengine: qcom: bam_dma: fix invalid assignment warning Srinivas Kandagatla
  2018-05-17 10:50 ` [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings Vinod Koul
@ 2018-05-17 10:59 ` Vinod
  2 siblings, 0 replies; 7+ messages in thread
From: Vinod @ 2018-05-17 10:59 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: agross, dmaengine, linux-arm-msm, linux-kernel, linux-arm-kernel

On 17-05-18, 10:59, Srinivas Kandagatla wrote:
> Building kernel with W=1 throws up below warnings:
> bam_dma.c:459: warning: Function parameter or member 'dir'
> 	not described in 'bam_chan_init_hw'
> bam_dma.c:697: warning: Function parameter or member 'chan'
> 	not described in 'bam_dma_terminate_all'
> bam_dma.c:697: warning: Excess function parameter 'bchan'
> 	description in 'bam_dma_terminate_all'
> bam_dma.c:964: warning: Function parameter or member 'bchan'
> 	not described in 'bam_start_dma'
> 
> Fix these!.

Applied both, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-17 10:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17  9:59 [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings Srinivas Kandagatla
2018-05-17  9:59 ` [PATCH] dmaengine: qcom: bam_dma: fix invalid assignment warning Srinivas Kandagatla
2018-05-17 10:50 ` [PATCH] dmaengine: qcom: bam_dma: fix some doc warnings Vinod Koul
2018-05-17 10:53   ` Srinivas Kandagatla
2018-05-17 10:55     ` Vinod
2018-05-17 10:56       ` Srinivas Kandagatla
2018-05-17 10:59 ` Vinod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).