diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2019-12-08 18:55:31 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2020-01-16 21:05:49 +0200 |
commit | 99bd726560d7b860333f7b3de38b91b22e76769b (patch) | |
tree | 59e9bdce0beb97d9200ae7767969ab06d6fd6627 /lib | |
parent | 406a4f3d06eb2626eed86650aefaa715ed59205d (diff) |
lib/intel_aux_pgtable: Fix uint64_t vs. long mismatch
../lib/intel_aux_pgtable.c: In function ‘ptr_mask’:
../lib/intel_aux_pgtable.c:14:12: warning: right shift count >= width of type [-Wshift-count-overflow]
14 | (~0UL >> (BITS_PER_LONG - 1 - (e))))
| ^~
../lib/intel_aux_pgtable.c:138:9: note: in expansion of macro ‘BITMASK’
138 | return BITMASK(GFX_ADDRESS_BITS - 1, ld->entry_ptr_shift);
| ^~~~~~~
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/intel_aux_pgtable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/intel_aux_pgtable.c b/lib/intel_aux_pgtable.c index fcd24f08..db5055c8 100644 --- a/lib/intel_aux_pgtable.c +++ b/lib/intel_aux_pgtable.c @@ -9,9 +9,9 @@ #include "i915/gem_mman.h" -#define BITS_PER_LONG (sizeof(long) * 8) -#define BITMASK(e, s) ((~0UL << (s)) & \ - (~0UL >> (BITS_PER_LONG - 1 - (e)))) +#define BITS_PER_LONG_LONG (sizeof(long long) * 8) +#define BITMASK(e, s) ((~0ULL << (s)) & \ + (~0ULL >> (BITS_PER_LONG_LONG - 1 - (e)))) /* The unit size to which the AUX CCS surface is aligned to. */ #define AUX_CCS_UNIT_SIZE 64 |