> From: Markus Elfring
> Date: Wed, 19 Nov 2014 19:19:21 +0100
>
> The functions kfree() and pci_dev_put() test whether their argument is NULL
> and then return immediately. Thus the test around the call is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off
> Recent commits to kernel/git/torvalds/linux.git have made the following
> functions able to tolerate NULL arguments:
>
> kmem_cache_destroy (commit 3942d29918522)
> mempool_destroy (commit 4e3ca3e033d1)
> dma_pool_destroy (commit 44d7175da6ea)
How do you think about to extend an other SmPL scrip
From: Markus Elfring
Date: Thu, 5 Nov 2015 08:41:00 +0100
The functions "sc_return_credits" and "vfree" perform also input
parameter validation. Thus the tests around their calls are not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
driver
From: Markus Elfring
Date: Sun, 15 Nov 2015 21:58:45 +0100
The kmem_cache_destroy() function tests whether its argument is NULL
and then returns immediately. Thus the test around the calls is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
--
From: Markus Elfring
Date: Wed, 19 Nov 2014 19:19:21 +0100
The functions kfree() and pci_dev_put() test whether their argument is NULL
and then return immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfrin
From: Markus Elfring
Date: Wed, 4 Feb 2015 15:17:00 +0100
The vunmap() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/net/ethernet/mellanox/mlx4
From: Markus Elfring
Date: Thu, 5 Feb 2015 13:20:42 +0100
The srp_destroy_fr_pool() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
From: Markus Elfring
Date: Mon, 9 Feb 2015 11:10:41 +0100
The vunmap() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Acked-by: Eli Cohen
---
drivers/net/e
From: Markus Elfring
Date: Sat, 26 Dec 2015 19:30:54 +0100
Several update suggestions were taken into account
from static source code analysis.
Markus Elfring (6):
One variable and jump label less in ocrdma_alloc_ucontext_pd()
Delete unnecessary variable initialisations in 11 functions
Ret
From: Markus Elfring
Date: Sat, 26 Dec 2015 17:16:00 +0100
This issue was detected by using the Coccinelle software.
* Let us return directly if a call of the _ocrdma_alloc_pd()
function failed.
* Delete the jump label "err" and the local variable "status" then.
Signed-off-by: Markus Elfring
From: Markus Elfring
Date: Sat, 26 Dec 2015 18:18:18 +0100
The variable "status" will be set to an appropriate value a bit later.
Thus let us omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
drivers/infiniband/hw/ocrdma/ocrdma_ah.c| 2 +-
drivers/infini
From: Markus Elfring
Date: Sat, 26 Dec 2015 18:28:35 +0100
Return zero at the end without using the local variable "status".
Signed-off-by: Markus Elfring
---
drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/oc
From: Markus Elfring
Date: Sat, 26 Dec 2015 18:40:43 +0100
Return the value from a call of the ocrdma_mbx_modify_qp() function
without using an extra assignment for the local variable "status".
Signed-off-by: Markus Elfring
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 +---
1 file chang
From: Markus Elfring
Date: Sat, 26 Dec 2015 18:54:47 +0100
Return constant integer values without storing them in the local
variable "status".
Signed-off-by: Markus Elfring
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --gi
From: Markus Elfring
Date: Sat, 26 Dec 2015 19:09:23 +0100
1. Return zero in one case directly.
2. Return the value from a call of the _ocrdma_dealloc_pd() function
without using an extra assignment for the local variable.
3. Remove the variable "status" in this function then.
Signed-off-by
From: Markus Elfring
Date: Sat, 26 Dec 2015 22:18:38 +0100
This issue was detected by using the Coccinelle software.
* Let us return directly if a call of the _ocrdma_alloc_pd()
function failed.
* Reduce the scope for the local variable "status" to one case
of an if statement.
* Delete the
From: Markus Elfring
Date: Sun, 27 Dec 2015 13:12:10 +0100
Subject: [PATCH 0/2] InfiniBand-iSER: Refactoring for two function
implementations
I suggest to return directly instead of using the jump label "err"
in two functions (which are working without clean-up there).
Markus Elfring (2):
One
From: Markus Elfring
Date: Sun, 27 Dec 2015 11:41:42 +0100
This issue was detected by using the Coccinelle software.
1. Let us return directly if a call of the iser_set_sig_attrs()
function failed.
2. Delete the jump label "err" then.
3. Return zero as a constant at the end.
Signed-off-by:
From: Markus Elfring
Date: Sun, 27 Dec 2015 12:54:52 +0100
This issue was detected by using the Coccinelle software.
1. Let us return directly if a call of the function "isert_set_sig_attrs"
or "ib_post_send" failed.
2. Delete the jump label "err" then.
3. Return zero as a constant at the e
19 matches
Mail list logo