Re: [PATCH] mm/mmap.c: silence variable 'new_start' set but not used

From: Yuehaibing
Date: Thu Jul 25 2019 - 14:04:32 EST


On 2019/7/24 22:34, Kirill A. Shutemov wrote:
> On Wed, Jul 24, 2019 at 02:07:39PM +0000, YueHaibing wrote:
>> 'new_start' is used in is_hugepage_only_range(),
>> which do nothing in some arch. gcc will warning:
>
> Make is_hugepage_only_range() reference the variable on such archs:
>
> #define is_hugepage_only_range(mm, addr, len) ((void) addr, 0)

Thank you for suggestion, I will try this.

>