All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 060/119] mm/ksm.c: constify attribute_group structures
@ 2017-09-06 23:21 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-09-06 23:21 UTC (permalink / raw)
  To: akpm, arvind.yadav.cs, mm-commits, torvalds

From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Subject: mm/ksm.c: constify attribute_group structures

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

Link: http://lkml.kernel.org/r/1501157167-3706-2-git-send-email-arvind.yadav.cs@gmail.com
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/ksm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/ksm.c~mm-ksm-constify-attribute_group-structures mm/ksm.c
--- a/mm/ksm.c~mm-ksm-constify-attribute_group-structures
+++ a/mm/ksm.c
@@ -3043,7 +3043,7 @@ static struct attribute *ksm_attrs[] = {
 	NULL,
 };
 
-static struct attribute_group ksm_attr_group = {
+static const struct attribute_group ksm_attr_group = {
 	.attrs = ksm_attrs,
 	.name = "ksm",
 };
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-06 23:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 23:21 [patch 060/119] mm/ksm.c: constify attribute_group structures akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.