lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 14 Jan 2020 09:24:34 +0100
From:   David Hildenbrand <david@...hat.com>
To:     linux-kernel@...r.kernel.org
Cc:     linux-mm@...ck.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Michal Hocko <mhocko@...e.com>,
        Pavel Tatashin <pasha.tatashin@...een.com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Oscar Salvador <osalvador@...e.de>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH v1 2/2] drivers/base/memory.c: get rid of
 find_memory_block()

On 13.01.20 12:33, David Hildenbrand wrote:
> No longer needed, remove it.
> 
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Pavel Tatashin <pasha.tatashin@...een.com>
> Cc: Anshuman Khandual <anshuman.khandual@....com>
> Cc: Oscar Salvador <osalvador@...e.de>
> Signed-off-by: David Hildenbrand <david@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ