From patchwork Fri Oct 19 11:48:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10649053 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 AD31013A4 for ; Fri, 19 Oct 2018 11:37:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 999A320602 for ; Fri, 19 Oct 2018 11:37:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CF30288BB; Fri, 19 Oct 2018 11:37:46 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham 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 2888520602 for ; Fri, 19 Oct 2018 11:37:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727197AbeJSTn0 (ORCPT ); Fri, 19 Oct 2018 15:43:26 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14093 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726968AbeJSTn0 (ORCPT ); Fri, 19 Oct 2018 15:43:26 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 39D6BCE7C3610; Fri, 19 Oct 2018 19:37:37 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.399.0; Fri, 19 Oct 2018 19:37:32 +0800 From: YueHaibing To: James Bottomley , Mimi Zohar , David Howells , James Morris , "Serge E. Hallyn" CC: YueHaibing , , , , Subject: [PATCH v2 -next] KEYS: trusted: remove set but not used variable 'keyhndl' Date: Fri, 19 Oct 2018 11:48:19 +0000 Message-ID: <1539949699-74650-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539241599-140866-1-git-send-email-yuehaibing@huawei.com> References: <1539241599-140866-1-git-send-email-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org 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 --- 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);