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
>> 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
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 |
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
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
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/
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
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 ++
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 +++---
> 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
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 +
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
> 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
>> @@ -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
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
>> 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
>> 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
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
>>> 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
> 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
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
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
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
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
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
> 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
>> 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
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 ++-
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
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
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
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
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,
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
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
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/
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,
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
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
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,
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
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
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
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
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
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
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
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()
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
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
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 ++
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
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
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
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
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
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
---
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
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
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 ++
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 ++
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
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
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
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
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
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
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
---
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
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
> 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
> 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
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
>> @@ -4081,9 +4078,8 @@ static int wlcore_set_beacon_template(struct wl1271
>> *wl,
>> beacon->data,
>> beacon->len, 0,
>> min_rate);
>> -end_bcn:
>> +free_skb
>> @@ -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
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
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.
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
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
--
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
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
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 |
>> @@ -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);
>> -
>> @@ -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
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
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
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
>> 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
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
---
> 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?
>
> 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
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
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
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
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-
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
>> @@ -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)
>> +
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
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 +
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 - 100 of 410 matches
Mail list logo