lkml.org 
[lkml]   [2020]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 2/2] drivers/base/memory.c: get rid of find_memory_block()
From
Date
On 13.01.20 12:33, David Hildenbrand wrote:
> No longer needed, remove it.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: Oscar Salvador <osalvador@suse.de>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> 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);
>

My git-grepping skills betrayed me :) There is one remaining user in ppc
code. Let's drop this patch for now.

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2020-01-14 09:24    [W:0.027 / U:28.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site