lkml.org 
[lkml]   [2014]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/9] crypto: qce: Adds sha and hmac transforms
Hi Stephen,

On 04/11/2014 11:12 PM, Stephen Boyd wrote:
> On 04/10, Stanimir Varbanov wrote:
>> On 04/09/2014 03:09 AM, Stephen Boyd wrote:
>>> On 04/03, Stanimir Varbanov wrote:
>>>
>>>> +
>>>> + return 0;
>>>> +}
>>>> +
>>>> +static int qce_ahash_import(struct ahash_request *req, const void *in)
>>>> +{
>>>> + struct qce_sha_reqctx *rctx = ahash_request_ctx(req);
>>>> + u32 flags = rctx->flags;
>>>> + bool hmac = IS_SHA_HMAC(flags);
>>>> + int ret;
>>>> +
>>>> + if (IS_SHA1(flags) || IS_SHA1_HMAC(flags)) {
>>>> + struct sha1_state *state = (struct sha1_state *)in;
>>>
>>> Unnecessary cast from void *.
>>
>> Nope, "in" is "const void *". Cast is needed to avoid compiler warnings.
>>
>
> Ouch. Why are we casting away const? It should be possible to
> make qce_import_common() take const state and buffer arguments?
>

Sure, that's possible. Thanks!


--
regards,
Stan


\
 
 \ /
  Last update: 2014-04-14 17:21    [W:0.080 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site