From patchwork Thu Oct 11 07:06:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10636143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 93EA816B1 for ; Thu, 11 Oct 2018 06:55:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E843298AA for ; Thu, 11 Oct 2018 06:55:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 727152B0DD; Thu, 11 Oct 2018 06:55:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24EDA298AA for ; Thu, 11 Oct 2018 06:55:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727353AbeJKOVc (ORCPT ); Thu, 11 Oct 2018 10:21:32 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13617 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726047AbeJKOVc (ORCPT ); Thu, 11 Oct 2018 10:21:32 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 05A9FBE25D747; Thu, 11 Oct 2018 14:55:34 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.399.0; Thu, 11 Oct 2018 14:55:26 +0800 From: YueHaibing To: James Bottomley , Mimi Zohar , David Howells , James Morris , "Serge E. Hallyn" CC: YueHaibing , , , , Subject: [PATCH -next] KEYS: trusted: remove set but not used variable '' Date: Thu, 11 Oct 2018 07:06:39 +0000 Message-ID: <1539241599-140866-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);