From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753278AbbCWT2o (ORCPT ); Mon, 23 Mar 2015 15:28:44 -0400 Received: from smtp106.biz.mail.bf1.yahoo.com ([98.139.244.54]:35576 "EHLO smtp106.biz.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753124AbbCWT2m (ORCPT ); Mon, 23 Mar 2015 15:28:42 -0400 X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 6eKkHp0VM1lyzj7sbESRvoTuiVBNcbVMfiuzUu18W0RyUAf R7X.Re6IrdNWADcOhau18H7qHvF_shWSgijaE0omqIP1KSPTLYd9pbFPl5HA YLAFoVMTujZ1X8cbPzojN0a5jCnHB1bDXBXQAar8ulWgDq6Meejglij02m.1 azogS_FAmdO1Zq65puOjcObQnmaA4oD_jIj_J3FDHU5cn2SmiHl8JmHY4rgU NteFvx2DUsHHXEOGGqKQqzwxrX3GTLFddY4dwSUixZlHThCJoqpBjk6TFGpQ li7lFxDpI.A9pbRLeBetn5R136.rNjxaXjlQHH.iA.fKGRstdKKqH16jbJfE gSyDWO_1gpi_nzlGvmEcyyUmRdQgp.ixlMJ.v.7ee9rjwVs_GbjwXwrKM6R_ 6Kd1AdVZiOkYbcFs.w1sYhWwW7mMmA1isa0HW53zjHAkFA1.M4KkwFXgGicJ 8xOAtOGsBSuJB6rMTYBcdoABBbkbveTa8Qny3R4OFmV3XSJC83xAahzTigDE ZCKLkMxRiZkL3bEYQeRQPowZc2pyZGFi9KOdU5A-- X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Message-ID: <55106968.3000204@schaufler-ca.com> Date: Mon, 23 Mar 2015 12:28:40 -0700 From: Casey Schaufler User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Paul Gortmaker , James Morris , "Serge E. Hallyn" CC: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Casey Schaufler Subject: Re: [PATCH] smack: Fix gcc warning from unused smack_syslog_lock mutex in smackfs.c References: <1427133797-7333-1-git-send-email-paul.gortmaker@windriver.com> In-Reply-To: <1427133797-7333-1-git-send-email-paul.gortmaker@windriver.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/23/2015 11:03 AM, Paul Gortmaker wrote: > In commit 00f84f3f2e9d088f06722f4351d67f5f577abe22 ("Smack: Make the > syslog control configurable") this mutex was added, but the rest of > the final commit never actually made use of it, resulting in: > > In file included from include/linux/mutex.h:29:0, > from include/linux/notifier.h:13, > from include/linux/memory_hotplug.h:6, > from include/linux/mmzone.h:821, > from include/linux/gfp.h:5, > from include/linux/slab.h:14, > from include/linux/security.h:27, > from security/smack/smackfs.c:21: > security/smack/smackfs.c:63:21: warning: ‘smack_syslog_lock’ defined but not used [-Wunused-variable] > static DEFINE_MUTEX(smack_syslog_lock); > ^ > > A git grep shows no other instances/references to smack_syslog_lock. > Delete it, assuming that the mutex addition was just a leftover from > an earlier work in progress version of the change. > > Signed-off-by: Paul Gortmaker Acked-by: Casey Schaufler I will take this patch into my smack-for-4.1 branch. Thank you. > --- > security/smack/smackfs.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c > index bce4e8f1b267..558a46d76129 100644 > --- a/security/smack/smackfs.c > +++ b/security/smack/smackfs.c > @@ -61,7 +61,6 @@ enum smk_inos { > */ > static DEFINE_MUTEX(smack_cipso_lock); > static DEFINE_MUTEX(smack_ambient_lock); > -static DEFINE_MUTEX(smack_syslog_lock); > static DEFINE_MUTEX(smk_netlbladdr_lock); > > /*