]> xenbits.xensource.com Git - xen.git/commit
x86/mm: do not attempt to convert _PAGE_GNTTAB to a boolean
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 2 Jun 2020 11:36:41 +0000 (13:36 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 2 Jun 2020 11:36:41 +0000 (13:36 +0200)
commit6eb61b1a9dfe23ca443f977799cafb22770708a0
tree4c0648281cf572c0a0997255adce81d42d3839db
parentad33a573c009d72466432b41ba0591c64e819c19
x86/mm: do not attempt to convert _PAGE_GNTTAB to a boolean

Clang 10 complains with:

mm.c:1239:10: error: converting the result of '<<' to a boolean always evaluates to true
      [-Werror,-Wtautological-constant-compare]
    if ( _PAGE_GNTTAB && (l1e_get_flags(l1e) & _PAGE_GNTTAB) &&
         ^
xen/include/asm/x86_64/page.h:161:25: note: expanded from macro '_PAGE_GNTTAB'
#define _PAGE_GNTTAB (1U<<22)
                        ^

Remove the conversion of _PAGE_GNTTAB to a boolean and instead use a
preprocessor conditional to check if _PAGE_GNTTAB is defined.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Paul Durrant <paul@xen.org>
xen/arch/x86/mm.c