[PATCH v3] net/bluetooth/hci_debugfs.c: fix coccicheck warnings

2021-01-26 Thread Jiapeng Zhong
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- Changes in v2: -Modifying row alignment. net/bluetooth/hci_debugfs.c | 80 ++--- 1 file changed, 40 insertions

[PATCH v2] net/bluetooth/hci_debugfs.c: fix coccicheck warnings

2021-01-26 Thread Jiapeng Zhong
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- Changes in v2: -Modifying row alignment. net/bluetooth/hci_debugfs.c | 80 ++--- 1 file changed, 40 insertions

[PATCH v2] rtlwifi: rtl8821ae: style: Simplify bool comparison

2021-01-26 Thread Jiapeng Zhong
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 Zhong --- Changes in v2: -Modify email address drivers/net/wireless/realtek/rtlwifi/rtl8821ae

[PATCH] rocker: Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/net/ethernet/rocker/rocker_ofdpa.c:926:34-36: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3] rtlwifi: Simplify bool comparison

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warning: ./drivers/net/wireless/realtek/rtlwifi/ps.c:798:7-21: WARNING: Comparison to bool ./drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:3848:7-17: WARNING: Comparison of 0/1 to bool variable Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong

[PATCH] net/mlx5: Assign boolean values to a bool variable

2021-01-25 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:575:2-14: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- 1 file changed, 1 insertion

[PATCH v2] net: Simplify the calculation of variables

2021-01-24 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./net/ipv4/esp4_offload.c:288:32-34: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- Changes in v2: -Drop the parenthesis around !skb_is_gso(skb) now. net/ipv4/esp4_offload.c | 2 +-

[PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR

2021-01-24 Thread Jiapeng Zhong
coccicheck suggested using PTR_ERR_OR_ZERO() and looking at the code. Fix the following coccicheck warnings: ./net/bridge/br_multicast.c:1295:7-13: WARNING: PTR_ERR_OR_ZERO can be used. Reported-by: Abaci Signed-off-by: Jiapeng Zhong --- net/bridge/br_multicast.c | 2 +- 1 file changed, 1

[PATCH] net: Simplify the calculation of variables

2021-01-22 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./net/ipv4/esp4_offload.c:288:32-34: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- net/ipv4/esp4_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH] rtlwifi: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c: 892:1-10: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 2 +- 1 file

[PATCH] net/bluetooth: Fix the follow coccicheck warnings

2021-01-19 Thread Jiapeng Zhong
./net/bluetooth/hci_debugfs.c: WARNING: sniff_min_interval_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Signed-off-by: Jiapeng Zhong Reported-by: Abaci Robot --- net/bluetooth/hci_debugfs.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions

[PATCH] cxgb4: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:5142:2-33: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] igc: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4018:2-25: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/net/ethernet/intel/igc/igc_main.c | 16 1 file changed, 8

[PATCH v3] rtlwifi: rtl8192se: Simplify bool comparison

2021-01-19 Thread Jiapeng Zhong
: Jiapeng Zhong --- Changes in v3: - Modified subject. 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

[PATCH v2] rtlwifi: rtl8192se: Simplify bool comparison.

2021-01-18 Thread Jiapeng Zhong
: Jiapeng Zhong --- Changes in v2: -Modified subject. 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

[PATCH] taprio: boolean values to a bool variable

2021-01-18 Thread Jiapeng Zhong
: Abaci Robot Signed-off-by: Jiapeng Zhong --- net/sched/sch_taprio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 6f77527..8287894 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -241,7 +241,7

[PATCH] rtlwifi/rtl8192se: Simplify bool comparison.

2021-01-15 Thread Jiapeng Zhong
: Jiapeng Zhong --- 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] net/bridge: Fix inconsistent format argument types

2021-01-13 Thread Jiapeng Zhong
is 'unsigned long'. net/bridge/br_sysfs_if.c(148): warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. Signed-off-by: Jiapeng Zhong Reported-by: Abaci Robot --- net/bridge/br_sysfs_if.c | 6 +++--- 1 file changed, 3 insertions

[PATCH] net/bridge: Fix inconsistent format argument types

2021-01-13 Thread Jiapeng Zhong
'unsigned long'. net/bridge/br_sysfs_br.c(244): warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. net/bridge/br_sysfs_br.c(236): warning: %ld in format string (no. 1) requires 'long' but the argument type

[PATCH] net/ipv6: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.

2021-01-06 Thread Jiapeng Zhong
The print format of this parameter does not match, because it is defined as int type, so modify the matching format of this parameter to %d format. Signed-off-by: Jiapeng Zhong Reported-by: Abaci --- net/ipv6/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6