[PATCH v1 2/2] drivers/base/memory.c: get rid of find_memory_block()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No longer needed, remove it.

Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
---
 drivers/base/memory.c  | 9 +--------
 include/linux/memory.h | 1 -
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 2cf3542b04d0..8b3ab910b812 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -590,13 +590,6 @@ static struct memory_block *find_memory_block_by_id(unsigned long block_id)
 	return mem;
 }
 
-struct memory_block *find_memory_block(struct mem_section *section)
-{
-	unsigned long block_id = base_memory_block_id(__section_nr(section));
-
-	return find_memory_block_by_id(block_id);
-}
-
 static struct attribute *memory_memblk_attrs[] = {
 	&dev_attr_phys_index.attr,
 	&dev_attr_state.attr,
@@ -700,7 +693,7 @@ static void unregister_memory(struct memory_block *memory)
 
 	WARN_ON(radix_tree_delete(&memory_blocks, memory->dev.id) == NULL);
 
-	/* drop the ref. we got via find_memory_block() */
+	/* drop the ref. we got via find_memory_block_by_id() */
 	put_device(&memory->dev);
 	device_unregister(&memory->dev);
 }
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 3ab4aa2d67ae..0b0732a94972 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -113,7 +113,6 @@ void remove_memory_block_devices(unsigned long start, unsigned long size);
 extern void memory_dev_init(void);
 extern int memory_notify(unsigned long val, void *v);
 extern int memory_isolate_notify(unsigned long val, void *v);
-extern struct memory_block *find_memory_block(struct mem_section *);
 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);
-- 
2.24.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux