[PATCH v2] net/mlx4: Use true,false for bool variable

2020-12-14 Thread Vasyl Gomonovych
It is fix for semantic patch warning available in scripts/coccinelle/misc/boolinit.cocci Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Vasyl Gomonovych --- - Add coccicheck script name

[PATCH] net/mlx4: Use true,false for bool variable

2020-12-11 Thread Vasyl Gomonovych
Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Vasyl Gomonovych --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- 2 files changed, 2

[PATCH] net: intel: e100: Fix warning of passing zero to 'PTR_ERR'

2017-12-07 Thread Vasyl Gomonovych
fw could be NULL and put into PTR_ERR also zero in PTR_ERR will be translated into success return statement Signed-off-by: Vasyl Gomonovych --- drivers/net/ethernet/intel/e100.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e100.c b/drivers

[PATCH] net: ethernet: ixp4xx_eth: Use dma_pool_zalloc

2017-11-30 Thread Vasyl Gomonovych
Replacing dma_pool_alloc and memset with a single call to dma_pool_zalloc Signed-off-by: Vasyl Gomonovych --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet

[PATCH] NFC: use timer_setup() helper

2017-11-25 Thread Vasyl Gomonovych
function for function on line 767 net/nfc/hci/llc_shdlc.c:766:1-11: Use setup_timer function for function on line 767 net/nfc/llcp_core.c:1576:1-11: Use setup_timer function for function on line 1577 Generated by: scripts/coccinelle/api/setup_timer.cocci Signed-off-by: Vasyl Gomonovych

[PATCH] [WAN]: lmc: Use memdup_user() as a cleanup

2017-11-22 Thread Vasyl Gomonovych
Fix coccicheck warning which recommends to use memdup_user(): drivers/net/wan/lmc/lmc_main.c:497:27-34: WARNING opportunity for memdup_user Generated by: scripts/coccinelle/memdup_user/memdup_user.cocci Signed-off-by: Vasyl Gomonovych --- drivers/net/wan/lmc/lmc_main.c | 13 +++-- 1

[PATCH] net: ethernet: ti: cpts: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

2017-11-21 Thread Vasyl Gomonovych
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). drivers/net/ethernet/ti/cpts.c:567:9-16: WARNING: ERR_CAST can be used with cpts -> refclk Generated by: scripts/coccinelle/api/err_cast.cocci Signed-off-by: Vasyl Gomonovych --- drivers/net/ethernet/ti/cpts.c | 2 +- 1 f

Re: [PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-20 Thread Vasyl Gomonovych
It doesn't apply becouse of identical one qed: use kzalloc instead of kmalloc and memset.

[PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-16 Thread Vasyl Gomonovych
Use kzalloc rather than kmalloc followed by memset with 0 drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1280:13-20: WARNING: kzalloc should be used for dcbx_info, instead of kmalloc/memset Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Signed-off-by: Vasyl Gomonovych --- drivers

Re: [PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-16 Thread Vasyl Gomonovych
Sorry.

[PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-15 Thread Vasyl Gomonovych
331df ("qed: fix kzalloc-simple.cocci warnings")' But later warning was introduced in: 'commit 62289ba27558 ("qed: Fix possible system hang in the dcbnl-getdcbx() path.")' Signed-off-by: Vasyl Gomonovych --- drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 3 +-- 1 f