linux/tools
Wladislav Wiebe ece5897e5a tools/mm: -Werror fixes in page-types/slabinfo
Commit e6d2c436ff ("tools/mm: allow users to provide additional
cflags/ldflags") passes now CFLAGS to Makefile.  With this, build systems
with default -Werror enabled found:

slabinfo.c:1300:25: error: ignoring return value of 'chdir'
declared with attribute 'warn_unused_result' [-Werror=unused-result]
                         chdir("..");
                         ^~~~~~~~~~~
page-types.c:397:35: error: format '%lu' expects argument of type
'long unsigned int', but argument 2 has type 'uint64_t'
{aka 'long long unsigned int'} [-Werror=format=]
                         printf("%lu\t", mapcnt0);
                                 ~~^     ~~~~~~~
..

Fix page-types by using PRIu64 for uint64_t prints and check in slabinfo
for return code on chdir("..").

Link: https://lkml.kernel.org/r/c1ceb507-94bc-461c-934d-c19b77edd825@gmail.com
Fixes: e6d2c436ff ("tools/mm: allow users to provide additional cflags/ldflags")
Signed-off-by: Wladislav Wiebe <wladislav.kw@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Herton R. Krzesinski <herton@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-10-30 20:14:11 -07:00
..
accounting
arch
bootconfig
bpf
build
certs
cgroup
counter
crypto
debugging
firewire
firmware
gpio
hv
iio
include bpf: Add the missing BPF_LINK_TYPE invocation for sockmap 2024-10-24 10:17:12 -07:00
kvm/kvm_stat
laptop
leds
lib
memory-model
mm tools/mm: -Werror fixes in page-types/slabinfo 2024-10-30 20:14:11 -07:00
net
objtool
pci
pcmcia
perf
power
rcu
sched_ext
scripts
sound
spi
testing selftests/mm: fix deadlock for fork after pthread_create with atomic_bool 2024-10-28 21:40:41 -07:00
thermal
time
tracing
usb
verification
virtio
wmi
workqueue
writeback
Makefile