[PATCH] cxgb4/cudbg_lib: Use common error handling code in cudbg_collect_tid()

2018-03-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Mar 2018 14:56:10 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/chelsio/cxgb4/cud

Re: [2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee()

2018-03-13 Thread SF Markus Elfring
>> Use three values directly for a condition check without assigning them >> to intermediate variables. > > Hi, > > what is the benefit of this? I proposed a small source code reduction. Other software design directions might become more interesting for this use case. Regards, Markus

[PATCH 3/3] wlcore: Use common error handling code in wl1271_acx_sta_rate_policies()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 22:18:45 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/ti/wlcore/acx.c |

[PATCH 2/3] wlcore: Return directly after a failed kzalloc() in wl1271_acx_sta_rate_policies()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 22:00:31 +0100 Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring --- drivers/net/wireless/ti/wlcore/acx.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/n

[PATCH 1/3] wlcore: Delete an unnecessary variable initialisation in wl1271_acx_sta_rate_policies()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 21:51:17 +0100 The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/net/wireless/ti/wlcore/acx.c | 2 +- 1 file changed, 1 insertio

[PATCH 0/3] wlcore: Adjustments for wl1271_acx_sta_rate_policies()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 22:25:45 +0100 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete an unnecessary variable initialisation Return directly after a failed kzalloc() Use common error handling code drivers/

[PATCH 2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 18:53:28 +0100 Use three values directly for a condition check without assigning them to intermediate variables. Signed-off-by: Markus Elfring --- drivers/net/usb/ax88179_178a.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) dif

[PATCH 1/2] net/usb/ax88179_178a: Use common code in ax88179_chk_eee()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 18:22:43 +0100 Adjust a jump target so that a bit of common code can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/usb/ax88179_178a.c | 34 ++

[PATCH 0/2] net/usb/ax88179_178a: Adjustments for ax88179_chk_eee()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 19:05:45 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use common code Delete three unnecessary variables drivers/net/usb/ax88179_178a.c | 45 +++---

Re: hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-15 Thread SF Markus Elfring
> These messages are not displayed anywhere else: > "unable to allocate receive buffer of size %u\n" > "unable to allocate send buffer of size %u\n", > > After set ret = -ENOMEM; and cleanup, we won't know which buffer allocation > failed without the error message. How do you think about to achi

[PATCH] sunrpc: Use seq_putc() in unix_gid_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 20:33:05 +0100 A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/sunrpc/svcauth_unix.c | 2 +

[PATCH] l2tp: Use seq_putc() in l2tp_dfs_seq_session_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 20:11:01 +0100 Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/l2tp/l2tp_debugfs.c | 4

Re: hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-08 Thread SF Markus Elfring
> These messages are not displayed anywhere else: > "unable to allocate receive buffer of size %u\n" > "unable to allocate send buffer of size %u\n", > > After set ret = -ENOMEM; and cleanup, we won't know which buffer allocation > failed without the error message. Do you notice a Linux allocati

Re: [PATCH] atm/clip: Use seq_puts() in svc_addr()

2018-01-07 Thread SF Markus Elfring
>> @@ -708,11 +708,11 @@ static void svc_addr(struct seq_file *seq, struct >> sockaddr_atmsvc *addr) >> static int e164[] = { 1, 8, 4, 6, 1, 0 }; >> >> if (*addr->sas_addr.pub) { >> - seq_printf(seq, "%s", addr->sas_addr.pub); >> + seq_puts(seq, addr->sa

[PATCH] hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-07 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 7 Jan 2018 21:03:26 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/hyperv/netvsc.c | 5 - 1 file changed, 5 deletions(-) di

Re: atm/clip: Use seq_puts() in svc_addr()

2018-01-07 Thread SF Markus Elfring
>> Is the function "seq_puts" a bit more efficient for the desired output >> of a single string in comparison to calling the function "seq_printf" >> for this purpose? > > Will you please be so kind and tell us? How do you think about to get the run time characteristics for these sequence output

Re: atm/clip: Use seq_puts() in svc_addr()

2018-01-07 Thread SF Markus Elfring
>> Two strings should be quickly put into a sequence by two function calls. >> Thus use the function "seq_puts" instead of "seq_printf". >> >> This issue was detected by using the Coccinelle software. > > Can you please explain what the issue really is and what you're trying > to do here? Is the

[PATCH] atm/clip: Use seq_puts() in svc_addr()

2018-01-06 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 6 Jan 2018 22:34:12 +0100 Two strings should be quickly put into a sequence by two function calls. Thus use the function "seq_puts" instead of "seq_printf". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/atm/clip

Re: bonding: Completion of error handling around bond_update_slave_arr()

2018-01-04 Thread SF Markus Elfring
>>> If you see 8 out of 9 call sites in this file ignore the return value. >> >> How do you think about to fix error detection and corresponding >> exception handling then? >> > If I understand your question correctly - not having memory is not a > correctable error I am unsure if it would be feas

Re: bonding: Completion of error handling around bond_update_slave_arr()

2018-01-04 Thread SF Markus Elfring
> If you see 8 out of 9 call sites in this file ignore the return value. How do you think about to fix error detection and corresponding exception handling then? Regards, Markus

[PATCH 1/2] wireless: libertas_tf: Delete an error message for a failed memory allocation in __if_usb_submit_rx_urb()

2018-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 3 Jan 2018 20:55:10 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/marvell/libertas_tf/if_usb.c | 1 - 1 file changed

[PATCH 2/2] wireless: libertas_tf: Improve a size determination in two functions

2018-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 3 Jan 2018 21:02:17 +0100 Replace the specification of data structures by variable references as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus

[PATCH 0/2] wireless: libertas_tf: Adjustments for three function implementations

2018-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 3 Jan 2018 21:06:54 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in __if_usb_submit_rx_urb() Improve a size determination in two functions

[PATCH] net: plip: Delete an error message for a failed memory allocation in plip_receive_packet()

2018-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 3 Jan 2018 16:00:23 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/plip/plip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 d

[PATCH] ps3_gelic_net: Delete an error message for a failed memory allocation in gelic_descr_prepare_rx()

2018-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 3 Jan 2018 14:50:59 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 -- 1 file changed, 2

Re: ethernet: mlx4: Delete an error message for a failed memory allocation in five functions

2018-01-03 Thread SF Markus Elfring
> I don't really accept this claim... > Short informative strings worth the tiny space they consume. There can be different opinions for their usefulness. > In addition, some out-of-memory errors are recoverable, even though their > backtrace is also printed. How do you think about to suppress

Re: bonding: Delete an error message for a failed memory allocation in bond_update_slave_arr()

2018-01-03 Thread SF Markus Elfring
>> Omit an extra message for a memory allocation failure in this function. >> >> This issue was detected by using the Coccinelle software. >> > What is the issue with this message? * Is it redundant? * Would a Linux allocation failure report be already sufficient here? Regards, Markus

[PATCH] netcp_ethss: Delete error messages for a failed memory allocation in three functions

2018-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 Jan 2018 22:08:50 +0100 Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/ti/netcp_ethss.c | 27 ++-

[PATCH] ethernet: cpsw-phy-sel: Delete an error message for a failed memory allocation in cpsw_phy_sel_probe()

2018-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 Jan 2018 21:41:25 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/ti/cpsw-phy-sel.c | 4 +--- 1 file changed, 1 inse

[PATCH] ethernet: mlx4: Delete an error message for a failed memory allocation in five functions

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 21:42:27 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/mellanox/mlx4/en_cq.c | 4 +--- drivers/net/ethe

[PATCH] ethernet/mediatek: Delete an error message for a failed memory allocation in mtk_add_mac()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 21:06:50 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 - 1 file changed, 1 de

[PATCH] igb: Delete an error message for a failed memory allocation in igb_enable_sriov()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 20:53:10 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/intel/igb/igb_main.c | 2 -- 1 file changed, 2 del

[PATCH] i40e: Delete an error message for a failed memory allocation in i40e_init_interrupt_scheme()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 20:38:14 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++--- 1 file changed,

[PATCH] ehea: Delete an error message for a failed memory allocation in two functions

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 20:14:25 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 -- 1 file changed, 2 d

[PATCH] net: hns: Delete an error message for a failed memory allocation in hns_rcb_common_get_cfg()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 19:11:46 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 5 ++--- 1 file cha

[PATCH 2/2] benet: Delete an unnecessary return statement in be_work_add_vxlan_port()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 18:45:17 +0100 The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring --- drivers/

[PATCH 1/2] benet: Delete an error message for a failed memory allocation in be_alloc_work()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 18:38:06 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/emulex/benet/be_main.c | 5 + 1 file changed,

[PATCH 0/2] benet: Adjustments for two function implementations

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 18:50:05 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in be_alloc_work() Delete an unnecessary return statement in be_work_add_vxlan

[PATCH] LiquidIO: Delete two error messages for a failed memory allocation in octeon_setup_interrupt()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 18:14:49 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/cavium/liquidio/lio_core.c | 5 + 1 file changed

[PATCH] net: systemport: Delete an error message for a failed memory allocation in two functions

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 17:50:02 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/broadcom/bcmsysport.c | 5 + 1 file changed,

[PATCH] bcm63xx_enet: Delete two error messages for a failed memory allocation in bcm_enetsw_open()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 17:30:04 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 -- 1 file changed, 2 de

[PATCH] bonding: Delete an error message for a failed memory allocation in bond_update_slave_arr()

2018-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 Jan 2018 17:00:04 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/bonding/bond_main.c | 1 - 1 file changed, 1 deletion(-) d

[PATCH] ppp: Delete an error message for a failed memory allocation in three functions

2017-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 31 Dec 2017 22:27:23 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ppp/ppp_generic.c | 12 drivers/net/ppp/ppp

[PATCH] smsc95xx: Delete an error message for a failed memory allocation in smsc95xx_suspend()

2017-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 31 Dec 2017 22:06:49 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/usb/smsc95xx.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH] wan/fsl_ucc_hdlc: Delete an error message for a failed memory allocation in ucc_hdlc_probe()

2017-12-30 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 30 Dec 2017 22:25:44 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wan/fsl_ucc_hdlc.c | 1 - 1 file changed, 1 deletion(-) d

[PATCH 2/2] at76c50x-usb: Improve size determinations in at76_usbdfu_download()

2017-12-30 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 30 Dec 2017 21:56:56 +0100 Replace the specification of two data types by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detect

[PATCH 1/2] at76c50x-usb: Delete an error message for a failed memory allocation in at76_submit_rx_urb()

2017-12-30 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 30 Dec 2017 21:50:12 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/atmel/at76c50x-usb.c | 2 -- 1 file changed, 2 de

[PATCH 0/2] at76c50x-usb: Adjustments for two function implementations

2017-12-30 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 30 Dec 2017 22:01:23 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in at76_submit_rx_urb() Improve size determinations in at76_usbdfu_download()

[PATCH] wireless: b43: Delete an error message for a failed memory allocation in b43_sdio_probe()

2017-12-30 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 30 Dec 2017 21:23:47 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/broadcom/b43/sdio.c | 1 - 1 file changed, 1 dele

[PATCH] wireless: airo: Delete an error message for a failed memory allocation in airo_networks_allocate()

2017-12-30 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 30 Dec 2017 20:48:44 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/cisco/airo.c | 7 +-- 1 file changed, 1 inser

[PATCH] orinoco: Delete an error message for a failed memory allocation in three functions

2017-12-30 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 30 Dec 2017 20:20:56 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/intersil/orinoco/main.c| 10 ++

[PATCH] p54spi: Delete an error message for a failed memory allocation in p54spi_rx()

2017-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 29 Dec 2017 22:33:10 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/intersil/p54/p54spi.c | 1 - 1 file changed, 1 de

[PATCH] rt2x00: Delete an error message for a failed memory allocation in rt2x00queue_allocate()

2017-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 29 Dec 2017 22:11:42 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 4 +--- 1 file chan

[PATCH] cw1200: Delete an error message for a failed memory allocation in three functions

2017-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 29 Dec 2017 21:48:05 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/st/cw1200/cw1200_sdio.c | 4 +--- drivers/net/w

[PATCH] wlcore: Delete an error message for a failed memory allocation in three functions

2017-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 29 Dec 2017 20:40:49 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/ti/wlcore/main.c | 8 ++-- drivers/net/wire

[PATCH 2/2] tipc: Improve a size determination in two functions

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 22:23:07 +0100 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detect

[PATCH 1/2] tipc: Use common error handling code in tipc_server_start()

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 22:18:35 +0100 * Improve jump targets so that a bit of exception handling can be better reused at the end of this function. * Adjust two condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 0/2] tipc: Fine-tuning for three function implementations

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 22:30:03 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use common error handling code in tipc_server_start() Improve a size determination in two functions net/tipc/server.c | 25

[PATCH 2/2] net/sched/cls_tcindex: Improve a size determination in two functions

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 21:17:26 +0100 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detect

[PATCH 1/2] net/sched/cls_tcindex: Use common error handling code in tcindex_set_parms()

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 21:10:49 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/sched/cls_tcindex.c | 14 ++

[PATCH 0/2] net/sched/cls_tcindex: Fine-tuning for two function implementations

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 21:30:03 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use common error handling code in tcindex_set_parms() Improve a size determination in two functions net/sched/cls_tcindex.c | 21 ++

[PATCH 3/3] net: sched: cls_fw: Adjust nine checks for null pointers

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 19:26:29 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code plac

[PATCH 2/3] net: sched: cls_fw: Improve two size determinations in fw_change()

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 19:19:10 +0100 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detect

[PATCH 1/3] net: sched: cls_fw: Use common error handling code in fw_change()

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 19:15:08 +0100 Add a jump target so that a bit of exception handling can be better reused in an if branch of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/sched/cls_fw.c | 7 +++ 1

[PATCH 0/3] net/sched/cls_fw: Fine-tuning for seven function implementations

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 19:36:54 +0100 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use common error handling code in fw_change() Improve two size determinations in fw_change() Adjust nine checks for null pointers

[PATCH] nl802154: Improve unlocking of a table in four functions

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 17:08:55 +0100 * Add jump targets so that a call of the function "rdev_unlock_llsec_table" is stored only once in these function implementations. * Replace four calls by goto statements. This issue was detected by using the Coccinelle software. Sign

[PATCH] 6lowpan: Combine two condition checks into one statement in lowpan_xmit()

2017-11-08 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 10:10:41 +0100 The same exception handling was used in an if branch of two separate statements. * Merge their condition checks into a single statement instead. * Delete the local variable "ret" which became unnecessary with this refactoring. This is

[PATCH] Bluetooth: Use common error handling code in bt_init()

2017-11-07 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 8 Nov 2017 08:03:04 +0100 * Improve jump targets so that a bit of exception handling can be better reused at the end of this function. * Adjust five condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH RFC v1] 9p/trans_fd: Use common error handling code in p9_fd_create_tcp()

2017-11-07 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 7 Nov 2017 10:05:20 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- v1 - Request for comments: I can offer

[PATCH RFC v1] caif: Use common error handling code in cfdgml_receive()

2017-11-07 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 7 Nov 2017 11:30:25 +0100 * Adjust jump targets so that a bit of exception handling can be better reused at the end of this function. * Adjust two condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- v

Re: sr9800: Use common error handling code in sr9800_phy_powerup()

2017-11-04 Thread SF Markus Elfring
> If you play the "smaller executable object code" card, people expect that > you provide the actual numbers, too. I can offer another bit of information for this software development discussion. The affected source file can be compiled for the processor architecture “x86_64” by a tool like “GCC

Re: [v2] can: Use common error handling code in vxcan_newlink()

2017-11-01 Thread SF Markus Elfring
> Acked-by: Oliver Hartkopp Thanks for another positive feedback. > Again: Posting such a patch on linux-...@vger.kernel.org is ENOUGH! I was informed in an other way for Linux software patches. > No need to cross post such a patch additionally on > > netdev@vger.kernel.org > linux-ker...@v

[PATCH v2] can: Use common error handling code in vxcan_newlink()

2017-11-01 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 1 Nov 2017 14:56:15 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- v2: An approach to make two checks for

Re: [PATCH 4/5] wlcore: Use common error handling code in wlcore_set_beacon_template()

2017-10-30 Thread SF Markus Elfring
>> @@ -4081,9 +4078,8 @@ static int wlcore_set_beacon_template(struct wl1271 >> *wl, >> beacon->data, >> beacon->len, 0, >> min_rate); >> -end_bcn: >> +free_skb

Re: [PATCH 1/5] wlcore: Use common error handling code in wlcore_nvs_cb()

2017-10-30 Thread SF Markus Elfring
>> @@ -6551,6 +6549,11 @@ static void wlcore_nvs_cb(const struct firmware *fw, >> void *context) >> out: >> release_firmware(fw); >> complete_all(&wl->nvs_loading_complete); >> + return; >> + >> +power_off: > > Name this "out_power_off" to match the other labels. Do you ex

[PATCH 5/5] wlcore: Use common error handling code in wl1271_op_suspend()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 20:36:39 +0100 Add a jump target so that a specific error message is stored only once at the end of this function implementation. Replace two calls of the macro "wl1271_warning" by goto statements. This issue was detected by using the Coccinelle softwa

[PATCH 4/5] wlcore: Use common error handling code in wlcore_set_beacon_template()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 20:16:22 +0100 Adjust jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/ti/wlcore/main.

[PATCH 3/5] wlcore: Return directly after a failed ieee80211_beacon_get() in wlcore_set_beacon_template()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 20:00:41 +0100 Return directly after a call of the function "ieee80211_beacon_get" failed at the beginning. Signed-off-by: Markus Elfring --- drivers/net/wireless/ti/wlcore/main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --gi

[PATCH 2/5] wlcore: Delete an unnecessary check statement in wlcore_set_beacon_template()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 19:45:07 +0100 A goto statement jumped to a target which followed a condition check immediately without the specification of useful actions between. Thus remove such unnecessary source code at the end of this function. Signed-off-by: Markus Elfring --

[PATCH 1/5] wlcore: Use common error handling code in wlcore_nvs_cb()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 18:38:04 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/ti/wlcore/main.c

[PATCH 0/5] wlcore: Fine-tuning for three function implementations

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 21:02:34 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): Use common error handling code in wlcore_nvs_cb() Delete an unnecessary check statement in wlcore_set_beacon_template() Return d

[PATCH] wimax/i2400m: Use common error handling code in i2400m_wake_tx_work()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 18:00:17 +0100 Adjust jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wimax/i2400m/netdev.c |

Re: [PATCH] sr9800: Use common error handling code in sr9800_phy_powerup()

2017-10-29 Thread SF Markus Elfring
>> @@ -700,10 +700,9 @@ static int sr9800_phy_powerup(struct usbnet *dev) >> >> /* set the embedded Ethernet PHY in power-up state */ >> ret = sr_sw_reset(dev, SR_SWRESET_IPRL); >> - if (ret < 0) { >> - netdev_err(dev->net, "Failed to reset PHY: %d\n", ret); >> -

Re: [PATCH] ravb: Use common error handling code in ravb_probe()

2017-10-29 Thread SF Markus Elfring
>> @@ -2069,10 +2069,9 @@ static int ravb_probe(struct platform_device *pdev) >> irq = platform_get_irq_byname(pdev, "ch22"); >> else >> irq = platform_get_irq(pdev, 0); >> - if (irq < 0) { >> - error = irq; >> - goto out_rel

[PATCH] sr9800: Use common error handling code in sr9800_phy_powerup()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 11:33:14 +0100 Add a jump target so that a specific error message is stored only once at the end of this function implementation. Replace two calls of the function "netdev_err" by goto statements. This issue was detected by using the Coccinelle softwar

[PATCH] smsc95xx: Use common error handling code in smsc95xx_write_eeprom()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 11:08:34 +0100 Add a jump target so that a specific error message is stored only once at the end of this function implementation. Replace two calls of the function "netdev_warn" by goto statements. This issue was detected by using the Coccinelle softwa

[PATCH] lan78xx: Use common error handling code in lan78xx_phy_init()

2017-10-28 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 28 Oct 2017 22:42:52 +0200 * Add a jump target so that a specific error message is stored only once at the end of this function implementation. * Replace two calls of the function "netdev_err" by goto statements. * Adjust two condition checks. This issue was d

Re: can: Use common error handling code in vxcan_newlink()

2017-10-28 Thread SF Markus Elfring
>> Are you interested in related adjustments for a bigger code base? > > No. Definitely not. You might have noticed that I am proposing similar changes already for other software modules. ;-) > If you aim for the the deletion of “ < 0” for all rtnl_configure_link() users > you would need to d

[PATCH] phylink: Use common error handling code in phylink_create()

2017-10-28 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 28 Oct 2017 21:48:31 +0200 * Add a jump target so that a bit of exception handling can be better reused at the end of this function. * Adjust three condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: can: Use common error handling code in vxcan_newlink()

2017-10-28 Thread SF Markus Elfring
> If you want to change the semantic of the result check I am curious if another source code reduction (by the deletion of “ < 0”) will become acceptable at similar places. > - this has to done consistently at all rtnl_configure_link() caller sites. Are there any more functions to consider? >

Re: can: Use common error handling code in vxcan_newlink()

2017-10-28 Thread SF Markus Elfring
> So if you would like to change the if-statement: It will need a small adjustment for the shown transformation. I was also unsure if the proposal will work in a single update step. > 1. Send a patch for vxcan.c to improve the error handling flow I am going to send a second approach for this u

[PATCH] netcp_core: Use common error handling code in netcp_create_interface()

2017-10-28 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 28 Oct 2017 20:11:02 +0200 Add a jump target so that a specific error code assignment is stored only once at the end of this function implementation. Replace five assignments by goto statements. This issue was detected by using the Coccinelle software. Signed-off

[PATCH] ravb: Use common error handling code in ravb_probe()

2017-10-28 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 28 Oct 2017 19:10:08 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/renesas/ravb_main

[PATCH] forcedeth: Use common error handling code in two functions

2017-10-28 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 28 Oct 2017 18:15:44 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/nvidia/forcedet

[PATCH] nfp: Improve unlocking of a mutex in area_cache_get()

2017-10-28 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 28 Oct 2017 17:12:10 +0200 Add a jump target so that a call of the function "mutex_unlock" is stored only once at the end of this function implementation. Replace four calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-

[PATCH] net: atheros: atl1: Use common error handling code in atl1_xmit_frame()

2017-10-28 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 28 Oct 2017 16:22:30 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet/atheros/atlx/atl1

Re: [PATCH] can: Use common error handling code in vxcan_newlink()

2017-10-28 Thread SF Markus Elfring
>> @@ -227,10 +227,8 @@ static int vxcan_newlink(struct net *net, struct >> net_device *dev, >>   netif_carrier_off(peer); >>     err = rtnl_configure_link(peer, ifmp); >> -    if (err < 0) { >> -    unregister_netdevice(peer); >> -    return err; >> -    } >> +    if (err) >> +   

[PATCH] can: Use common error handling code in vxcan_newlink()

2017-10-27 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 27 Oct 2017 22:22:24 +0200 * Add a jump target so that a bit of exception handling can be better reused at the end of this function. * Adjust two condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- dr

[PATCH] isdn_ppp: Use common error handling code in isdn_ppp_receive()

2017-10-26 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 26 Oct 2017 22:30:50 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/isdn/i4l/isdn_ppp.c | 20 +

[PATCH] net/rose: Delete an error message for a failed memory allocation in rose_proto_init()

2017-10-14 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 14 Oct 2017 20:57:28 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/rose/af_rose.c | 1 - 1 file changed, 1 deletion(-) diff --git a/

  1   2   3   4   5   >