Skip to contentSkip to conversation

memory: remove unused CONFIG_MEM_BLOCK_SIZE

PATCH Applied Lukas Bulwahn 2 participants 2 messages Oct 6, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory: remove unused CONFIG_MEM_BLOCK_SIZE

Commit 3947be1969a9 ("[PATCH] memory hotplug: sysfs and add/remove functions") defines CONFIG_MEM_BLOCK_SIZE, but this has never been utilized anywhere.

It is a good practice to keep the CONFIG_* defines exclusively for the Kbuild system. So, drop this unused definition.

This issue was noticed due to running ./scripts/checkkconfigsymbols.py.

---
 include/linux/memory.h | 1 -
 1 file changed, 1 deletion(-)
include/linux/memory.h +0 -1
index c46ff374d48d..a216829df280 100644
@@ -143,7 +143,6 @@ typedef int (*walk_memory_blocks_func_t)(struct memory_block *, void *);
 extern int walk_memory_blocks(unsigned long start, unsigned long size,
 			      void *arg, walk_memory_blocks_func_t func);
 extern int for_each_memory_block(void *arg, walk_memory_blocks_func_t func);
-#define CONFIG_MEM_BLOCK_SIZE	(PAGES_PER_SECTION<<PAGE_SHIFT)
 
 extern int memory_group_register_static(int nid, unsigned long max_pages);
 extern int memory_group_register_dynamic(int nid, unsigned long unit_pages);
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Lukas Bulwahn

Commit 3947be1969a9 ("[PATCH] memory hotplug: sysfs and add/remove functions") defines CONFIG_MEM_BLOCK_SIZE, but this has never been utilized anywhere.

It is a good practice to keep the CONFIG_* defines exclusively for the Kbuild system. So, drop this unused definition.

This issue was noticed due to running ./scripts/checkkconfigsymbols.py.

---
  include/linux/memory.h | 1 -
  1 file changed, 1 deletion(-)
include/linux/memory.h +0 -0
index c46ff374d48d..a216829df280 100644

include/linux/memory.h typedef int (*walk_memory_blocks_func_t)(struct memory_block *, void *); · line 148

Quoted 7 lines
include/linux/memory.h +0 -1
@@ -143,7 +143,6 @@ typedef int (*walk_memory_blocks_func_t)(struct memory_block *, void *);
  extern int walk_memory_blocks(unsigned long start, unsigned long size,
  			      void *arg, walk_memory_blocks_func_t func);
  extern int for_each_memory_block(void *arg, walk_memory_blocks_func_t func);
-#define CONFIG_MEM_BLOCK_SIZE	(PAGES_PER_SECTION<<PAGE_SHIFT)
 
  extern int memory_group_register_static(int nid, unsigned long max_pages);
  extern int memory_group_register_dynamic(int nid, unsigned long unit_pages);
Signature · 3 lines
Thanks,

David / dhildenb