From patchwork Wed Aug 2 08:35:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 9876413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3CB2560390 for ; Wed, 2 Aug 2017 09:01:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EA7B2621D for ; Wed, 2 Aug 2017 09:01:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22D5E283F9; Wed, 2 Aug 2017 09:01:15 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9A91C2621D for ; Wed, 2 Aug 2017 09:01:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1dcpWd-0003W7-0M; Wed, 02 Aug 2017 09:01:07 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.89) (envelope-from ) id 1dcpWb-0003Vq-LO for v9fs-developer@lists.sourceforge.net; Wed, 02 Aug 2017 09:01:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From; bh=i4mVTQ/1GMl0CqASC/Rxu46ugjyZRGK1+Q9TUCWptLw=; b=aWn530LrfZJ4RHLPdhiZ0/5pGLncjTX8CYre/mDoLX/tx2mWVRPWKIxASMXwJEG+QpySb8DnpS4ajtabeY1d03WdlTFZCnbPJ/In/QWZAN4NoY+qjbtX77Ark3D5Pv1mNzIw0+SMYzkWEMoL4b/7Ac/t0IPHzXzgTfK9XH+bU5g=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x; h=Message-Id:Date:Subject:Cc:To:From; bh=i4mVTQ/1GMl0CqASC/Rxu46ugjyZRGK1+Q9TUCWptLw=; b=FzPC+cGNFlCdDVNMuBM1P7ZRvOpgj7XzTxEfxRyi23rGm8M0OJE1Ois5e5aygnzWIq96uUjE3l1YxeCxIs2Qf23dnsRNkBCBKhwTD60UANJqm0MDtxpxIdYj6/wnJM/dkAGcCT1bzcaDkzITGu8kHUBB1QtnG28YbHo3kcvBHlc=; Received-SPF: neutral (sog-mx-4.v43.ch3.sourceforge.com: 192.134.164.104 is neither permitted nor denied by domain of lip6.fr) client-ip=192.134.164.104; envelope-from=Julia.Lawall@lip6.fr; helo=mail3-relais-sop.national.inria.fr; Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1dcpWa-0001u2-0x for v9fs-developer@lists.sourceforge.net; Wed, 02 Aug 2017 09:01:05 +0000 X-IronPort-AV: E=Sophos;i="5.41,310,1498514400"; d="scan'208";a="233480747" Received: from palace.rsr.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 02 Aug 2017 11:00:57 +0200 From: Julia Lawall To: Eric Van Hensbergen Date: Wed, 2 Aug 2017 10:35:35 +0200 Message-Id: <1501662935-26695-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 X-Headers-End: 1dcpWa-0001u2-0x Subject: [V9fs-developer] [PATCH] 9p: constify xattr_handler structures X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Latchesar Ionkov , Ron Minnich , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, v9fs-developer@lists.sourceforge.net MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Virus-Scanned: ClamAV using ClamSMTP The xattr_handler structures are only stored in an array of const structures. Thus the xattr_handler structures themselves can be const. Signed-off-by: Julia Lawall --- fs/9p/xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c index f329eee..3d45d25 100644 --- a/fs/9p/xattr.c +++ b/fs/9p/xattr.c @@ -154,20 +154,20 @@ static int v9fs_xattr_handler_set(const struct xattr_handler *handler, return v9fs_xattr_set(dentry, full_name, value, size, flags); } -static struct xattr_handler v9fs_xattr_user_handler = { +static const struct xattr_handler v9fs_xattr_user_handler = { .prefix = XATTR_USER_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set, }; -static struct xattr_handler v9fs_xattr_trusted_handler = { +static const struct xattr_handler v9fs_xattr_trusted_handler = { .prefix = XATTR_TRUSTED_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set, }; #ifdef CONFIG_9P_FS_SECURITY -static struct xattr_handler v9fs_xattr_security_handler = { +static const struct xattr_handler v9fs_xattr_security_handler = { .prefix = XATTR_SECURITY_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set,