diff mbox

[LINUX,3/4] dmaengine: xilinx_dma: Fix compilation warning

Message ID 1513851098-15787-4-git-send-email-appanad@xilinx.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Appana Durga Kedareswara rao Dec. 21, 2017, 10:11 a.m. UTC
This patch fixes the below sparse warning in the driver
drivers/dma/xilinx/xilinx_dma.c: In function ‘xilinx_vdma_dma_prep_interleaved’:
drivers/dma/xilinx/xilinx_dma.c:1614:43: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable]
  struct xilinx_vdma_tx_segment *segment, *prev = NULL;

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
---
 drivers/dma/xilinx/xilinx_dma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Vinod Koul Jan. 3, 2018, 3:59 a.m. UTC | #1
On Thu, Dec 21, 2017 at 03:41:37PM +0530, Kedareswara rao Appana wrote:

Fix title here too

BTW whats with LINUX tag in patches, pls drop them

> This patch fixes the below sparse warning in the driver
> drivers/dma/xilinx/xilinx_dma.c: In function ‘xilinx_vdma_dma_prep_interleaved’:
> drivers/dma/xilinx/xilinx_dma.c:1614:43: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable]
>   struct xilinx_vdma_tx_segment *segment, *prev = NULL;
> 
> Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
> ---
>  drivers/dma/xilinx/xilinx_dma.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index 8467671..845e638 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1611,7 +1611,7 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan,
>  {
>  	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
>  	struct xilinx_dma_tx_descriptor *desc;
> -	struct xilinx_vdma_tx_segment *segment, *prev = NULL;
> +	struct xilinx_vdma_tx_segment *segment;
>  	struct xilinx_vdma_desc_hw *hw;
>  
>  	if (!is_slave_direction(xt->dir))
> @@ -1665,8 +1665,6 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan,
>  	/* Insert the segment into the descriptor segments list. */
>  	list_add_tail(&segment->node, &desc->segments);
>  
> -	prev = segment;
> -
>  	/* Link the last hardware descriptor with the first. */
>  	segment = list_first_entry(&desc->segments,
>  				   struct xilinx_vdma_tx_segment, node);
> -- 
> 2.7.4
>
Appana Durga Kedareswara Rao Jan. 3, 2018, 5:13 a.m. UTC | #2
SGkgVmlub2QsDQoNCglUaGFua3MgZm9yIHRoZSByZXZpZXcuLi4gDQoNCj4NCj5PbiBUaHUsIERl
YyAyMSwgMjAxNyBhdCAwMzo0MTozN1BNICswNTMwLCBLZWRhcmVzd2FyYSByYW8gQXBwYW5hIHdy
b3RlOg0KPg0KPkZpeCB0aXRsZSBoZXJlIHRvbw0KDQpTdXJlIHdpbGwgZml4IGluIHYyLi4uIA0K
DQo+DQo+QlRXIHdoYXRzIHdpdGggTElOVVggdGFnIGluIHBhdGNoZXMsIHBscyBkcm9wIHRoZW0N
Cg0KT2sgd2lsbCBtZW50aW9uIHRoZSBMaW51eCB0YWcgaW5mbyBpbiB0aGUgY292ZXIgbGV0dGVy
IHBhdGNoIGZyb20gdGhlIG5leHQgcGF0Y2ggc2VyaWVzIG9uIHdhcmRzLi4uDQoNClJlZ2FyZHMs
DQpLZWRhci4NCg0KPg0KPj4gVGhpcyBwYXRjaCBmaXhlcyB0aGUgYmVsb3cgc3BhcnNlIHdhcm5p
bmcgaW4gdGhlIGRyaXZlcg0KPj4gZHJpdmVycy9kbWEveGlsaW54L3hpbGlueF9kbWEuYzogSW4g
ZnVuY3Rpb24NCj7igJh4aWxpbnhfdmRtYV9kbWFfcHJlcF9pbnRlcmxlYXZlZOKAmToNCj4+IGRy
aXZlcnMvZG1hL3hpbGlueC94aWxpbnhfZG1hLmM6MTYxNDo0Mzogd2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tYV90eF9zZWdtZW50ICpzZWdtZW50Ow0K
Pj4gIAlzdHJ1Y3QgeGlsaW54X3ZkbWFfZGVzY19odyAqaHc7DQo+Pg0KPj4gIAlpZiAoIWlzX3Ns
YXZlX2RpcmVjdGlvbih4dC0+ZGlyKSkNCj4+IEBAIC0xNjY1LDggKzE2NjUsNiBAQCB4aWxpbnhf
dmRtYV9kbWFfcHJlcF9pbnRlcmxlYXZlZChzdHJ1Y3QgZG1hX2NoYW4NCj4qZGNoYW4sDQo+PiAg
CS8qIEluc2VydCB0aGUgc2VnbWVudCBpbnRvIHRoZSBkZXNjcmlwdG9yIHNlZ21lbnRzIGxpc3Qu
ICovDQo+PiAgCWxpc3RfYWRkX3RhaWwoJnNlZ21lbnQtPm5vZGUsICZkZXNjLT5zZWdtZW50cyk7
DQo+Pg0KPj4gLQlwcmV2ID0gc2VnbWVudDsNCj4+IC0NCj4+ICAJLyogTGluayB0aGUgbGFzdCBo
YXJkd2FyZSBkZXNjcmlwdG9yIHdpdGggdGhlIGZpcnN0LiAqLw0KPj4gIAlzZWdtZW50ID0gbGlz
dF9maXJzdF9lbnRyeSgmZGVzYy0+c2VnbWVudHMsDQo+PiAgCQkJCSAgIHN0cnVjdCB4aWxpbnhf
dmRtYV90eF9zZWdtZW50LCBub2RlKTsNCj4+IC0tDQo+PiAyLjcuNA0KPj4NCj4NCj4tLQ0KPn5W
aW5vZA0K
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul Jan. 3, 2018, 5:27 a.m. UTC | #3
On Wed, Jan 03, 2018 at 05:13:29AM +0000, Appana Durga Kedareswara Rao wrote:
> Hi Vinod,
> 
> 	Thanks for the review... 
> 
> >
> >On Thu, Dec 21, 2017 at 03:41:37PM +0530, Kedareswara rao Appana wrote:
> >
> >Fix title here too
> 
> Sure will fix in v2... 
> 
> >
> >BTW whats with LINUX tag in patches, pls drop them
> 
> Ok will mention the Linux tag info in the cover letter patch from the next
> patch series on wards...

Please wrap your replies within 80chars. It is very hard to read! I have
reflown for readability

Can you explain what you mean by that info, what are you trying to convey?
Appana Durga Kedareswara Rao Jan. 3, 2018, 6:10 a.m. UTC | #4
Hi Vinod,


>On Wed, Jan 03, 2018 at 05:13:29AM +0000, Appana Durga Kedareswara Rao
>wrote:
>> Hi Vinod,
>>
>> 	Thanks for the review...
>>
>> >
>> >On Thu, Dec 21, 2017 at 03:41:37PM +0530, Kedareswara rao Appana wrote:
>> >
>> >Fix title here too
>>
>> Sure will fix in v2...
>>
>> >
>> >BTW whats with LINUX tag in patches, pls drop them
>>
>> Ok will mention the Linux tag info in the cover letter patch from the
>> next patch series on wards...
>
>Please wrap your replies within 80chars. It is very hard to read! I have reflown for
>readability

Sure will take care of it next time onwards... 

>
>Can you explain what you mean by that info, what are you trying to convey?

What I mean here is will mention the Linux kernel tag
Information in the cover letter patch...

Regards,
Kedar.

>
>--
>~Vinod
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Appana Durga Kedareswara Rao Jan. 3, 2018, 9:09 a.m. UTC | #5
Hi,

<Snip>
>>> >BTW whats with LINUX tag in patches, pls drop them
>>>
>>> Ok will mention the Linux tag info in the cover letter patch from the
>>> next patch series on wards...
>>
>>Please wrap your replies within 80chars. It is very hard to read! I have reflown
>for
>>readability
>
>Sure will take care of it next time onwards...
>
>>
>>Can you explain what you mean by that info, what are you trying to convey?
>
>What I mean here is will mention the Linux kernel tag
>Information in the cover letter patch...

Oops sorry I misunderstood your comment... 
In my company we have internally different projects
To differentiate b/w them we usually use LINUX prefix
By mistake I have added the LINUX prefix in this patch series
I have removed it in the v2 series... 

Regards,
Kedar.

>
>Regards,
>Kedar.
>
>>
>>--
>>~Vinod
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 8467671..845e638 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1611,7 +1611,7 @@  xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan,
 {
 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
 	struct xilinx_dma_tx_descriptor *desc;
-	struct xilinx_vdma_tx_segment *segment, *prev = NULL;
+	struct xilinx_vdma_tx_segment *segment;
 	struct xilinx_vdma_desc_hw *hw;
 
 	if (!is_slave_direction(xt->dir))
@@ -1665,8 +1665,6 @@  xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan,
 	/* Insert the segment into the descriptor segments list. */
 	list_add_tail(&segment->node, &desc->segments);
 
-	prev = segment;
-
 	/* Link the last hardware descriptor with the first. */
 	segment = list_first_entry(&desc->segments,
 				   struct xilinx_vdma_tx_segment, node);