Re: [PATCH] crypto: driver for tegra AES hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> +	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.

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux