From: Kamil Konieczny <k.konieczny@partner.samsung.com>
To: Lionel Debieve <lionel.debieve@st.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>,
Fabien Dessenne <fabien.dessenne@st.com>,
Ludovic Barre <ludovic.barre@st.com>
Subject: Re: [PATCH 2/2] crypto: stm32 - Support for STM32 HASH module
Date: Mon, 31 Jul 2017 11:16:25 +0200 [thread overview]
Message-ID: <8a6bd548-a23a-7aa3-4b3c-b02e1f167c05@partner.samsung.com> (raw)
In-Reply-To: <1499952747-16423-3-git-send-email-lionel.debieve@st.com>
On 13.07.2017 15:32, Lionel Debieve wrote:
> This module register a HASH module that support multiples
> algorithms: MD5, SHA1, SHA224, SHA256. [...]
> +static irqreturn_t stm32_hash_irq_thread(int irq, void *dev_id)
> +{
> + struct stm32_hash_dev *hdev = dev_id;
> + int err;
The 'err' var is used without initialize.
> +
> + if (HASH_FLAGS_CPU & hdev->flags) {
> + if (HASH_FLAGS_OUTPUT_READY & hdev->flags) {
> + hdev->flags &= ~HASH_FLAGS_OUTPUT_READY;
> + goto finish;
> + }
> + } else if (HASH_FLAGS_DMA_READY & hdev->flags) {
> + if (HASH_FLAGS_DMA_ACTIVE & hdev->flags) {
> + hdev->flags &= ~HASH_FLAGS_DMA_ACTIVE;
> + goto finish;
> + }
> + }
> +
> + return IRQ_HANDLED;
> +
> +finish:
> + /*Finish current request */
> + stm32_hash_finish_req(hdev->req, err);
> +
> + return IRQ_HANDLED;
> +}
> +
and here is beginnig for finish_req:
+static void stm32_hash_finish_req(struct ahash_request *req, int err)
+{
+ struct stm32_hash_request_ctx *rctx = ahash_request_ctx(req);
+ struct stm32_hash_dev *hdev = rctx->hdev;
+
+ if (!err && (HASH_FLAGS_FINAL & hdev->flags)) {
--
Best regards,
Kamil Konieczny
Samsung R&D Institute Poland
next prev parent reply other threads:[~2017-07-31 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 13:32 [PATCH 0/2] STM32 HASH crypto driver Lionel Debieve
2017-07-13 13:32 ` [PATCH 1/2] dt-bindings: Document STM32 HASH bindings Lionel Debieve
2017-07-17 18:37 ` Rob Herring
2017-07-13 13:32 ` [PATCH 2/2] crypto: stm32 - Support for STM32 HASH module Lionel Debieve
2017-07-31 9:16 ` Kamil Konieczny [this message]
2017-07-28 13:50 ` [PATCH 0/2] STM32 HASH crypto driver Herbert Xu
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=8a6bd548-a23a-7aa3-4b3c-b02e1f167c05@partner.samsung.com \
--to=k.konieczny@partner.samsung.com \
--cc=alexandre.torgue@st.com \
--cc=benjamin.gaignard@st.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=fabien.dessenne@st.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lionel.debieve@st.com \
--cc=ludovic.barre@st.com \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.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
all inboxes | Powered by JetHome®