lkml.org 
[lkml]   [2015]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] dma: fix returnvar.cocci warnings
From
Date


On 11/8/2015 4:39 PM, Daniel K. wrote:
> On 11/08/2015 07:45 AM, Julia Lawall wrote:
>> Remove unneeded variable used to store return value.
>>
>> --- a/drivers/dma/qcom/hidma_ll.c
>> +++ b/drivers/dma/qcom/hidma_ll.c
>> @@ -567,14 +567,13 @@ int hidma_ll_resume(struct hidma_lldev *
>>
>> static int hidma_ll_hw_start(struct hidma_lldev *lldev)
>> {
>> - int rc = 0;
>> unsigned long irqflags;
>>
>> spin_lock_irqsave(&lldev->lock, irqflags);
>> writel(lldev->tre_write_offset, lldev->trca + TRCA_DOORBELL_OFFSET);
>> spin_unlock_irqrestore(&lldev->lock, irqflags);
>>
>> - return rc;
>> + return 0;
>> }
>>
>> bool hidma_ll_isenabled(struct hidma_lldev *lldev)
>
> Seems rather pointless, what about 'static void ...' and dropping the
> return statement?
>
>
> Daniel K.
>

Yes, that's what I ended up doing. rc was forgotten there because I had
to restructure code to use the issue_pending API.

--
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project


\
 
 \ /
  Last update: 2015-11-08 23:21    [W:0.077 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site