linux-yocto/samples
Geert Uytterhoeven f79e6eb84d
samples/vfs/mountinfo: Use __u64 instead of uint64_t
On 32-bit (e.g. arm32, m68k):

    samples/vfs/mountinfo.c: In function ‘dump_mountinfo’:
    samples/vfs/mountinfo.c:145:29: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
      145 |                 printf("0x%lx 0x%lx 0x%llx ", mnt_ns_id, mnt_id, buf->mnt_parent_id);
	  |                           ~~^                 ~~~~~~~~~
	  |                             |                 |
	  |                             long unsigned int uint64_t {aka long long unsigned int}
	  |                           %llx
    samples/vfs/mountinfo.c:145:35: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
      145 |                 printf("0x%lx 0x%lx 0x%llx ", mnt_ns_id, mnt_id, buf->mnt_parent_id);
	  |                                 ~~^                      ~~~~~~
	  |                                   |                      |
	  |                                   long unsigned int      uint64_t {aka long long unsigned int}
	  |                                 %llx

Just using "%llx" instead of "%lx" is not sufficient, as uint64_t is
"long unsigned int" on some 64-bit platforms like arm64.  Hence also
replace "uint64_t" by "__u64", which matches what most other samples
are already using.

Fixes: d95e49bf8bcdc7c1 ("samples: add a mountinfo program to demonstrate statmount()/listmount()")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250106134802.1019911-1-geert+renesas@glider.be
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-01-10 12:08:27 +01:00
..
acrn virt: acrn: Fix typos 2024-05-04 18:59:44 +02:00
auxdisplay
binderfs
bpf samples/bpf: Remove unused variable in xdp2skb_meta_kern.c 2024-11-13 12:21:48 -08:00
cgroup samples/cgroup: add .gitignore file for generated samples 2024-01-24 11:52:40 -08:00
configfs samples: configfs: add missing MODULE_DESCRIPTION() macro 2024-07-10 14:59:01 +02:00
connector
coresight
fanotify
fprobe fprobe: add missing MODULE_DESCRIPTION() macro 2024-06-12 08:44:27 +09:00
ftrace samples/ftrace: Add support for ftrace direct samples on powerpc 2024-10-31 11:00:55 +11:00
hid HID: samples: fix the 2 struct_ops definitions 2024-07-05 14:08:31 +02:00
hidraw
hw_breakpoint perf/hw_breakpoint: use ERR_PTR_PCPU(), IS_ERR_PCPU() and PTR_ERR_PCPU() macros 2024-11-05 17:12:32 -08:00
kdb
kfifo kfifo: don't include dma-mapping.h in kfifo.h 2024-10-23 08:05:20 +02:00
kmemleak kmemleak-test: add percpu leak 2024-09-01 20:25:50 -07:00
kobject samples/kobject: add missing MODULE_DESCRIPTION() macros 2024-06-04 18:04:28 +02:00
kprobes samples: kprobes: add missing MODULE_DESCRIPTION() macros 2024-06-12 08:44:27 +09:00
landlock samples/landlock: Clarify option parsing behaviour 2024-10-22 20:43:43 +02:00
livepatch
mei
nitro_enclaves
pfsm
pidfd
pktgen samples: pktgen: correct dev to DEV 2024-11-13 18:54:33 -08:00
qmi samples: qmi: Convert to platform remove callback returning void 2024-05-27 10:14:15 +02:00
rpmsg
rust Rust changes for v6.13 2024-11-26 14:00:26 -08:00
seccomp samples: user-trap: fix strict-aliasing warning 2024-02-12 10:42:02 -08:00
timers
trace_events tracing: Add __print_dynamic_array() helper 2024-10-30 17:24:32 +01:00
trace_printk
uhid
user_events
v4l media: samples: v4l2-pci-skeleton.c: drop vb2_ops_wait_prepare/finish 2024-10-28 09:20:10 +01:00
vfio-mdev [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
vfs samples/vfs/mountinfo: Use __u64 instead of uint64_t 2025-01-10 12:08:27 +01:00
watch_queue
watchdog
Kconfig samples: introduce new samples subdir for cgroup 2023-12-10 16:51:54 -08:00
Makefile samples: introduce new samples subdir for cgroup 2023-12-10 16:51:54 -08:00