Skip to contentSkip to conversation

mm-swap_state-constify-static-struct-attribute_group.patch removed from -mm tree

merged [email protected] 1 participant 1 message Feb 25, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/swap_state: constify static struct attribute_group
has been removed from the -mm tree. Its filename was
mm-swap_state-constify-static-struct-attribute_group.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Rikard Falkeborn <[email protected]>
Subject: mm/swap_state: constify static struct attribute_group

The only usage of swap_attr_group is to pass its address to sysfs_create_group() which takes a pointer to const attribute_group. Make it const to allow the compiler to put it in read-only memory.

---

 mm/swap_state.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/swap_state.c renamed from mm/swap_state.c~mm-swap_state-constify-static-struct-attribute_group +1 -1
@@ -927,7 +927,7 @@ static struct attribute *swap_attrs[] =
 	NULL,
 };
 
-static struct attribute_group swap_attr_group = {
+static const struct attribute_group swap_attr_group = {
 	.attrs = swap_attrs,
 };
 

_

Patches currently in -mm which might be from [email protected] are