summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/module.c
diff options
context:
space:
mode:
authorCharlie Jenkins <charlie@rivosinc.com>2024-12-12 08:01:43 +0100
committerPalmer Dabbelt <palmer@rivosinc.com>2024-12-17 23:23:18 +0100
commit498d5b14db8c9118be139f668720c67bea2dc344 (patch)
tree17a05304f9bebb47fd5cb8f84f0a2578ec12c08b /arch/riscv/kernel/module.c
parentLinux 6.13-rc3 (diff)
downloadlinux-498d5b14db8c9118be139f668720c67bea2dc344.tar.xz
linux-498d5b14db8c9118be139f668720c67bea2dc344.zip
riscv: selftests: Fix warnings pointer masking test
When compiling the pointer masking tests with -Wall this warning is present: pointer_masking.c: In function ‘test_tagged_addr_abi_sysctl’: pointer_masking.c:203:9: warning: ignoring return value of ‘pwrite’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 203 | pwrite(fd, &value, 1, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~ pointer_masking.c:208:9: warning: ignoring return value of ‘pwrite’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 208 | pwrite(fd, &value, 1, 0); I came across this on riscv64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04). Fix this by checking that the number of bytes written equal the expected number of bytes written. Fixes: 7470b5afd150 ("riscv: selftests: Add a pointer masking test") Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241211-fix_warnings_pointer_masking_tests-v6-1-c7ae708fbd2f@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kernel/module.c')
0 files changed, 0 insertions, 0 deletions