[Patch bpf-next] bpf: remove unused parameter from ___bpf_prog_run

2021-03-31 Thread He Fengqing
'stack' parameter is not used in ___bpf_prog_run,
the base address have been set to FP reg. So consequently remove it.

Signed-off-by: He Fengqing 
---
 kernel/bpf/core.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index f5423251c118..5e31ee9f7512 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1363,11 +1363,10 @@ u64 __weak bpf_probe_read_kernel(void *dst, u32 size, 
const void *unsafe_ptr)
  * __bpf_prog_run - run eBPF program on a given context
  * @regs: is the array of MAX_BPF_EXT_REG eBPF pseudo-registers
  * @insn: is the array of eBPF instructions
- * @stack: is the eBPF storage stack
  *
  * Decode and execute eBPF instructions.
  */
-static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn, u64 *stack)
+static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn)
 {
 #define BPF_INSN_2_LBL(x, y)[BPF_##x | BPF_##y] = &##_##y
 #define BPF_INSN_3_LBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = &##_##y##_##z
@@ -1701,7 +1700,7 @@ static unsigned int PROG_NAME(stack_size)(const void 
*ctx, const struct bpf_insn
 \
FP = (u64) (unsigned long) [ARRAY_SIZE(stack)]; \
ARG1 = (u64) (unsigned long) ctx; \
-   return ___bpf_prog_run(regs, insn, stack); \
+   return ___bpf_prog_run(regs, insn); \
 }
 
 #define PROG_NAME_ARGS(stack_size) __bpf_prog_run_args##stack_size
@@ -1718,7 +1717,7 @@ static u64 PROG_NAME_ARGS(stack_size)(u64 r1, u64 r2, u64 
r3, u64 r4, u64 r5, \
BPF_R3 = r3; \
BPF_R4 = r4; \
BPF_R5 = r5; \
-   return ___bpf_prog_run(regs, insn, stack); \
+   return ___bpf_prog_run(regs, insn); \
 }
 
 #define EVAL1(FN, X) FN(X)
-- 
2.25.1



[Patch bpf-next] net: filter: Remove unused bpf_load_pointer

2021-03-29 Thread He Fengqing
Remove unused bpf_load_pointer function in filter.h

Signed-off-by: He Fengqing 
---
 include/linux/filter.h | 9 -
 1 file changed, 9 deletions(-)

diff --git a/include/linux/filter.h b/include/linux/filter.h
index eecfd82db648..9a09547bc7ba 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -1246,15 +1246,6 @@ static inline u16 bpf_anc_helper(const struct 
sock_filter *ftest)
 void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb,
   int k, unsigned int size);
 
-static inline void *bpf_load_pointer(const struct sk_buff *skb, int k,
-unsigned int size, void *buffer)
-{
-   if (k >= 0)
-   return skb_header_pointer(skb, k, size, buffer);
-
-   return bpf_internal_load_pointer_neg_helper(skb, k, size);
-}
-
 static inline int bpf_tell_extensions(void)
 {
return SKF_AD_MAX;
-- 
2.25.1



[PATCH] drivers: usb: Fix a typo in dwc3-qcom.c

2021-03-15 Thread He Fengqing
This patch fix a spelling typo in dwc3-qcom.c

Signed-off-by: He Fengqing 
---
 drivers/usb/dwc3/dwc3-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index fcaf04483ad0..5149dea68a5c 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -235,7 +235,7 @@ static int dwc3_qcom_interconnect_disable(struct dwc3_qcom 
*qcom)
 
 /**
  * dwc3_qcom_interconnect_init() - Get interconnect path handles
- * and set bandwidhth.
+ * and set bandwidth.
  * @qcom:  Pointer to the concerned usb core.
  *
  */
-- 
2.25.1