Revision 20b8264394b33adb1640a485a62a84bc1388b6a3 authored by Carlos Llamas on 21 June 2022, 20:39:21 UTC, committed by Alex Deucher on 29 June 2022, 18:50:51 UTC
Kernel uapi headers are supposed to use __[us]{8,16,32,64} types defined
by <linux/types.h> as opposed to 'uint32_t' and similar. See [1] for the
relevant discussion about this topic. In this particular case, the usage
of 'uint64_t' escaped headers_check as these macros are not being called
here. However, the following program triggers a compilation error:

  #include <drm/drm_fourcc.h>

  int main()
  {
  	unsigned long x = AMD_FMT_MOD_CLEAR(RB);
  	return 0;
  }

gcc error:
  drm.c:5:27: error: ‘uint64_t’ undeclared (first use in this function)
      5 |         unsigned long x = AMD_FMT_MOD_CLEAR(RB);
        |                           ^~~~~~~~~~~~~~~~~

This patch changes AMD_FMT_MOD_{SET,CLEAR} macros to use the correct
integer types, which fixes the above issue.

  [1] https://lkml.org/lkml/2019/6/5/18

Fixes: 8ba16d599374 ("drm/fourcc: Add AMD DRM modifiers.")
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent bbba251
History
File Mode Size
preload
Kconfig -rw-r--r-- 3.0 KB
Makefile -rw-r--r-- 1.6 KB
arraymap.c -rw-r--r-- 36.0 KB
bloom_filter.c -rw-r--r-- 5.7 KB
bpf_inode_storage.c -rw-r--r-- 7.2 KB
bpf_iter.c -rw-r--r-- 16.9 KB
bpf_local_storage.c -rw-r--r-- 18.3 KB
bpf_lru_list.c -rw-r--r-- 17.4 KB
bpf_lru_list.h -rw-r--r-- 2.1 KB
bpf_lsm.c -rw-r--r-- 7.6 KB
bpf_struct_ops.c -rw-r--r-- 17.7 KB
bpf_struct_ops_types.h -rw-r--r-- 262 bytes
bpf_task_storage.c -rw-r--r-- 8.5 KB
btf.c -rw-r--r-- 200.0 KB
cgroup.c -rw-r--r-- 55.3 KB
core.c -rw-r--r-- 70.9 KB
cpumap.c -rw-r--r-- 20.8 KB
devmap.c -rw-r--r-- 29.0 KB
disasm.c -rw-r--r-- 9.2 KB
disasm.h -rw-r--r-- 1.0 KB
dispatcher.c -rw-r--r-- 3.6 KB
hashtab.c -rw-r--r-- 64.2 KB
helpers.c -rw-r--r-- 41.7 KB
inode.c -rw-r--r-- 16.8 KB
link_iter.c -rw-r--r-- 2.4 KB
local_storage.c -rw-r--r-- 14.5 KB
lpm_trie.c -rw-r--r-- 21.0 KB
map_in_map.c -rw-r--r-- 3.1 KB
map_in_map.h -rw-r--r-- 461 bytes
map_iter.c -rw-r--r-- 4.5 KB
mmap_unlock_work.h -rw-r--r-- 1.7 KB
net_namespace.c -rw-r--r-- 13.0 KB
offload.c -rw-r--r-- 16.3 KB
percpu_freelist.c -rw-r--r-- 4.7 KB
percpu_freelist.h -rw-r--r-- 1.1 KB
prog_iter.c -rw-r--r-- 2.4 KB
queue_stack_maps.c -rw-r--r-- 6.6 KB
reuseport_array.c -rw-r--r-- 8.5 KB
ringbuf.c -rw-r--r-- 14.5 KB
stackmap.c -rw-r--r-- 16.8 KB
syscall.c -rw-r--r-- 125.7 KB
sysfs_btf.c -rw-r--r-- 1.1 KB
task_iter.c -rw-r--r-- 16.2 KB
tnum.c -rw-r--r-- 5.1 KB
trampoline.c -rw-r--r-- 17.1 KB
verifier.c -rw-r--r-- 431.2 KB

back to top