Fix errors reported by kernel test robot.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308240536.xHdtOcPf-lkp@intel.com/
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
include/net/bpf_sk_storage.h | 2 +-
net/mptcp/sched.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/net/bpf_sk_storage.h b/include/net/bpf_sk_storage.h
index 805142d59d02..4251c8158b9d 100644
--- a/include/net/bpf_sk_storage.h
+++ b/include/net/bpf_sk_storage.h
@@ -60,7 +60,7 @@ static inline int bpf_sk_storage_diag_put(struct bpf_sk_storage_diag *diag,
{
return 0;
}
-struct bpf_local_storage_data *
+static inline struct bpf_local_storage_data *
bpf_sk_storage_lookup(struct sock *sk, struct bpf_map *map, bool cacheit_lockit)
{
return NULL;
diff --git a/net/mptcp/sched.c b/net/mptcp/sched.c
index 067df28899a6..23a9e4f2fe5c 100644
--- a/net/mptcp/sched.c
+++ b/net/mptcp/sched.c
@@ -208,6 +208,7 @@ int mptcp_sched_get_params(struct mptcp_sock *msk)
if (msk->sched == &mptcp_sched_default)
return msk->snd_burst;
+#ifdef CONFIG_BPF_SYSCALL
if (sk->sk_bpf_storage && sk->sk_bpf_storage->smap &&
!strcmp(sk->sk_bpf_storage->smap->map.name, "mptcp_burst_map")) {
struct bpf_local_storage_data *sdata;
@@ -223,6 +224,7 @@ int mptcp_sched_get_params(struct mptcp_sock *msk)
return ptr->snd_burst;
}
}
+#endif
return 0;
}
@@ -236,6 +238,7 @@ int mptcp_sched_set_params(struct mptcp_sock *msk, int burst)
return 0;
}
+#ifdef CONFIG_BPF_SYSCALL
if (sk->sk_bpf_storage && sk->sk_bpf_storage->smap &&
!strcmp(sk->sk_bpf_storage->smap->map.name, "mptcp_burst_map")) {
struct bpf_local_storage_data *sdata;
@@ -253,6 +256,7 @@ int mptcp_sched_set_params(struct mptcp_sock *msk, int burst)
}
}
}
+#endif
return 0;
}
--
2.35.3