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

2017-08-27 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 27 Aug 2017 21:18:37 +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 --- drivers/connector/cn_queue.c | 4 +--- 1 file changed, 1 insertion(+),

Re: connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry()

2017-08-28 Thread SF Markus Elfring
> Did coccinelle trip on the message I suggest to reconsider this implementation detail with the combination of a function call like “kzalloc”. A script for the semantic patch language can point various update candidates out according to a source code search pattern which is similar to “OOM_MESSAG

[PATCH 0/3] net-ATM: Adjustments for several function implementations

2017-10-09 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 9 Oct 2017 22:30:33 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete an error message for a failed memory allocation in five functions Improve a size determination in 12 functions Adjust 121 c

[PATCH 1/3] net/atm: Delete an error message for a failed memory allocation in five functions

2017-10-09 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 9 Oct 2017 21:34:35 +0200 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 --- net/atm/lec.c | 5 ++--- net/atm/mpc.c | 8 ++-- ne

[PATCH 2/3] net/atm: Improve a size determination in 12 functions

2017-10-09 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 9 Oct 2017 22:00:19 +0200 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 3/3] net/atm: Adjust 121 checks for null pointers

2017-10-09 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 9 Oct 2017 22:22:45 +0200 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 00/10] staging/irda/net: Adjustments for several function implementations

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 12 Oct 2017 11:25:43 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (10): Improve a size determination in 20 functions Delete ten error messages for a failed memory allocation Adjust 385 checks for n

[PATCH 01/10] staging: irda: Improve a size determination in 20 functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 10 Oct 2017 19:35:56 +0200 * Replace the specification of 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 de

[PATCH 03/10] staging/irda/net: Adjust 385 checks for null pointers

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:10:26 +0200 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 pla

[PATCH 02/10] staging: irda: Delete ten error messages for a failed memory allocation

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 10 Oct 2017 21:10:43 +0200 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/staging/irda/net/irias_object.c | 24

[PATCH 04/10] staging/irda/net: Delete an unnecessary variable initialisation in irlap_recv_discovery_xid_cmd()

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:18:34 +0200 The local variable "discovery" will only be used in a single if branch of this function. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irlap_frame.c | 2 +- 1 file ch

[PATCH 05/10] staging/irda/net: Delete an unnecessary variable initialisation in irlap_recv_discovery_xid_rsp()

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:20:22 +0200 The variable "discovery" will eventually be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irlap_frame.c | 2 +- 1 file chan

[PATCH 06/10] staging/irda/net: Delete an unnecessary variable initialisation in two functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:22:13 +0200 The local variable "tx_skb" will only be used in a single if branch of these functions. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irlap_frame.c | 4 ++-- 1 file c

[PATCH 07/10] staging/irda/net: Delete an unnecessary variable initialisation in four functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:26:00 +0200 The variable "tx_skb" will eventually be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irlap_frame.c | 6 +++--- drivers/st

[PATCH 08/10] staging/irda/net: Use common error handling code in irias_new_object()

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 12 Oct 2017 08:52:53 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irias_object.c | 14 -- 1 file changed, 8 insertions(+), 6 d

[PATCH 09/10] staging/irda/net: Combine some seq_printf() calls in two functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 12 Oct 2017 08:58:38 +0200 Some data were printed into a sequence by separate function calls. Print the same data by a single function call at each place instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- driver

[PATCH 10/10] staging/irda/net: Use seq_puts() in four functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 12 Oct 2017 11:08:36 +0200 Strings which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drive

Re: staging/irda/net: Adjustments for several function implementations

2017-10-12 Thread SF Markus Elfring
> Did you read drivers/staging/irda/TODO ? Yes. How do recent contributions (by other software developers) fit to information that is provided in this file? Regards, Markus

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

2017-10-14 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 14 Oct 2017 18:03:11 +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/ncsi/ncsi-rsp.c | 5 + 1 file changed, 1 insertion(+), 4 delet

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

2017-10-14 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 14 Oct 2017 18:48:18 +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/netrom/af_netrom.c | 4 +--- 1 file changed, 1 insertion(+), 3 del

[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/

[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 +++---

[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 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 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 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 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 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 |

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] 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

[PATCH 0/2] atm: Adjustments for adummy_init()

2017-10-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Oct 2017 21:43:21 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation Improve a size determination drivers/atm/adummy.c | 5 + 1 file changed,

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

2017-10-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Oct 2017 21:31:32 +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 --- drivers/atm/adummy.c | 1 - 1 file changed, 1 deletion(-) diff --git a

[PATCH 2/2] atm: Improve a size determination in adummy_init()

2017-10-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Oct 2017 21:35:18 +0200 Replace the specification of a data structure by a pointer dereference 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 dete

[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] 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] 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] 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] 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] 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] 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 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 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 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] 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] 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] 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] 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] 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] 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] 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 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 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 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] 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] 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] 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] 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] 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] 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] 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 ++-

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

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

[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

[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 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 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 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

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

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

[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: 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

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

[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: [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

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

[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

[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 +

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

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

[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

[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] 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] 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] 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 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 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 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 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 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 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 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 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 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 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 0/4] atm: idt77252: Adjustments for some function implementations

2017-08-05 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 5 Aug 2017 14:22:33 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (4): Adjust four function calls together with a variable assignment Delete an error message for a failed memory allocation in seven funct

[PATCH 1/4] atm: idt77252: Adjust four function calls together with a variable assignment

2017-08-05 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 4 Aug 2017 22:20:08 +0200 The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code places. Signed-off-by: Markus Elfring --- drivers/atm/idt77252.c | 13 -

[PATCH 2/4] atm: idt77252: Delete an error message for a failed memory allocation in seven functions

2017-08-05 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 5 Aug 2017 12:45:34 +0200 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Sig

[PATCH 3/4] atm: idt77252: Improve seven size determinations

2017-08-05 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 5 Aug 2017 13:51:04 +0200 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. Signed-off-by: Markus

[PATCH 4/4] atm: idt77252: Adjust ten checks for null pointers

2017-08-05 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 5 Aug 2017 14:04:42 +0200 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 pla

  1   2   3   4   5   >