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]
Message-ID: <d964ffc8-2f8d-d576-a2db-27caac92b017@redhat.com>
Date:   Thu, 3 Aug 2023 15:08:40 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Miaohe Lin <linmiaohe@...wei.com>, akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/page_alloc: remove unneeded variable base

On 03.08.23 13:49, Miaohe Lin wrote:
> Since commit 5d0a661d808f ("mm/page_alloc: use only one PCP list for
> THP-sized allocations"), local variable base is just as same as order.
> So remove it. No functional change intended.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>   mm/page_alloc.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index d7a357cb21ee..96b7c1a7d1f2 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -538,8 +538,6 @@ static void bad_page(struct page *page, const char *reason)
>   
>   static inline unsigned int order_to_pindex(int migratetype, int order)
>   {
> -	int base = order;
> -
>   #ifdef CONFIG_TRANSPARENT_HUGEPAGE
>   	if (order > PAGE_ALLOC_COSTLY_ORDER) {
>   		VM_BUG_ON(order != pageblock_order);
> @@ -549,7 +547,7 @@ static inline unsigned int order_to_pindex(int migratetype, int order)
>   	VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER);
>   #endif
>   
> -	return (MIGRATE_PCPTYPES * base) + migratetype;
> +	return (MIGRATE_PCPTYPES * order) + migratetype;
>   }
>   
>   static inline int pindex_to_order(unsigned int pindex)

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ