[PATCH] Bluetooth: 6lowpan: remove unused function

2021-04-15 Thread Jiapeng Chong
Fix the following clang warning: net/bluetooth/6lowpan.c:913:20: warning: unused function 'bdaddr_type' [-Wunused-function]. net/bluetooth/6lowpan.c:106:35: warning: unused function 'peer_lookup_ba' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong

[PATCH] atm: idt77252: remove unused function

2021-04-14 Thread Jiapeng Chong
Fix the following clang warning: drivers/atm/idt77252.c:1787:1: warning: unused function 'idt77252_fbq_level' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/atm/idt77252.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/atm/id

[PATCH] esp6: Simplify the calculation of variables

2021-04-13 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./net/ipv6/esp6_offload.c:321:32-34: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- net/ipv6/esp6_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH] wil6210: wmi: Remove useless code

2021-04-07 Thread Jiapeng Chong
Fix the following whitescan warning: An unsigned value can never be less than 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/wireless/ath/wil6210/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b

[PATCH] sunrpc: Remove unused function ip_map_lookup

2021-04-05 Thread Jiapeng Chong
Fix the following clang warnings: net/sunrpc/svcauth_unix.c:306:30: warning: unused function 'ip_map_lookup' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- net/sunrpc/svcauth_unix.c | 9 - 1 file changed, 9 deletions(-) diff --git a/

[PATCH] ppp: deflate: Remove useless call "zlib_inflateEnd"

2021-03-30 Thread Jiapeng Chong
Fix the following whitescan warning: Calling "zlib_inflateEnd(&state->strm)" is only useful for its return value, which is ignored. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/ppp/ppp_deflate.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH] cxgb4: Remove redundant NULL check

2021-03-22 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:3540:2-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 3 +-- 1 file changed

[PATCH] selftests/bpf: fix warning comparing pointer to 0

2021-03-17 Thread Jiapeng Chong
Fix the following coccicheck warning: ./tools/testing/selftests/bpf/progs/fentry_test.c:76:15-16: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/progs/fentry_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] virtio_net: replace if (cond) BUG() with BUG_ON()

2021-03-16 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/virtio_net.c:1551:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/virtio_net.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a

[PATCH] rxrpc: rxkad: replace if (cond) BUG() with BUG_ON()

2021-03-16 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./net/rxrpc/rxkad.c:1140:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- net/rxrpc/rxkad.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/rxrpc

[PATCH] selftests/bpf: fix warning comparing pointer to 0

2021-03-16 Thread Jiapeng Chong
Fix the following coccicheck warning: ./tools/testing/selftests/bpf/progs/fexit_test.c:77:15-16: WARNING comparing pointer to 0. ./tools/testing/selftests/bpf/progs/fexit_test.c:68:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing

[PATCH v2] netdevsim: fib: Remove redundant code

2021-03-10 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return "0" on line 889. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - Modify the function type to void. drivers/net/netdevsim/fib.

[PATCH v2] perf machine: Assign boolean values to a bool variable

2021-03-10 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/perf/util/machine.c:2041:9-10: WARNING: return of 0/1 in function 'symbol__match_regex' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - Make code simpler. tools/perf/util/machine.c |

[PATCH] bpf: fix warning comparing pointer to 0

2021-03-09 Thread Jiapeng Chong
Fix the following coccicheck warning: ./tools/testing/selftests/bpf/progs/fentry_test.c:67:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/progs/fentry_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] selftests/bpf: fix warning comparing pointer to 0

2021-03-09 Thread Jiapeng Chong
Fix the following coccicheck warning: ./tools/testing/selftests/bpf/progs/test_global_func10.c:17:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/progs/test_global_func10.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] perf tools: Remove redundant code

2021-03-09 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/perf/util/evlist.c:1315:5-8: Unneeded variable: "err". Return "- ENOMEM" on line 1340. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/perf/util/evlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH] netdevsim: fib: Remove redundant code

2021-03-09 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return "0" on line 889. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/netdevsim/fib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)

[PATCH] perf machine: Assign boolean values to a bool variable

2021-03-09 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/perf/util/machine.c:2041:9-10: WARNING: return of 0/1 in function 'symbol__match_regex' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/perf/util/machine.c | 4 ++-- 1 file changed, 2 insert

[PATCH] selftests/bpf: Simplify the calculation of variables

2021-03-03 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/testing/selftests/bpf/test_sockmap.c:735:35-37: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/test_sockmap.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] bpf: Simplify the calculation of variables

2021-03-03 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/bpf/bpf_dbg.c:1201:55-57: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/bpf/bpf_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpf_dbg.c

[PATCH] esp4: Simplify the calculation of variables

2021-03-01 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./net/ipv4/esp4.c:757:16-18: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/esp4.c b/net/ipv

[PATCH v2] perf machine: Use true and false for bool variable

2021-02-25 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/perf/util/machine.c:2000:9-10: WARNING: return of 0/1 in function 'symbol__match_regex' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - Simplified logic. tools/perf/util/machine.c |

[PATCH] perf/core: make perf_pmu_snapshot_aux static

2021-02-25 Thread Jiapeng Chong
Fix the following sparse warning: kernel/events/core.c:6539:6: warning: symbol 'perf_pmu_snapshot_aux' was not declared. Should it be static? Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH] kallsyms: make arch_get_kallsym static

2021-02-24 Thread Jiapeng Chong
Fix the following sparse warning: kernel/kallsyms.c:457:12: warning: symbol 'arch_get_kallsym' was not declared. Should it be static? Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- kernel/kallsyms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH] perf/core: make perf_pmu_snapshot_aux static

2021-02-23 Thread Jiapeng Chong
Fix the following sparse warning: kernel/events/core.c:6524:6: warning: symbol 'perf_pmu_snapshot_aux' was not declared. Should it be static? Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH v2] netdevsim: fib: remove unneeded semicolon

2021-02-22 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/netdevsim/fib.c:564:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - Remove the braces. drivers/net/netdevsim/fib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH] net/mlx5: remove unneeded semicolon

2021-02-22 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c:495:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] netdevsim: fib: remove unneeded semicolon

2021-02-22 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/netdevsim/fib.c:564:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/netdevsim/fib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/netdevsim/fib.c b/drivers/net

[PATCH] mt76: mt7921: remove unneeded semicolon

2021-02-22 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1402:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] libbpf: Remove unnecessary conversion to bool

2021-02-20 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/lib/bpf/libbpf.c:1487:43-48: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c

[PATCH] perf machine: Use true and false for bool variable

2021-02-18 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/perf/util/machine.c:2000:9-10: WARNING: return of 0/1 in function 'symbol__match_regex' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/perf/util/machine.c | 4 ++-- 1 file changed, 2 insert

[PATCH] iwlegacy: 4965-mac: Simplify the calculation of variables

2021-02-17 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/wireless/intel/iwlegacy/4965-mac.c:2596:54-56: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 3 +-- 1 file changed, 1 i

[PATCH bpf-next] selftests/bpf: Simplify the calculation of variables

2021-02-09 Thread Jiapeng Chong
iver.c:909:28-30: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/xdpxceiver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/too

[PATCH] selftests/bpf: Simplify the calculation of variables

2021-02-09 Thread Jiapeng Chong
iver.c:909:28-30: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/xdpxceiver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/too

[PATCH] rtlwifi: rtl8821ae: phy: Simplify bool comparison

2021-02-08 Thread Jiapeng Chong
Fix the following coccicheck warning: ./drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:3853:7-17: WARNING: Comparison of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 2 +- 1 file changed, 1

[PATCH] rtlwifi: rtl8192se: Simplify bool comparison

2021-02-08 Thread Jiapeng Chong
: Jiapeng Chong --- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c index 47fabce..aff8ab0 100644 --- a/drivers/net

[PATCH] bpf: Simplify bool comparison

2021-02-08 Thread Jiapeng Chong
Fix the following coccicheck warning: ./tools/bpf/bpf_dbg.c:893:32-36: WARNING: Comparison to bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/bpf/bpf_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpf_dbg.c b/tools/bpf/bpf_dbg.c index

[PATCH] selftests/bpf: Simplify the calculation of variables

2021-02-04 Thread Jiapeng Chong
iver.c:909:28-30: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/xdpxceiver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/too

[PATCH] perf tools: Simplify the calculation of variables

2021-02-04 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/perf/util/header.c:3809:18-20: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/p

[PATCH] iwlegacy: 4965-mac: Simplify the calculation of variables

2021-02-04 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/wireless/intel/iwlegacy/4965-mac.c:2596:54-56: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 3 +-- 1 file changed, 1 i

[PATCH] esp: Simplify the calculation of variables

2021-02-02 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./net/ipv6/esp6.c:791:16-18: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- net/ipv6/esp6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/esp6.c b/net/ipv

[PATCH] drivers: net: xen-netfront: Simplify the calculation of variables

2021-02-02 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/xen-netfront.c:1816:52-54: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/xen-netfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

[PATCH] dpaa2-eth: Simplify the calculation of variables

2021-02-02 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1651:36-38: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 +- 1 file changed, 1 i