Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1693392

[PATCH v2 2/3] staging: lustre: ldlm: constify attribute_group structures.

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From Arvind Yadav <arvind.yadav.cs@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 2/3] staging: lustre: ldlm: constify attribute_group structures.
Date Fri, 21 Jul 2017 07:50:01 +0200
Message-ID <u5yZ3-LP-9@gated-at.bofh.it> (permalink)
References <u5yZ3-LP-1@gated-at.bofh.it>
X-Original-To oleg.drokin@intel.com, andreas.dilger@intel.com, jsimmons@infradead.org, gregkh@linuxfoundation.org, di.wang@intel.com
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rGypROl9gac8tmmAJfTTisYQIsn61Y3UbS1SX4mOthU=; b=ZZqW4ta4zJuYR/NYs+FXkJUmYUaIitW2Idl5+r2BPf9wDxM1heC4CsmQNgdn/DyhcQ z36/NGjHN714aFC0LTeeS20UUd/Lx7AEh5WqhVRRXHEAKe813HTJnEpz+dsrJal6E5O1 P96NdzD4VXca8jAthKys2EyrLGkLkKhxsMSODztBL2C8AhDEtZI6mfAhZnO5mDqIWXKi J8x+reoyFwvRdmPj1sBS268UIF5la+9FaVXNZ/aQgOLEIQP2nfuz0ETo/qpPriNL18zX A7Xf+i3QhlP1j8u0BrdWY+nj9foamxtyq19+HuQnR6Hpp21xCY71tTQFzmaMj1Mse5/0 Ftrg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rGypROl9gac8tmmAJfTTisYQIsn61Y3UbS1SX4mOthU=; b=q00GXCQWjfF40gNggQmIE5GqjE/fHttzlMKxWNzPqUubk/PMHGluydQo9P/lU1UPd6 7j5x+yZiAnTgmd3iJgfrSNRKGKw3NfBRfr3XOePpkEAgoWibTbFMtxUoZbXQsDUZ89DR Rxo1umsvH/Yhi9g9O+igykqSezc6CGLR6zKtXdWVlEghOtkfiSxqfBggmWas3lFkV5rA emRXcJhQvmSW9IL1pHl/aYmuoKRgdA6k601GRwjUT9U1wi13JOilEZKUuXX+mJP6qtJK Odhs8C/n/JnBxjeqbZayZb+qc/mQoe9FEHHyi7Zc5RPt32cXTSFRgcFe8JGjfeCbHBrI d2Zw==
X-Gm-Message-State AIVw111aZetaE+pn+dSVn+Oe3NmZMqpcjiabQbFkQuDwvFRskK4i4JcT 4dZqVtlRc+6IMg==
X-Received by 10.98.64.7 with SMTP id n7mr6337455pfa.76.1500615746899; Thu, 20 Jul 2017 22:42:26 -0700 (PDT)
X-Mailer git-send-email 1.9.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 27
Organization linux.* mail to news gateway
X-Original-Cc lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
X-Original-Date Fri, 21 Jul 2017 11:11:37 +0530
X-Original-Message-ID <1500615698-21001-3-git-send-email-arvind.yadav.cs@gmail.com>
X-Original-References <1500615698-21001-1-git-send-email-arvind.yadav.cs@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1693392

Show key headers only | View raw


attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work
with const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
Changes in v2:
              patch was sent to wrong group.

 drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
index fff930f..e0c3e5d 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
@@ -926,7 +926,7 @@ static ssize_t cancel_unused_locks_before_replay_store(struct kobject *kobj,
 	NULL,
 };
 
-static struct attribute_group ldlm_attr_group = {
+static const struct attribute_group ldlm_attr_group = {
 	.attrs = ldlm_attrs,
 };
 
-- 
1.9.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/3] Constify lustre attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-21 07:50 +0200
  [PATCH v2 2/3] staging: lustre: ldlm: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-21 07:50 +0200
  [PATCH v2 1/3] staging: lustre: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-21 07:50 +0200
  [PATCH v2 3/3] staging: lustre: obdclass: linux: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-21 07:50 +0200

csiph-web