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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d90420a5-ecec-d9cc-8e27-07004701ef94@redhat.com>
Date:   Wed, 2 Jun 2021 10:59:47 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Max Gurtovoy <mgurtovoy@...dia.com>, akpm@...ux-foundation.org,
        linux-mm@...ck.org
Cc:     pasha.tatashin@...een.com, linux-kernel@...r.kernel.org,
        logang@...tatee.com
Subject: Re: [PATCH 1/2] mm,memory_hotplug: align code to fit 80 characters
 per line

On 02.06.21 10:47, Max Gurtovoy wrote:
> The "if" clause can fit to one line. Also while we're here, fix the end
> pfn print (use %#lx instead of #%lx).
> 

I think the subject could be more expressive. I'd suggest

"mm,memory_hotplug: cleanup alignment checks in check_pfn_span"


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

> Signed-off-by: Max Gurtovoy <mgurtovoy@...dia.com>
> ---
>   mm/memory_hotplug.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 70620d0dd923..8c3b423c1141 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -288,10 +288,9 @@ static int check_pfn_span(unsigned long pfn, unsigned long nr_pages,
>   		min_align = PAGES_PER_SUBSECTION;
>   	else
>   		min_align = PAGES_PER_SECTION;
> -	if (!IS_ALIGNED(pfn, min_align)
> -			|| !IS_ALIGNED(nr_pages, min_align)) {
> -		WARN(1, "Misaligned __%s_pages start: %#lx end: #%lx\n",
> -				reason, pfn, pfn + nr_pages - 1);
> +	if (!IS_ALIGNED(pfn, min_align) || !IS_ALIGNED(nr_pages, min_align)) {
> +		WARN(1, "Misaligned __%s_pages start: %#lx end: %#lx\n",
> +		     reason, pfn, pfn + nr_pages - 1);
>   		return -EINVAL;
>   	}
>   	return 0;
> 


-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ