From: Varun Wadekar <vwadekar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Kim Phillips <kim.phillips-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: "herbert-F6s6mLieUQo7FNHlEwC/lvQIK84fMopw@public.gmane.org"
<herbert-F6s6mLieUQo7FNHlEwC/lvQIK84fMopw@public.gmane.org>,
"davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org"
<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
"linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] crypto: driver for tegra AES hardware
Date: Sat, 5 Nov 2011 16:00:39 +0530 [thread overview]
Message-ID: <4EB5104F.2050203@nvidia.com> (raw)
In-Reply-To: <20111104202202.882b4d84473ba616cacda7d7-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
>> + cmdq[1] = (u32)dd->ivkey_phys_base;
>> +
>> + for (i = 0; i < ARRAY_SIZE(cmdq); i++)
>> + aes_writel(dd, cmdq[i], ICMDQUE_WR);
> ARRAY_SIZE is 2 here - why not use a single temporary variable and
> two individual aes_writel()s?
Removed 'i' and kept cmdq as it is. Adding 2 more variables seems
unnecessary.
>
>> + if (ctx->flags & FLAGS_NEW_KEY) {
>> + /* copy the key */
>> + memset(dd->ivkey_base, 0, AES_HW_KEY_TABLE_LENGTH_BYTES);
>> + memcpy(dd->ivkey_base, ctx->key, ctx->keylen);
> do you really need the overlapping memset?
keylen < AES_HW_KEY_TABLE_LENGTH_BYTES. A key slot contains key, iv and
updated iv.
>> + return IRQ_HANDLED;
> need to return IRQ_NONE if device reports no valid IRQ status.
I could not find a scenario where IRQ_NONE can be returned.
prev parent reply other threads:[~2011-11-05 10:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 11:14 [PATCH] crypto: driver for tegra AES hardware vwadekar-DDmLM1+adcrQT0dZR+AlfA
[not found] ` <1320405256-29374-1-git-send-email-vwadekar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-04 13:54 ` Henning Heinold
2011-11-04 13:54 ` Henning Heinold
[not found] ` <20111104135436.GA29112-/JE64I/RTDPrEm6qDNUMlj7Snszu6STo@public.gmane.org>
2011-11-05 7:28 ` Varun Wadekar
2011-11-04 21:21 ` Stephen Warren
2011-11-04 21:21 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173F9A4E83-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-05 8:11 ` Varun Wadekar
2011-11-05 10:44 ` Varun Wadekar
[not found] ` <4EB4EFC0.1060702-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-07 17:52 ` Stephen Warren
2011-11-05 1:22 ` Kim Phillips
2011-11-05 1:22 ` Kim Phillips
[not found] ` <20111104202202.882b4d84473ba616cacda7d7-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-11-05 10:30 ` Varun Wadekar [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=4EB5104F.2050203@nvidia.com \
--to=vwadekar-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=herbert-F6s6mLieUQo7FNHlEwC/lvQIK84fMopw@public.gmane.org \
--cc=kim.phillips-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.