From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: James Hartley <James.Hartley@imgtec.com>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"davem@davemloft.net" <davem@davemloft.net>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"joe@perches.com" <joe@perches.com>,
"mchehab@osg.samsung.com" <mchehab@osg.samsung.com>,
"crope@iki.fi" <crope@iki.fi>,
"jg1.han@samsung.com" <jg1.han@samsung.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"pawel.moll@arm.com" <pawel.moll@arm.com>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
"galak@codeaurora.org" <galak@codeaurora.org>,
"abrestic@chromium.org" <abrestic@chromium.org>,
Ezequiel Garcia <Ezequiel.Garcia@imgtec.com>
Subject: Re: [PATCH 1/2] crypto: Add Imagination Technologies hw hash accelerator
Date: Tue, 11 Nov 2014 17:12:24 +0200 [thread overview]
Message-ID: <54622758.7050907@mentor.com> (raw)
In-Reply-To: <72BC0C8BD7BB6F45988A99382E5FBAE54433BAC5@hhmail02.hh.imgtec.org>
Hi James,
On 11.11.2014 16:59, James Hartley wrote:
> Hi Vladimir, thanks for the review!
>
>> -----Original Message-----
>> From: Vladimir Zapolskiy [mailto:vladimir_zapolskiy@mentor.com]
>> Sent: 10 November 2014 15:10
>> To: James Hartley; herbert@gondor.apana.org.au; davem@davemloft.net;
>> grant.likely@linaro.org; robh+dt@kernel.org; akpm@linux-foundation.org;
>> gregkh@linuxfoundation.org; joe@perches.com;
>> mchehab@osg.samsung.com; crope@iki.fi; jg1.han@samsung.com; linux-
>> crypto@vger.kernel.org
>> Cc: devicetree@vger.kernel.org; pawel.moll@arm.com;
>> mark.rutland@arm.com; ijc+devicetree@hellion.org.uk;
>> galak@codeaurora.org; abrestic@chromium.org; Ezequiel Garcia
>> Subject: Re: [PATCH 1/2] crypto: Add Imagination Technologies hw hash
>> accelerator
>>
>> Hello James,
>>
>> On 10.11.2014 14:10, James Hartley wrote:
>>> This adds support for the Imagination Technologies hash accelerator
>>> that provides hardware acceleration for
>>> SHA1 SHA224 SHA256 and MD5 Hashes.
>>>
>>> Signed-off-by: James Hartley <james.hartley@imgtec.com>
>>> ---
>>
[snip]
>>> +
>>> + return 0;
>>> +
>>> +err_algs:
>>> + spin_lock(&img_hash.lock);
>>> + list_del(&hdev->list);
>>> + spin_unlock(&img_hash.lock);
>>> + dma_release_channel(hdev->dma_lch);
>>> +err_dma:
>>> + iounmap(hdev->io_base);
>>
>> Mixing of devm_* resource initialization and commodity resource release
>> leads to double decrement of clock usage count reference.
>
> Ok, changed to devm_iounmap
>
just one small comment, please double check, but most probably you don't
need to call devm_iounmap() explicitly on error path.
[snip]
>
>>
>>> +
>>> +static int img_hash_remove(struct platform_device *pdev) {
>>> + static struct img_hash_dev *hdev;
>>> +
>>> + hdev = platform_get_drvdata(pdev);
>>> + if (!hdev)
>>> + return -ENODEV;
>>> + spin_lock(&img_hash.lock);
>>> + list_del(&hdev->list);
>>> + spin_unlock(&img_hash.lock);
>>> +
>>> + img_unregister_algs(hdev);
>>> +
>>> + tasklet_kill(&hdev->done_task);
>>> + tasklet_kill(&hdev->dma_task);
>>> + img_hash_dma_cleanup(hdev);
>>> +
>>> + iounmap(hdev->io_base);
>>
>> Same as above, devres iounmap() is good enough.
>
> Done
>
Same as above, I suppose you can simply remove iounmap() call without
adding explicit devm_iounmap().
--
With best wishes,
Vladimir
next prev parent reply other threads:[~2014-11-11 15:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 12:10 [PATCH 0/2] crypto: Add support for the IMG hash accelerator James Hartley
[not found] ` <1415621455-10468-1-git-send-email-james.hartley-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2014-11-10 12:10 ` [PATCH 1/2] crypto: Add Imagination Technologies hw " James Hartley
2014-11-10 15:09 ` Vladimir Zapolskiy
2014-11-11 14:59 ` James Hartley
2014-11-11 15:12 ` Vladimir Zapolskiy [this message]
2014-11-11 15:28 ` James Hartley
2014-11-14 23:59 ` Andrew Bresticker
2014-11-15 7:55 ` Corentin LABBE
2014-11-17 17:11 ` Andrew Bresticker
2014-11-24 14:39 ` Herbert Xu
2014-11-15 11:08 ` Arnd Bergmann
2014-11-18 18:16 ` James Hartley
2014-11-10 12:10 ` [PATCH 2/2] Documentation: crypto: Add DT binding info for the img " James Hartley
2014-11-10 17:30 ` Andrew Bresticker
2014-11-18 18:33 ` James Hartley
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=54622758.7050907@mentor.com \
--to=vladimir_zapolskiy@mentor.com \
--cc=Ezequiel.Garcia@imgtec.com \
--cc=James.Hartley@imgtec.com \
--cc=abrestic@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=crope@iki.fi \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jg1.han@samsung.com \
--cc=joe@perches.com \
--cc=linux-crypto@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab@osg.samsung.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
/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).