[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] hwmon: (pmbus) Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/hwmon/pmbus/pmbus_core.c:1265:24-26: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/hwmon/pmbus/pmbus_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH] mm/hugetlb: Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./mm/hugetlb.c:3372:20-22: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- mm/hugetlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb

[PATCH] edd: Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/firmware/edd.c:698:18-20: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/firmware/edd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/

[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] media: atomisp: Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/staging/media/atomisp/pci/sh_css_params.c:4652:24-26: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/staging/media/atomisp/pci/sh_css_params.c | 4 +--- 1 file ch

[PATCH] s390: Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./arch/s390/include/asm/scsw.h:528:48-50: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- arch/s390/include/asm/scsw.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --gi

[PATCH] media: firmware: qcom_scm: Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/firmware/qcom_scm.c:324:20-22: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/firmware/qcom_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] scsi: qla2xxx: Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/scsi/qla2xxx/qla_nvme.c:288:24-26: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH] scsi/qla4xxx: Simplify the calculation of variables

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/scsi/qla4xxx/ql4_83xx.c:475:23-25: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/scsi/qla4xxx/ql4_83xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) di

[PATCH] dm writecache: remove redundant NULL check

2021-01-26 Thread Jiapeng Zhong
-by: Jiapeng Zhong --- drivers/md/dm-writecache.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index d5223a0..8abf185 100644 --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -2004,8 +2004,7 @@ static

[PATCH] drm/gem: remove redundant NULL check

2021-01-26 Thread Jiapeng Zhong
-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 +-- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 12 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv

[PATCH] drm/msm: remove redundant NULL check

2021-01-26 Thread Jiapeng Zhong
Fix below warnings reported by coccicheck: ./drivers/gpu/drm/msm/msm_gem.c:991:3-9: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/gpu/drm/msm/msm_gem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[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 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] KVM: PPC: Book3S: Assign boolean values to a bool variable

2021-01-25 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./arch/powerpc/kvm/book3s_hv_rm_xics.c:381:3-15: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- arch/powerpc/kvm/book3s_hv_rm_xics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[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] ALSA: hda: Assign boolean values to a bool variable

2021-01-24 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./sound/pci/hda/hda_intel.c:2309:3-23: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- sound/pci/hda/hda_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda

[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] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR

2021-01-22 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] KVM: nSVM: Assign boolean values to a bool variable

2021-01-21 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./arch/x86/kvm/svm/nested.c:752:2-32: WARNING: Assignment of 0/1 to bool variable. ./arch/x86/kvm/svm/nested.c:545:1-31: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- arch/x86/kvm/svm/nested.c | 4

[PATCH] KVM: vmx: Assign boolean values to a bool variable

2021-01-21 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./arch/x86/kvm/vmx/vmx.c:6798:1-27: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- arch/x86/kvm/vmx/vmx.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff

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

2021-01-21 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/base/regmap/regcache.c:71:3-18: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] kvm: x86/mmu: Assign boolean values to a bool variable

2021-01-20 Thread Jiapeng Zhong
-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- arch/x86/kvm/mmu/mmu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 6d16481..ced0bd5 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -1819,7

[PATCH v3] scsi/qla4xxx: convert sysfs sprintf/snprintf family to sysfs_emit

2021-01-20 Thread Jiapeng Zhong
Fix the following coccicheck warning: ./drivers/scsi/qla4xxx/ql4_attr.c: WARNING: use scnprintf or sprintf Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- Changes in v3: - convert sysfs_emit_at to sysfs_emit. drivers/scsi/qla4xxx/ql4_attr.c | 32 1

[PATCH v2] scsi/qla4xxx: convert sysfs sprintf/snprintf family to sysfs_emit/sysfs_emit_at

2021-01-20 Thread Jiapeng Zhong
Fix the following coccicheck warning: ./drivers/scsi/qla4xxx/ql4_attr.c: WARNING: use scnprintf or sprintf. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- Changes in v2: - convert snprintf family to sysfs_emit_at. drivers/scsi/qla4xxx/ql4_attr.c | 26 +- 1

[PATCH] virtio-mem: Assign boolean values to a bool variable

2021-01-20 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/virtio/virtio_mem.c:2580:2-25: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/virtio/virtio_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio

[PATCH] watchdog/hpwdt: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/watchdog/hpwdt.c:345:2-12: WARNING: Assignment of 0/1 to bool variable. ./drivers/watchdog/hpwdt.c:126:2-12: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/watchdog/hpwdt.c | 6

[PATCH] pinctrl: nomadik: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl

[PATCH] HID: wacom: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/hid/wacom_wac.c:2536:2-6: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/hid/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/wacom_wac.c

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

2021-01-19 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/mmc/host/atmel-mci.c:2436:2-34: WARNING: Assignment of 0/1 to bool variable. ./drivers/mmc/host/atmel-mci.c:2425:2-20: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/mmc/host

[PATCH] scsi: qla2xxx: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/scsi/qla2xxx/qla_isr.c:780:2-18: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] pinctrl: qcom: spmi-gpio: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c:340:3-15: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 8 1 file changed, 4 insertions(+), 4

[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] drivers/scsi/qla4xxx: use scnprintf() instead of snprintf()

2021-01-19 Thread Jiapeng Zhong
printed. If the buffer is not large enough, then using snprintf() would result in a read overflow and an information leak. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/scsi/qla4xxx/ql4_attr.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff

[PATCH] drm/amdgpu: Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- .../display/dc/dml/dcn30/display_rq_dlg_calc_30.c | 32 +++--- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c b/drivers/gpu/drm/amd/display/dc

[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] hwmon: (applesmc) Assign boolean values to a bool variable

2021-01-19 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/hwmon/applesmc.c:568:6-23: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/hwmon/applesmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon

[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
-by: 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
-by: 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 v2] drivers/tty: Use bitwise instead of arithmetic operator for flags

2021-01-18 Thread Jiapeng Zhong
| ./drivers/tty/synclink_gt.c:2221:20-21: WARNING: sum of probable bitmasks, consider | Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- Changes in v2: -Supplement and modification. drivers/tty/synclink_gt.c | 34 -- 1 file changed, 24 insertions(+), 10

[PATCH] taprio: boolean values to a bool variable

2021-01-18 Thread Jiapeng Zhong
-by: 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] sound/pci/hda: boolean values to a bool variable

2021-01-18 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./sound/pci/hda/patch_conexant.c:570:2-20: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- sound/pci/hda/patch_conexant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci

[PATCH] drivers/pinctrl/bcm: Simplify bool comparison

2021-01-15 Thread Jiapeng Zhong
Fix the follow coccicheck warnings: ./drivers/pinctrl/bcm/pinctrl-ns2-mux.c:856:29-38: WARNING: Comparison to bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] rtlwifi/rtl8192se: Simplify bool comparison.

2021-01-15 Thread Jiapeng Zhong
-by: 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] drivers/tty: Use bitwise instead of arithmetic operator for flags

2021-01-15 Thread Jiapeng Zhong
| ./drivers/tty/synclink_gt.c:2221:20-21: WARNING: sum of probable bitmasks, consider | Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/tty/synclink_gt.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/tty/synclink_gt.c b/drivers/tty

[PATCH] virtio_ring: boolean values to a bool variable

2021-01-15 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/virtio/virtio_ring.c:1637:1-29: WARNING: Assignment of 0/1 to bool variable. ./drivers/virtio/virtio_ring.c:1636:1-30: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/virtio

[PATCH] marvell/mwifiex: replace one-element array with flexible-array member.

2021-01-15 Thread Jiapeng Zhong
Fix the follow coccicheck warnings: ./drivers/net/wireless/marvell/mwifiex/fw.h: WARNING use flexible-array member instead(https://www.kernel.org/doc/html/latest/process/ deprecated.html#zero-length-and-one-element-arrays) Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/net

[PATCH v2] fs/cifs: Simplify bool comparison.

2021-01-14 Thread Jiapeng Zhong
Fix the follow warnings: ./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variable Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- Changes in v2: -Modified subject. fs/cifs/connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cifs/connect.c

[PATCH] fs/cifs: Simplify bool comparisoni.

2021-01-14 Thread Jiapeng Zhong
Fix the follow coccicheck warnings: ./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variable Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- fs/cifs/connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index

[PATCH] fs/cifs: Assign boolean values to a bool variable

2021-01-14 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./fs/cifs/connect.c:3386:2-21: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs

[PATCH] fs/cifs: Replace one-element array with flexible-array member.

2021-01-14 Thread Jiapeng Zhong
-length-and-one-element-arrays) ./fs/cifs/smb2pdu.h:1284:8-14: WARNING use flexible-array member instead(https://www.kernel.org/doc/html/latest/process /deprecated.html#zero-length-and-one-element-arrays) Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- fs/cifs/smb2pdu.h | 24

[PATCH] drivers/usb/gadget/udc: Assign boolean values to a bool variable

2021-01-14 Thread Jiapeng Zhong
Fix the following coccicheck warnings: ./drivers/usb/gadget/udc/udc-xilinx.c:1957:2-18: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/usb/gadget/udc/udc-xilinx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

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

2021-01-13 Thread Jiapeng Zhong
/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(+), 3 deletions(-) diff --git a/net/bridge/br_sysfs_if.c b

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

2021-01-13 Thread Jiapeng Zhong
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 is 'unsigned long'. Signed-off-by: Jiapeng Zhong Reported-by: Abaci Robot --- net/bridge/br_sysfs_br.c | 12

[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

[PATCH] net/bluetooth: WARNING: adv_channel_map_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE

2021-01-06 Thread Jiapeng Zhong
adv_channel_map_fops is used in the debug file, we use DEFINE_DEBUGFS_ATTRIBUTE replaces DEFINE_SIMPLE_ATTRIBUTE, more clear and intuitive. Signed-off-by: Jiapeng Zhong Reported-by: Abaci --- net/bluetooth/hci_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net