Skip to contentSkip to conversation

sysctl-fix-unused-function-warning.patch removed from -mm tree

merged [email protected] 1 participant 1 message May 7, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kernel/sysctl.c: fix unused function warning
has been removed from the -mm tree. Its filename was
sysctl-fix-unused-function-warning.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Arnd Bergmann <[email protected]>
Subject: kernel/sysctl.c: fix unused function warning

The newly added bpf_stats_handler() has the wrong #ifdef check around it, leading to an unused-function warning when CONFIG_SYSCTL is disabled:

kernel/sysctl.c:205:12: error: unused function 'bpf_stats_handler' [-Werror,-Wunused-function] static int bpf_stats_handler(struct ctl_table *table, int write,

Fix the check to match the reference.

Fixes d46edd671a14 ("bpf: Sharing bpf runtime stats with BPF_ENABLE_STATS")
Cc Kees Cook <[email protected]>
Cc Iurii Zaikin <[email protected]>
Cc Alexei Starovoitov <[email protected]>
Cc Daniel Borkmann <[email protected]>
Cc Martin KaFai Lau <[email protected]>
Cc Yonghong Song <[email protected]>
Cc Andrii Nakryiko <[email protected]>
Cc John Fastabend <[email protected]>
Cc KP Singh <[email protected]>

---

 kernel/sysctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sysctl.c renamed from kernel/sysctl.c~sysctl-fix-unused-function-warning +1 -1
@@ -201,7 +201,7 @@ static int max_extfrag_threshold = 1000;
 
 #endif /* CONFIG_SYSCTL */
 
-#ifdef CONFIG_BPF_SYSCALL
+#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL)
 static int bpf_stats_handler(struct ctl_table *table, int write,
 			     void __user *buffer, size_t *lenp,
 			     loff_t *ppos)

_

Patches currently in -mm which might be from [email protected] are

arm64-add-support-for-folded-p4d-page-tables-fix.patch bitops-avoid-clang-shift-count-overflow-warnings.patch ubsan-fix-gcc-10-warnings.patch initramfs-fix-another-section-mismatch.patch