From: YueHaibing <yuehaibing@huawei.com> To: James Bottomley <jejb@linux.vnet.ibm.com>, Mimi Zohar <zohar@linux.vnet.ibm.com>, David Howells <dhowells@redhat.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com> Cc: YueHaibing <yuehaibing@huawei.com>, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH v2 -next] KEYS: trusted: remove set but not used variable 'keyhndl' Date: Fri, 19 Oct 2018 11:48:19 +0000 [thread overview] Message-ID: <1539949699-74650-1-git-send-email-yuehaibing@huawei.com> (raw) In-Reply-To: <1539241599-140866-1-git-send-email-yuehaibing@huawei.com> 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") Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- v2: fix patch title --- security/keys/trusted.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/keys/trusted.c b/security/keys/trusted.c index ff67893..169df79 100644 --- a/security/keys/trusted.c +++ b/security/keys/trusted.c @@ -589,7 +589,6 @@ static int tpm_unseal(struct tpm_buf *tb, uint32_t authhandle2 = 0; unsigned char cont = 0; uint32_t ordinal; - uint32_t keyhndl; int ret; /* sessions for unsealing key and data */ @@ -605,7 +604,6 @@ static int tpm_unseal(struct tpm_buf *tb, } ordinal = htonl(TPM_ORD_UNSEAL); - keyhndl = htonl(SRKHANDLE); ret = tpm_get_random(NULL, nonceodd, TPM_NONCE_SIZE); if (ret != TPM_NONCE_SIZE) { pr_info("trusted_key: tpm_get_random failed (%d)\n", ret);
WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com> To: James Bottomley <jejb@linux.vnet.ibm.com>, Mimi Zohar <zohar@linux.vnet.ibm.com>, David Howells <dhowells@redhat.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com> Cc: YueHaibing <yuehaibing@huawei.com>, <linux-integrity@vger.kernel.org>, <keyrings@vger.kernel.org>, <linux-security-module@vger.kernel.org>, <kernel-janitors@vger.kernel.org> Subject: [PATCH v2 -next] KEYS: trusted: remove set but not used variable 'keyhndl' Date: Fri, 19 Oct 2018 11:48:19 +0000 [thread overview] Message-ID: <1539949699-74650-1-git-send-email-yuehaibing@huawei.com> (raw) In-Reply-To: <1539241599-140866-1-git-send-email-yuehaibing@huawei.com> 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") Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- v2: fix patch title --- security/keys/trusted.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/keys/trusted.c b/security/keys/trusted.c index ff67893..169df79 100644 --- a/security/keys/trusted.c +++ b/security/keys/trusted.c @@ -589,7 +589,6 @@ static int tpm_unseal(struct tpm_buf *tb, uint32_t authhandle2 = 0; unsigned char cont = 0; uint32_t ordinal; - uint32_t keyhndl; int ret; /* sessions for unsealing key and data */ @@ -605,7 +604,6 @@ static int tpm_unseal(struct tpm_buf *tb, } ordinal = htonl(TPM_ORD_UNSEAL); - keyhndl = htonl(SRKHANDLE); ret = tpm_get_random(NULL, nonceodd, TPM_NONCE_SIZE); if (ret != TPM_NONCE_SIZE) { pr_info("trusted_key: tpm_get_random failed (%d)\n", ret);
next prev parent reply other threads:[~2018-10-19 11:48 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-11 6:56 [PATCH -next] KEYS: trusted: remove set but not used variable '' YueHaibing 2018-10-11 7:06 ` YueHaibing 2018-10-19 11:48 ` YueHaibing [this message] 2018-10-19 11:48 ` [PATCH v2 -next] KEYS: trusted: remove set but not used variable 'keyhndl' YueHaibing 2018-10-19 16:30 ` James Bottomley 2018-10-19 16:30 ` James Bottomley 2018-10-21 9:00 ` YueHaibing 2018-10-21 9:00 ` YueHaibing
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=1539949699-74650-1-git-send-email-yuehaibing@huawei.com \ --to=yuehaibing@huawei.com \ --cc=dhowells@redhat.com \ --cc=jejb@linux.vnet.ibm.com \ --cc=jmorris@namei.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=keyrings@vger.kernel.org \ --cc=linux-integrity@vger.kernel.org \ --cc=linux-security-module@vger.kernel.org \ --cc=serge@hallyn.com \ --cc=zohar@linux.vnet.ibm.com \ /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: linkBe 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.