[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZmZ1x6QQYPFSOd7O@localhost.localdomain>
Date: Mon, 10 Jun 2024 05:40:55 +0200
From: Oscar Salvador <osalvador@...e.de>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
Wei Yang <richard.weiyang@...il.com>
Subject: Re: [PATCH v1 2/2] mm/highmem: make nr_free_highpages() return
"unsigned long"
On Fri, Jun 07, 2024 at 10:37:11AM +0200, David Hildenbrand wrote:
> It looks rather weird that totalhigh_pages() returns an
> "unsigned long" but nr_free_highpages() returns an "unsigned int".
>
> Let's return an "unsigned long" from nr_free_highpages() to be
> consistent.
>
> While at it, use a plain "0" instead of a "0UL" in the !CONFIG_HIGHMEM
> totalhigh_pages() implementation, to make these look alike as well.
>
> Signed-off-by: David Hildenbrand <david@...hat.com>
...
> -static inline unsigned int nr_free_highpages(void) { return 0; }
> -static inline unsigned long totalhigh_pages(void) { return 0UL; }
> +static inline unsigned long nr_free_highpages(void) { return 0; }
> +static inline unsigned long totalhigh_pages(void) { return 0; }
Although I doubt it has any consequences, I would just leave them both with UL,
so the return type is consistent with what we are returning.
Other than that
Reviewed-by: Oscar Salvador <osalvador@...e.de>
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists