From patchwork Wed Jul 3 02:55:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 11028857 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 AA93B13BD for ; Wed, 3 Jul 2019 02:57:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96BCF288E2 for ; Wed, 3 Jul 2019 02:57:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A7202897A; Wed, 3 Jul 2019 02:57:56 +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=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 34E2A288E2 for ; Wed, 3 Jul 2019 02:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727134AbfGCC5z (ORCPT ); Tue, 2 Jul 2019 22:57:55 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:51646 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727108AbfGCC5z (ORCPT ); Tue, 2 Jul 2019 22:57:55 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 01DDCA6008E8F9D1AD22; Wed, 3 Jul 2019 10:48:53 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Wed, 3 Jul 2019 10:48:46 +0800 From: YueHaibing To: James Morris , "Serge E. Hallyn" , David Howells , Kairui Song , "Thomas Gleixner" , Mimi Zohar , "Thiago Jung Bauermann" , Nayna Jain , "Eric Biggers" CC: YueHaibing , , , Subject: [PATCH -next] integrity: Remove set but not used variable 'acl' Date: Wed, 3 Jul 2019 02:55:18 +0000 Message-ID: <20190703025518.6379-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.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/integrity/digsig.c: In function 'integrity_init_keyring': security/integrity/digsig.c:99:18: warning: variable 'acl' set but not used [-Wunused-but-set-variable] It seems 'acl' is needed in __integrity_init_keyring Fixes: 6100ac53909d ("keys: Replace uid/gid/perm permissions checking with an ACL") Signed-off-by: YueHaibing --- security/integrity/digsig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c index 1f2c43f62047..f9f3c8ffe786 100644 --- a/security/integrity/digsig.c +++ b/security/integrity/digsig.c @@ -114,7 +114,7 @@ int __init integrity_init_keyring(const unsigned int id) acl = &internal_writable_keyring_acl; out: - return __integrity_init_keyring(id, &internal_keyring_acl, restriction); + return __integrity_init_keyring(id, acl, restriction); } static int __init integrity_add_key(const unsigned int id, const void *data,