> I would prefer to not have it structured like this.
Would you like to show a source code layout alternative?
Regards,
Markus
From: Markus Elfring
Date: Sun, 4 Mar 2018 22:16:05 +0100
Move an assignment for the local variable "sg_used" so that its setting
will only be performed after corresponding memory allocations succeeded
by this function.
Signed-off-by: Markus Elfring
---
drivers/scsi/hpsa.c | 3 +
From: Markus Elfring
Date: Sun, 4 Mar 2018 22:02:10 +0100
The variable "status" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
drivers/scsi/hpsa.c | 2 +-
1 file changed, 1 insertion(+),
From: Markus Elfring
Date: Sun, 4 Mar 2018 22:00:19 +0100
The function "kfree" was called in a few cases by
the hpsa_big_passthru_ioctl() function during error handling
even if the passed variable contained a null pointer.
* Adjust jump targets.
* Delete two initialisations and a
From: Markus Elfring
Date: Sun, 4 Mar 2018 21:19:52 +0100
* Reuse existing functionality from memdup_user() instead of keeping
duplicate source code.
This issue was detected by using the Coccinelle software.
* Return directly after this function call failed at the beginning.
Signed-off-by
From: Markus Elfring
Date: Mon, 5 Mar 2018 09:14:32 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (4):
Use memdup_user() rather than duplicating its implementation
Less function calls in hpsa_big_passthru_ioctl() after error
27;s just doing pointer math to get the address.
Can eventually happen anything unexpected?
Can it be nicer to avoid such a software behaviour concern generally
just by adjusting a few jump labels (as I proposed it)?
Regards,
Markus
return &tfm->base;
}
Regards,
Markus
s://btrfs.wiki.kernel.org/index.php/Developer%27s_FAQ#How_not_to_start
It seems that you express a few aspects for general change resistance.
Will the circumstances evolve for similar software improvements?
Regards,
Markus
> Date: Tue, 12 Dec 2017 22:22:11 +0100
>
> Some update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (8):
> Less function calls in chap_server_compute_md5() after error detection
> Move resetting of seven variables in
From: Markus Elfring
Date: Tue, 12 Dec 2017 22:06:00 +0100
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 wa
From: Markus Elfring
Date: Tue, 12 Dec 2017 21:21:31 +0100
The local variable "param" will be reassigned by a following statement.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
drivers/target/iscsi/iscsi_target_parameters.c | 2 +-
1 file
From: Markus Elfring
Date: Tue, 12 Dec 2017 21:18:39 +0100
The variable "param" 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/target/iscsi/iscsi_target_parameters.c | 2
From: Markus Elfring
Date: Tue, 12 Dec 2017 21:15:55 +0100
The variable "param_list" will be reassigned by a following statement.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
drivers/target/iscsi/iscsi_target_parameters.c | 2 +-
1 file
From: Markus Elfring
Date: Tue, 12 Dec 2017 21:13:49 +0100
The local variable "ooo_cmdsn" will be reassigned by a following statement.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
drivers/target/iscsi/iscsi_target_erl1.c | 2 +-
1 file
From: Markus Elfring
Date: Tue, 12 Dec 2017 21:07:16 +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/target/iscsi/iscsi_target.c | 2 --
drivers
From: Markus Elfring
Date: Tue, 12 Dec 2017 19:43:47 +0100
Move the resetting of these array variables so that this operation will
be performed only if memory allocations succeeded before in this function.
Signed-off-by: Markus Elfring
---
drivers/target/iscsi/iscsi_target_auth.c | 22
From: Markus Elfring
Date: Tue, 12 Dec 2017 18:00:41 +0100
The functions "crypto_free_shash", "kfree" and "kzfree" were called
in a few cases by the chap_server_compute_md5() function during error
handling even if the passed variable contained a null pointer.
* Ad
From: Markus Elfring
Date: Tue, 12 Dec 2017 22:22:11 +0100
Some update suggestions were taken into account
from static source code analysis.
Markus Elfring (8):
Less function calls in chap_server_compute_md5() after error detection
Move resetting of seven variables in
From: Markus Elfring
Date: Tue, 12 Dec 2017 12:57:47 +0100
The script "checkpatch.pl" pointed information out like the following.
WARNING: quoted string split across lines
Thus fix the affected source code places.
Signed-off-by: Markus Elfring
---
drivers/target/iscsi/cxgbit/cxgbi
From: Markus Elfring
Date: Tue, 12 Dec 2017 11:34:51 +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/target/iscsi/cxgbit/cxgbit_target.c | 8 ++--
1 file
From: Markus Elfring
Date: Tue, 12 Dec 2017 13:12:11 +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 two functions
Combine substrings for 11 messages
drivers/target/iscsi
From: Markus Elfring
Date: Mon, 11 Dec 2017 11:01:57 +0100
The script "checkpatch.pl" pointed information out like the following.
WARNING: Prefer seq_puts to seq_printf
Thus fix the affected source code place.
Signed-off-by: Markus Elfring
---
drivers/target/loopback/tcm_loop.c
From: Markus Elfring
Date: Mon, 11 Dec 2017 10:58:33 +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: Mark
From: Markus Elfring
Date: Mon, 11 Dec 2017 10:56:42 +0100
The variables "se_cmd" and "tl_cmd" will eventually be set to appropriate
pointers a bit later.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
drivers/target/loopback/tc
From: Markus Elfring
Date: Mon, 11 Dec 2017 10:40:23 +0100
The script "checkpatch.pl" pointed information out like the following.
WARNING: quoted string split across lines
Thus fix the affected source code places.
Signed-off-by: Markus Elfring
---
drivers/target/loopback/tcm_lo
From: Markus Elfring
Date: Sun, 10 Dec 2017 21:23:43 +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
From: Markus Elfring
Date: Sun, 10 Dec 2017 21:18:15 +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/target/loopback/tcm_loop.c | 14 --
1 file
From: Markus Elfring
Date: Mon, 11 Dec 2017 11:33:44 +0100
Some update suggestions were taken into account
from static source code analysis.
Markus Elfring (6):
Delete an error message for a failed memory allocation in four functions
Improve a size determination in two functions
Combine
From: Markus Elfring
Date: Sun, 10 Dec 2017 19:54:11 +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/target/sbp/sbp_target.c | 13 -
1 file changed
ion
“7) Centralized exiting of functions” in the document “coding-style.rst”?
* Would you find a reduction of 16 bytes for the object code useful for
the affected function implementation?
Regards,
Markus
From: Markus Elfring
Date: Sat, 4 Nov 2017 13:43:22 +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/target/target_core_xcopy.c | 10 --
1 file changed
From: Markus Elfring
Date: Sat, 4 Nov 2017 13:35:08 +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
From: Markus Elfring
Date: Sat, 4 Nov 2017 13:26:46 +0100
The same label was used by goto statements after two condition checks.
Thus use a single statement instead.
Signed-off-by: Markus Elfring
---
drivers/target/target_core_xcopy.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions
From: Markus Elfring
Date: Sat, 4 Nov 2017 13:13:20 +0100
Adjust jump targets 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/target/target_core_xcopy.c
From: Markus Elfring
Date: Sat, 4 Nov 2017 14:09:09 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (4):
Use common error handling code in three functions
Combine two condition checks into one statement in target_xcopy_do_work
From: Markus Elfring
Date: Fri, 3 Nov 2017 22:20:38 +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/target/iscsi
From: Markus Elfring
Date: Thu, 2 Nov 2017 17:45:14 +0100
* Adjust five function calls together with a variable assignment.
* 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
=fa8785e862ef644f742558f1a8c91eca6f3f0004#n345
Can it be that the description for the possible return values is questionable
in the corresponding comment block at the moment?
Regards,
Markus
ou think about to continue the clarification for this aspect
of the involved programming interfaces?
Regards,
Markus
From: Markus Elfring
Date: Fri, 25 Aug 2017 22:06:59 +0200
Fix a word in this description.
Signed-off-by: Markus Elfring
---
drivers/scsi/sg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 4a2db7ff14cc..c80899d249c6 100644
From: Markus Elfring
Date: Fri, 25 Aug 2017 21:55:14 +0200
Replace the specification of a data type 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.
Signed-off-
From: Markus Elfring
Date: Fri, 25 Aug 2017 21:48: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
---
drivers/scsi/sg.c | 5 +
1 file changed, 1 insertion(+), 4
From: Markus Elfring
Date: Fri, 25 Aug 2017 22:20:02 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in sg_alloc()
Improve a size determination in sg_alloc()
Fix a typo in a
From: Markus Elfring
Date: Fri, 25 Aug 2017 21:34:44 +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/scsi/sd.c | 5 +
1 file changed, 1 insertion(+), 4
From: Markus Elfring
Date: Fri, 25 Aug 2017 21:17:02 +0200
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/scsi/scsi_scan.c | 9 +++--
1 file changed, 3
From: Markus Elfring
Date: Fri, 25 Aug 2017 20:54:16 +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/scsi/scsi_devinfo.c | 4 +---
1 file changed, 1 insertion
> Date: Thu, 18 Aug 2016 11:40:04 +0200
>
> Some update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (5):
> Use memdup_user()
> Less function calls after error detection
> Delete unnecessary initialisations
>
> Feel free to submit documentation patches.
Do involved software developers agree on the functionality for
stack dumps because of out of memory situations?
Regards,
Markus
nction implementations
which can pass the flag “__GFP_NOWARN”?
Regards,
Markus
> Although i don't know "out of memory" messages will be printed out by
> dmam_alloc_coherent() APIs
> or not.
Would such information belong to the programming interface documentation?
Are there any related tags or source code annotations needed?
Regards,
Markus
From: Markus Elfring
Date: Tue, 25 Apr 2017 22:00:05 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: void function return statements are not generally useful
Thus remove such a statement here.
Signed-off-by: Markus Elfring
---
drivers/scsi/uf
From: Markus Elfring
Date: Tue, 25 Apr 2017 21:50:43 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus remove such a statement here.
Link:
http://events.linuxfoundation.org/sites/event
From: Markus Elfring
Date: Tue, 25 Apr 2017 21:45:25 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "devm_kcalloc".
* Replace the specification of a data st
From: Markus Elfring
Date: Tue, 25 Apr 2017 22:20:02 +0200
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Use devm_kcalloc() in ufshcd_memory_alloc()
Delete an error message for a failed memory allocation in
ufshcd_memory_alloc
From: Markus Elfring
Date: Sun, 9 Apr 2017 21:07:14 +0200
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the Coccinell
From: Markus Elfring
Date: Sun, 9 Apr 2017 20:25:11 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the
From: Markus Elfring
Date: Sun, 9 Apr 2017 20:15:12 +0200
Replace the specification of two data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determinations a bit safer according to the Linux coding style convention.
Sig
From: Markus Elfring
Date: Sun, 9 Apr 2017 19:20:26 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus remove such statements here.
Link:
http://events.linuxfoundation.org/sites/event
From: Markus Elfring
Date: Sun, 9 Apr 2017 19:02:38 +0200
* Multiplications for the size determination of memory allocations
indicated that array data structures should be processed.
Thus use the corresponding function "kcalloc".
This issue was detected by using the Coccinell
From: Markus Elfring
Date: Sun, 9 Apr 2017 21:33:21 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
rd: Use kcalloc() in two functions
rd: Delete error messages for failed memory allocations
rd: Improve size determinations in
From: Markus Elfring
Date: Sun, 9 Apr 2017 16:00:39 +0200
Replace the specification of four data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determinations a bit safer according to the Linux coding style convention.
Sig
From: Markus Elfring
Date: Sun, 9 Apr 2017 15:34:50 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus remove such statements here.
Link:
http://events.linuxfoundation.org/sites/event
From: Markus Elfring
Date: Sun, 9 Apr 2017 15:06:00 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kcalloc".
This issue was detected by using the
From: Markus Elfring
Date: Sun, 9 Apr 2017 16:11:23 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Use kcalloc() in iscsit_allocate_iovecs()
Delete error messages for failed memory allocations
Improve size determinations in
(KERN_DEBUG"aacraid: Could not copy srb from
>> user\n"));
>> - rcode = -EFAULT;
>> + user_srbcmd = memdup_user(user_srb, fibsize);
>> + if (IS_ERR(user_srbcmd)) {
>> + rcode = PTR_ERR(user_srbcmd);
>> goto c
From: Markus Elfring
Date: Sun, 21 Aug 2016 10:39:04 +0200
Reuse existing functionality from memdup_user() instead of keeping
duplicate source code.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/scsi/megaraid/megaraid_sas_base.c | 11
From: Markus Elfring
Date: Sun, 21 Aug 2016 08:23:25 +0200
The script "checkpatch.pl" can point out that assignments should usually
not be performed within condition checks.
Thus move the assignment for the variable "srbfib" to a separate statement.
Signed-off-by: Markus E
From: Markus Elfring
Date: Sun, 21 Aug 2016 08:04:48 +0200
Replace the specification of data structures by references for variables
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Sig
From: Markus Elfring
Date: Sun, 21 Aug 2016 07:10:43 +0200
Keywords which belong to the category "control flow" in the C programming
language should be followed by a space character according to
the Linux coding style convention.
Signed-off-by: Markus Elfring
---
drivers/sc
From: Markus Elfring
Date: Sun, 21 Aug 2016 07:07:08 +0200
Do not use curly brackets at some source code places
where a single statement should be sufficient.
Signed-off-by: Markus Elfring
---
drivers/scsi/aacraid/commctrl.c | 18 ++
1 file changed, 6 insertions(+), 12
From: Markus Elfring
Date: Sat, 20 Aug 2016 21:25:20 +0200
Six local variables will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
drivers/scsi/aacraid/commctrl.c | 12 ++--
1 file changed, 6
>From e8187662ee30aab709a260c72fb86c51673f8e0d Mon Sep 17 00:00:00 2001
From: Markus Elfring
Date: Sat, 20 Aug 2016 20:40:47 +0200
Subject: [PATCH 2/7] aacraid: One function call less in aac_send_raw_srb()
after error detection
The kfree() function was called in a few cases by
From: Markus Elfring
Date: Sat, 20 Aug 2016 20:05:24 +0200
Reuse existing functionality from memdup_user() instead of keeping
duplicate source code.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/scsi/aacraid/commctrl.c | 12
From: Markus Elfring
Date: Sun, 21 Aug 2016 09:03:21 +0200
Several update suggestions were taken into account
from static source code analysis.
Markus Elfring (7):
Use memdup_user() rather than duplicating its implementation
One function call less in aac_send_raw_srb() after error detection
From: Markus Elfring
Date: Wed, 17 Aug 2016 23:04:46 +0200
Move the assignment for the local variable "sg_used" behind the source code
for some memory allocations by this function.
Signed-off-by: Markus Elfring
---
drivers/block/cciss.c | 3 ++-
1 file changed, 2 insertions(+),
From: Markus Elfring
Date: Thu, 18 Aug 2016 11:26:18 +0200
* The script "checkpatch.pl" can point information out like the following.
WARNING: Prefer kcalloc over kzalloc with multiply
Thus fix the affected source code places.
* Replace the specification of data structures
From: Markus Elfring
Date: Wed, 17 Aug 2016 22:55:51 +0200
Three local variables will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
drivers/block/cciss.c | 6 +++---
1 file changed, 3 insertions(+), 3
From: Markus Elfring
Date: Wed, 17 Aug 2016 22:39:31 +0200
The kfree() function was called in a few cases by the
cciss_bigpassthru() function during error handling
even if a passed variable contained a null pointer.
Adjust jump targets according to the Linux coding style convention.
Signed-off
From: Markus Elfring
Date: Thu, 18 Aug 2016 11:40:04 +0200
Some update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
Use memdup_user()
Less function calls after error detection
Delete unnecessary initialisations
Move an assignment for the
From: Markus Elfring
Date: Wed, 17 Aug 2016 22:10:29 +0200
* Reuse existing functionality from memdup_user() instead of keeping
duplicate source code.
This issue was detected by using the Coccinelle software.
* Return directly if this copy operation failed.
Signed-off-by: Markus Elfring
After introducing generic strtolower(), iscsi_initiatorname_tolower() is
no longer needed.
Signed-off-by: Markus Mayer
Acked-by: Nicholas Bellinger
---
drivers/target/iscsi/iscsi_target_nego.c | 17 +
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/target
independent and
can't rely on a Linux library function (see [3])
- Added two new patches replacing strtoupper() implementations
[1] https://lkml.org/lkml/2016/6/30/727
[2] https://lkml.org/lkml/2016/7/10/4
[3] https://lkml.org/lkml/2016/7/1/9
Markus Mayer (7):
lib: string: add funct
take a single string argument and modify the passed-in string.
strlcpytoupper() and strlcpytolower() return the number of characters
copied or -E2BIG if the destination string was truncated.
Like strlcpy(), and unlike strncpy(), the functions guarantee NULL
termination of the destination string.
S
From: Markus Elfring
Date: Sun, 24 Jul 2016 14:20:21 +0200
The kfree() 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
---
drivers
> From: Markus Elfring
> Date: Tue, 17 Nov 2015 08:14:52 +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 softwar
After introducing generic strtolower(), iscsi_initiatorname_tolower() is
no longer needed.
Signed-off-by: Markus Mayer
Acked-by: Nicholas Bellinger
---
drivers/target/iscsi/iscsi_target_nego.c | 17 +
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/target
take a single string argument and modify the passed-in string.
strlcpytoupper() and strlcpytolower() return the number of characters
copied or -E2BIG if the destination string was truncated.
Like strlcpy(), and unlike strncpy(), the functions guarantee NULL
termination of the destination string.
S
[3] https://lkml.org/lkml/2016/7/1/9
Markus Mayer (7):
lib: string: add functions to case-convert strings
drm/nouveau/core: make use of new strlcpytolower() function
ACPI / device_sysfs: make use of new strtolower() function
staging: speakup: replace spk_strlwr() with strlcpytolower()
i
On 20 July 2016 at 14:17, Nicholas A. Bellinger wrote:
> On Wed, 2016-07-20 at 14:16 -0700, Nicholas A. Bellinger wrote:
>> On Fri, 2016-07-08 at 15:43 -0700, Markus Mayer wrote:
>> > After introducing generic strtolower(), iscsi_initiatorname_tolower() is
>> > no long
On Wed, Jul 13, 2016 at 03:52:38PM -0700, Markus Mayer wrote:
> On Sat, Jul 09, 2016 at 09:11:05PM -0700, Markus Mayer wrote:
>> On 9 July 2016 at 20:13, Chris Metcalf wrote:
>>> On 7/8/2016 6:43 PM, Markus Mayer wrote:
>>>>
>>>> This series introduces
From: Markus Elfring
Date: Wed, 20 Jul 2016 13:12:33 +0200
Pass the constant "FAILED" in a function call directly instead of
using an intialisation for a local variable.
Signed-off-by: Markus Elfring
---
v2: Rebased on source files from "Linux next-20160719"
drivers/xe
From: Markus Elfring
Date: Wed, 20 Jul 2016 13:03:16 +0200
* Adjust jump targets according to the Linux coding style convention.
* A bit of refactoring for the control flow
Suggested-by: Jürgen Groß
Signed-off-by: Markus Elfring
---
v2: Rebased on source files from "Linux next-201
From: Markus Elfring
Date: Tue, 19 Jul 2016 15:42:19 +0200
The kfree() 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
---
v2: Rebased
From: Markus Elfring
Date: Wed, 20 Jul 2016 13:20:04 +0200
Further update suggestions were taken into account
after a patch was applied from static source code analysis.
Markus Elfring (3):
Delete an unnecessary check before the function call "kfree"
Rename jump
function call after a memory
>> allocation failure?
>
> I think this just doesn't matter. If it were a hot path, yes. But trying
> to do micro-optimizations in an error path is just not worth the effort.
Would you like to reduce also the amount of function calls in such special
it make sense to move it further down at the end?
> +free_tmr:
> kfree(tmr);
How do you think about to skip this function call after a memory
allocation failure?
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Markus Elfring
Date: Sat, 16 Jul 2016 21:55:01 +0200
Pass the constant "FAILED" in a function call directly instead of
using an intialisation for a local variable.
Signed-off-by: Markus Elfring
---
drivers/xen/xen-scsiback.c | 4 ++--
1 file changed, 2 insertions(+), 2
From: Markus Elfring
Date: Sat, 16 Jul 2016 21:42:42 +0200
The kfree() function was called in one case by the
scsiback_device_action() function during error handling
even if the passed variable "tmr" contained a null pointer.
Adjust jump targets according to the Linux coding style
From: Markus Elfring
Date: Sat, 16 Jul 2016 21:21:05 +0200
The kfree() 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
---
drivers
1 - 100 of 212 matches
Mail list logo