[PATCH v2 -next] KEYS: trusted: remove set but not used variable 'keyhndl'

YueHaibing yuehaibing at huawei.com
Sun Oct 21 09:00:57 UTC 2018


On 2018/10/20 0:30, James Bottomley wrote:
> On Fri, 2018-10-19 at 11:48 +0000, YueHaibing wrote:
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> security/keys/trusted.c: In function 'tpm_unseal':
>> security/keys/trusted.c:592:11: warning:
>>  variable 'keyhndl' set but not used [-Wunused-but-set-variable]
>>   uint32_t keyhndl;
>>
>> It never used since introduction in 
>> commit d00a1c72f7f4 ("keys: add new trusted key-type")
> 
> This triggered an "er, shouldn't we be using the SRK parent by
> default?"  search through the code, but it turns out that's all taken
> care of in trusted_options_alloc() where we'll set up the SRK as parent
> with well known auth and unless overridden on the command line, that's
> what we use, so I'm happy this is simply left over code from a
> different implementation of that use case.

Thank you for comment.

> 
> James
> 
> 
> .
> 



More information about the Linux-security-module-archive mailing list