From: Sinan Kaya <okaya@codeaurora.org>
To: "Daniel K." <dk@syse.no>, Julia Lawall <julia.lawall@lip6.fr>
Cc: agross@codeaurora.org, kbuild-all@01.org,
dmaengine@vger.kernel.org, timur@codeaurora.org,
cov@codeaurora.org, jcm@redhat.com,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Vinod Koul <vinod.koul@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma: fix returnvar.cocci warnings
Date: Sun, 8 Nov 2015 17:00:00 -0500 [thread overview]
Message-ID: <563FC5E0.8030301@codeaurora.org> (raw)
In-Reply-To: <563FC111.4060308@syse.no>
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
prev parent reply other threads:[~2015-11-08 22:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-08 7:45 [PATCH] dma: fix returnvar.cocci warnings Julia Lawall
2015-11-08 21:15 ` Andy Shevchenko
2015-11-08 21:17 ` Julia Lawall
2015-11-08 21:19 ` Julia Lawall
2015-11-08 21:19 ` Timur Tabi
2015-11-08 21:39 ` Daniel K.
2015-11-08 22:00 ` Sinan Kaya [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563FC5E0.8030301@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=agross@codeaurora.org \
--cc=cov@codeaurora.org \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dk@syse.no \
--cc=dmaengine@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jcm@redhat.com \
--cc=julia.lawall@lip6.fr \
--cc=kbuild-all@01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=timur@codeaurora.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).