Re: [Cocci] [PATCH v2] coccinelle: assign signed result to unsigned variable

2015-09-28 Thread SF Markus Elfring
> I guess parallelism would be helpful? > You could try the following options: > > -j n --chunksize 10 --recursive-includes --include-headers-for-types > > where n is the number of cores that you want to use. Has the make target "coccicheck" direct support for such special parameters? >

Re: [Cocci] [PATCH v2] coccinelle: assign signed result to unsigned variable

2015-09-28 Thread SF Markus Elfring
>> Can the Coccinelle software work together with a kind of "precompiled >> header database"? > > There is an option --use-cache, which caches the compiled code > on the disk. But I have not found the effects to be very satisfactory. I am curious if this situation will be improved by further

Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero

2015-09-23 Thread SF Markus Elfring
> In the example above spatch finds ull, ulli, but not ul and uli. > If you add int to unsigned long long, it won't find anything. I suggest to take another look at the use of type modifiers in the semantic patch language. It seems that it matters occasionally to specify them explicitly. How do

Re: [PATCH] coccinelle: assign signed result to unsigned variable

2015-09-24 Thread SF Markus Elfring
> +@rs@ > +position p; > +typedef bool, u8, u16, u32, u64, s8, s16, s32, s64; > +{char, short int, int, long, long long, s8, s16, s32, s64} vs; Can it matter to specify also the type modifier "signed" in this SmPL approach? http://coccinelle.lip6.fr/docs/main_grammar005.html#ctype_qualif >

Re: [PATCH] coccinelle: assign signed result to unsigned variable

2015-09-25 Thread SF Markus Elfring
>>> +@rs@ >>> +position p; >>> +typedef bool, u8, u16, u32, u64, s8, s16, s32, s64; >>> +{char, short int, int, long, long long, s8, s16, s32, s64} vs; >> Can it matter to specify also the type modifier "signed" in this SmPL >> approach? >>

Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero

2015-09-21 Thread SF Markus Elfring
> v3: added bool type I would appreciate a bit more feedback for my concerns around your evolving approach. * Reuse of "long int"? * Splitting of the suggested SmPL rule so that each source code check will be connected with appropriate warning messages. Will any more fine-tuning be useful?

Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero

2015-09-22 Thread SF Markus Elfring
> If you mean adding int to 'unsigned long [long]' types, it does not work. > For some reason it works only without adding int after long. Do you get any error message for this SmPL approach? With which source files do you try the extended SmPL script out? Regards, Markus -- To unsubscribe from

Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero

2015-09-21 Thread SF Markus Elfring
>> * Reuse of "long int"? > If you mean adding int to 'unsigned long [long]' types, it does not work. I am surprised. > For some reason it works only without adding int after long. The Coccinelle software should support the term "generic_ctype" from the SmPL grammar so far, shouldn't it?

Source code review around jump label usage

2015-12-11 Thread SF Markus Elfring
Hello, I have tried another specific analysis out on the source files of "Linux next-20151211" with help of the software "Coccinelle 1.0.4". I have taken a more detailed look on the use of the goto statement and corresponding jump labels. Can statistics like the following support software

Re: staging: lustre: Delete unnecessary goto statements in six functions

2015-12-15 Thread SF Markus Elfring
> This is the original code: Really …? > result = baz(); > if (result) > goto label; > > label: > go on... I do not see such a source code structure at the six places I propose to clean-up. > I don't find the test->goto label; label: use offensive, > but if he

Re: staging: lustre: Delete unnecessary goto statements in six functions

2015-12-15 Thread SF Markus Elfring
> I think there should _not_ be a hardened rule. I guess that it can become hard to achieve consensus on a precise rule. > Style is just a guide. Generally nice … > Do what you think appropriate. I'm sorry for my evolving understanding. - But I imagine that your feedback can cause further

Re: staging: lustre: Delete unnecessary goto statements in six functions

2015-12-15 Thread SF Markus Elfring
> rc = mdc_queue_wait(req); > goto out; > out: > ptlrpc_req_finished(req); > return rc; > } > - > > I think if the last goto out; is to be removed, > then it should be replaced by a blank line. > > It separates the last operation block from the return.

Re: staging: lustre: Rename a jump label for ptlrpc_req_finished() calls

2015-12-14 Thread SF Markus Elfring
>>> Markus, please stop sending these things to rename out labels unless >>> there is a bug. CodingStyle allows out labels. >> >> How does this feedback fit to information like the following? >> >> "… >> Chapter 7: … >> … >> Choose label names which say what the goto does or why the goto exists.

Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in iscsi_set_default_param() directly

2015-12-14 Thread SF Markus Elfring
> @@ -127,9 +127,8 @@ static struct iscsi_param *iscsi_set_default_param(struct > iscsi_param_list *para > char *name, char *value, u8 phase, u8 scope, u8 sender, > u16 type_range, u8 use) > { > - struct iscsi_param *param = NULL; > + struct iscsi_param

Re: [PATCH 5/7] staging: lustre: Less checks in mgc_process_recover_log() after error detection

2015-12-14 Thread SF Markus Elfring
>> A few checks would be performed by the mgc_process_recover_log() function >> even if it is known already that the passed variable "pages" contained >> a null pointer. >> >> * Let us return directly if a call of the kcalloc() function failed. >> >> * Move assignments for the variables "eof" and

Re: staging: lustre: Less checks in mgc_process_recover_log() after error detection

2015-12-14 Thread SF Markus Elfring
>> Can you accept the proposed changes around the affected memory allocations? > > Just leave it as-is if there is no reason. I suggest to make the implementation of the function "mgc_process_recover_log" a bit more efficient. >> Do you prefer to stash any changes together for a bigger update

Re: [PATCH 1/2] zram: Less checks in zram_bvec_write() after error detection

2015-12-14 Thread SF Markus Elfring
>> I suggest to make the affected exception handling a bit more efficient. >> Such source code fine-tuning has got a few special consequences. > > by 'more efficient' you mean saving cpu cycles on 'bvec->bv_len != PAGE_SIZE' > comparison in exception/error path? Yes … > ... > check_strm: >

Re: staging: lustre: Less checks in mgc_process_recover_log() after error detection

2015-12-14 Thread SF Markus Elfring
>> I do not like patch squashing for my update suggestions here. > > I am a maintainer in drivers/staging. Thanks for this information. > I am telling you what you need to do if you want us to apply your patch. I am still waiting for a bit more constructive feedback for this patch series. How

[PATCH 3/7] staging: lustre: Rename a jump label for a kfree(key) call

2015-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 13 Dec 2015 10:56:35 +0100 This issue was detected by using the Coccinelle software. Choose a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring ---

[PATCH 4/7] staging: lustre: Delete an unnecessary variable initialisation in mgc_process_recover_log()

2015-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 13 Dec 2015 12:00:32 +0100 The variable "mne_swab" will eventually be set to an appropriate value from a call of the ptlrpc_rep_need_swab() function. Thus let us omit the explicit initialisation at the beginning. Signed-off-by:

[PATCH 5/7] staging: lustre: Less checks in mgc_process_recover_log() after error detection

2015-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 13 Dec 2015 12:21:17 +0100 A few checks would be performed by the mgc_process_recover_log() function even if it is known already that the passed variable "pages" contained a null pointer. * Let us return directly if a call of the

[PATCH 6/7] staging: lustre: A few checks less in mgc_process_recover_log() after error detection

2015-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 13 Dec 2015 13:03:58 +0100 A few checks would be performed by the mgc_process_recover_log() function even if it was determined that a call of the alloc_page() function failed. * This implementation detail could be improved by

[PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls

2015-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 13 Dec 2015 10:33:38 +0100 This issue was detected by using the Coccinelle software. Choose a jump label according to the current Linux coding style convention. I suggest to improve this implementation detail by the reuse of a

[PATCH 1/7] staging: lustre: Delete unnecessary goto statements in six functions

2015-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 13 Dec 2015 09:30:47 +0100 Six goto statements referred to a source code position directly behind them. Thus omit such unnecessary jumps. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH 7/7] staging: lustre: Rename a jump label for module_put() calls

2015-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 13 Dec 2015 14:05:57 +0100 This issue was detected by using the Coccinelle software. Choose a jump label according to the current Linux coding style convention. I suggest to improve this implementation detail by the reuse of a

[PATCH 0/7] staging-Lustre: Fine-tuning for some function implementations

2015-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 13 Dec 2015 14:40:14 +0100 Several update suggestions were taken into account from static source code analysis. Markus Elfring (7): Delete unnecessary goto statements in six functions Rename a jump label for

[PATCH] uinput: Rename a jump label in uinput_ioctl_handler()

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 10:06:00 +0100 This issue was detected by using the Coccinelle software. Choose a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring ---

Re: [PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()

2015-12-12 Thread SF Markus Elfring
>> @@ -200,9 +200,8 @@ free_param: >> int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr) >> { >> struct iscsi_param *param; >> -struct iscsi_param_list *pl; >> +struct iscsi_param_list *pl = kzalloc(sizeof(*pl), GFP_KERNEL); >> >> -pl =

[PATCH 0/7] iSCSI-target: Fine-tuning for three function implementations

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 15:25:20 +0100 Some update suggestions were taken into account from static source code analysis. Markus Elfring (7): Use a variable initialisation in iscsi_set_default_param() directly Less checks in

[PATCH 7/7] iscsi-target: Make two variable initialisations a bit more obvious in iscsi_check_valuelist_for_support()

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 15:04:57 +0100 The variable "acceptor_values" and "proposer_values" were initialized by null pointers and immediately assigned values from input parameters by separate statements. Let us express the desired variable

[PATCH 6/7] iscsi-target: Delete unnecessary variable initialisations in iscsi_check_valuelist_for_support()

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 14:34:26 +0100 The variables "tmp1" and "tmp2" will eventually be set to appropriate pointers from a call of the strchr() function. Thus let us omit the explicit initialisation at the beginning. Signed-off-by: Markus

[PATCH 1/7] iscsi-target: Use a variable initialisation in iscsi_set_default_param() directly

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 11:36:02 +0100 Omit the unnecessary setting to a null pointer for the variable "param" at the beginning of the function "iscsi_set_default_param" because it can be directly initialized with the return value from the

[PATCH 2/7] iscsi-target: Less checks in iscsi_set_default_param() after error detection

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 12:50:10 +0100 This issue was detected by using the Coccinelle software. A sanity check would be performed by the iscsi_set_default_param() function even if it is known already that the passed variable contained a null

[PATCH 3/7] iscsi-target: Delete an unnecessary variable initialisation in iscsi_create_default_params()

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 13:20:08 +0100 The variable "param" will eventually be set to an appropriate pointer from a call of the iscsi_set_default_param() function. Thus let us omit the explicit initialisation at the beginning. Signed-off-by:

[PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 13:44:06 +0100 The variable "pl" was declared and immediately assigned a return value from a function call in a separate statement. * Let us express the desired variable initialisation directly. * Avoid the repetition

[PATCH 5/7] iscsi-target: Rename a jump label in iscsi_create_default_params()

2015-12-12 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 12 Dec 2015 14:12:50 +0100 This issue was detected by using the Coccinelle software. Choose a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring ---

Re: [PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls

2015-12-14 Thread SF Markus Elfring
> Markus, please stop sending these things to rename out labels unless > there is a bug. CodingStyle allows out labels. How does this feedback fit to information like the following? "… Chapter 7: … … Choose label names which say what the goto does or why the goto exists. … Avoid using GW-BASIC

[POWERPC] bootwrapper: One check less in fsl_get_immr() after error detection

2015-12-14 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 14 Dec 2015 23:01:32 +0100 A status check was performed by the fsl_get_immr() function even if it was known already that a system setting did not fit to the expectations. This implementation detail could be improved by an adjustment

Re: [PATCH 1/2] zram: Less checks in zram_bvec_write() after error detection

2015-12-13 Thread SF Markus Elfring
>> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c >> index 47915d7..69d7fcd 100644 >> --- a/drivers/block/zram/zram_drv.c >> +++ b/drivers/block/zram/zram_drv.c >> @@ -652,9 +652,9 @@ static int zram_bvec_write(struct zram *zram, struct >> bio_vec *bvec, u32 index, >>

Re: ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb"

2015-12-11 Thread SF Markus Elfring
> this slipped through, but now it does no longer apply. > > Applying: ieee802154-atusb: Delete an unnecessary check before the function > call "kfree_skb" > error: patch failed: drivers/net/ieee802154/atusb.c:310 > error: drivers/net/ieee802154/atusb.c: patch does not apply > Patch failed at

Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in iscsi_set_default_param() directly

2015-12-12 Thread SF Markus Elfring
>> @@ -127,9 +127,8 @@ static struct iscsi_param >> *iscsi_set_default_param(struct iscsi_param_list *para >> char *name, char *value, u8 phase, u8 scope, u8 sender, >> u16 type_range, u8 use) >> { >> -struct iscsi_param *param = NULL; >> +struct iscsi_param

[PATCH 1/2] zram: Less checks in zram_bvec_write() after error detection

2015-12-11 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 11 Dec 2015 18:20:59 +0100 This issue was detected by using the Coccinelle software. A few checks could be repeated by the zram_bvec_write() function at two places even if the passed variables contained a null pointer. * This

[PATCH 2/2] z2ram: Delete a jump label in z2_init()

2015-12-11 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 11 Dec 2015 18:48:14 +0100 This issue was detected by using the Coccinelle software. * Let us return directly if a call of the function "register_blkdev" failed. * Remove the jump label "err" then. Signed-off-by: Markus Elfring

[PATCH 0/2] block: Fine-tuning for two function implementations

2015-12-11 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 11 Dec 2015 19:12:34 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): zram: Less checks in zram_bvec_write() after error detection z2ram: Delete a jump label in

Re: staging: lustre: Less checks in mgc_process_recover_log() after error detection

2015-12-15 Thread SF Markus Elfring
> If you were a lustre dev then I would accept these renames definitely. I find this information interesting. Would any more contributors like to share their opinion? > I do not think I have been unfair to you. This view is correct in principle. > There was no element of surprise. I am

Re: staging-slicoss: Replace variable initialisations by assignments in slic_if_init()

2016-01-03 Thread SF Markus Elfring
>> Which measurement results would you accept for further discussion? > > If you don't know how to show your results, then this whole discussion > is pointless. I could show test results. But it could happen that I would choose insufficient variations for execution environments. I am unsure

Re: [PATCH 1/3] rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt()

2016-01-04 Thread SF Markus Elfring
> These patches are labour intensive to review because you can't just do > it in the email client. Thanks for your general interest. > Also you were not able to review it properly yourself and introduced > a bug. I admit that it can happen during my software development that I overlook

Re: 390/qeth: Refactoring for qeth_core_set_online()

2016-01-04 Thread SF Markus Elfring
> In this case the function body is very small > so I don't see any benefit at all. Do you care for fine-tuning of variable placement occasionally? Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

Re: rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt()

2016-01-04 Thread SF Markus Elfring
>> May I resend a consistent patch series for the source file >> "drivers/net/wireless/rsi/rsi_91x_pkt.c" in the near future? > > If you were sending checkpatch.pl fixes that would be easier to deal with Does this feedback mean that you would accept any more suggestions around source code

Re: [PATCH 2/2] 390/qeth: Refactoring for qeth_core_set_online()

2016-01-04 Thread SF Markus Elfring
>> +++ b/drivers/s390/net/qeth_core_main.c >> @@ -5638,9 +5638,10 @@ static int qeth_core_set_online(struct >> ccwgroup_device *gdev) >> { >> struct qeth_card *card = dev_get_drvdata(>dev); >> int rc; >> -int def_discipline; >> >> if (!card->discipline) { >> +int

Re: rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt()

2016-01-05 Thread SF Markus Elfring
> That said, if you figure out some change that produces significant > reductions in code or binary size on multiple architectures without > making things more complicated, less readable or making the code or > binary size larger, then by all means propose it. Are you looking also for "a proof"

[PATCH 0/3] net-rsi: Fine-tuning for two function implementations

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 15:36:25 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete unnecessary variable initialisations in rsi_send_mgmt_pkt() Delete unnecessary variable

Re: [PATCH] net-libertas: Better exception handling in if_spi_host_to_card_worker()

2016-01-02 Thread SF Markus Elfring
>> Move the jump label directly before the desired log statement >> so that the variable "err" will not be checked once more >> after it was determined that a function call failed. >> Use the identifier "report_failure" instead of the label "err". > >Why? I suggest to reconsider the places

Re: net-libertas: Better exception handling in if_spi_host_to_card_worker()

2016-01-02 Thread SF Markus Elfring
> I have never seen much evolution going on in this area. I can get an other impression from a specific document for example. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/log/Documentation/CodingStyle > What the patch tries to do is avoid the extra 'if (err)'. Yes. - I

[PATCH 3/3] rsi: Replace variable initialisations by assignments in rsi_send_data_pkt()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 15:25:34 +0100 Replace explicit initialisation for two local variables at the beginning by assignments. Signed-off-by: Markus Elfring --- drivers/net/wireless/rsi/rsi_91x_pkt.c | 10

Re: net-libertas: Better exception handling in if_spi_host_to_card_worker()

2016-01-02 Thread SF Markus Elfring
>> I assume that a software development taste can evolve, can't it? > > So far, you have gotten several down votes for this kind of change, I am curious when more contributors will share corresponding opinions. > and no enthusiasm. How many software designers and developers can become

[PATCH 1/3] rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 14:54:30 +0100 Omit explicit initialisation at the beginning for five local variables which are redefined before their first use. Signed-off-by: Markus Elfring ---

[PATCH 2/3] rsi: Delete unnecessary variable initialisations in rsi_send_data_pkt()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 15:15:12 +0100 Omit explicit initialisation at the beginning for four local variables which are redefined before their first use. Signed-off-by: Markus Elfring ---

[PATCH] mfd: twl-core: One function call less in add_numbered_child() after error detection

2015-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 29 Dec 2015 19:29:08 +0100 The platform_device_put() function was called in one case by the add_numbered_child() function during error handling even if the passed variable "pdev" contained a null pointer. Implementation details

[PATCH 0/3] net-iwlegacy: Fine-tuning for il_eeprom_init()

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 21:25:43 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Refactoring One check less after error detection Another refactoring

[PATCH 1/3] net-iwlegacy: Refactoring for il_eeprom_init()

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 20:54:25 +0100 Return directly if a memory allocation failed at the beginning. Signed-off-by: Markus Elfring --- drivers/net/wireless/intel/iwlegacy/common.c | 8 +++- 1 file changed,

[PATCH 2/3] net-iwlegacy: One check less in il_eeprom_init() after error detection

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 21:12:29 +0100 This issue was detected by using the Coccinelle software. Adjust a jump target to avoid a check repetition before the function call "il_eeprom_free". Signed-off-by: Markus Elfring

[PATCH 3/3] net-iwlegacy: Another refactoring for il_eeprom_init()

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 21:16:01 +0100 Rename a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/net/wireless/intel/iwlegacy/common.c | 4 ++-- 1 file

[PATCH] net-libertas: Better exception handling in if_spi_host_to_card_worker()

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 22:27:20 +0100 This issue was detected by using the Coccinelle software. Move the jump label directly before the desired log statement so that the variable "err" will not be checked once more after it was determined that

[PATCH 1/5] xen-netback: Delete an unnecessary assignment in connect_rings()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 17:32:40 +0100 Remove the assignment for a local variable because its value is not changed compared to the one from a previous function call. Signed-off-by: Markus Elfring ---

[PATCH 2/5] xen-netback: Delete an unnecessary goto statement in connect_rings()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 17:50:21 +0100 One goto statement referred to a source code position directly behind it. Thus omit such an unnecessary jump. Signed-off-by: Markus Elfring ---

net-rsi: Reconsider usage of variable "vap_id" in rsi_send_mgmt_pkt()

2016-01-02 Thread SF Markus Elfring
Hello, I have taken another look at the implementation of the function "rsi_send_mgmt_pkt". https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/net/wireless/rsi/rsi_91x_pkt.c?id=e8c58e7a5a106c3d557fccd01cd4d1128f9bab38#n114 I find the following statement combination

[PATCH 3/5] xen-netback: Replace a variable initialisation by an assignment in read_xenbus_vif_flags()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 18:01:57 +0100 Replace an explicit initialisation for one local variable at the beginning by an assignment. Signed-off-by: Markus Elfring --- drivers/net/xen-netback/xenbus.c | 7 ---

[PATCH 4/5] xen-netback: Replace a variable initialisation by an assignment in xen_register_watchers()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 18:23:16 +0100 Replace an explicit initialisation for one local variable at the beginning by an assignment. Signed-off-by: Markus Elfring --- drivers/net/xen-netback/xenbus.c | 3 ++- 1

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

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 18:46:45 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): Delete an unnecessary assignment in connect_rings() Delete an unnecessary goto statement in

[PATCH v2 1/3] rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 19:22:36 +0100 Omit explicit initialisation at the beginning for four local variables which are redefined before their first use. Signed-off-by: Markus Elfring ---

[PATCH 5/5] xen-netback: Delete an unnecessary variable initialisation in xen_register_watchers()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 18:28:26 +0100 Omit explicit initialisation at the beginning for one local variable that is redefined before its first use. Signed-off-by: Markus Elfring ---

[PATCH 0/3] NFC-mei_phy: Fine-tuning for two function implementations

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 21:47:30 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Refactoring for mei_nfc_connect() Refactoring for mei_nfc_if_version() Delete an unnecessary

[PATCH 3/3] NFC-mei_phy: Delete an unnecessary variable initialisation in mei_nfc_if_version()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 21:40:10 +0100 Omit explicit initialisation at the beginning for one local variable that is redefined before its first use. Signed-off-by: Markus Elfring --- drivers/nfc/mei_phy.c | 2 +-

[PATCH 2/3] NFC-mei_phy: Refactoring for mei_nfc_if_version()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 21:33:04 +0100 Rename a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/nfc/mei_phy.c | 5 ++--- 1 file changed, 2

[PATCH 1/3] NFC-mei_phy: Refactoring for mei_nfc_connect()

2016-01-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Jan 2016 21:21:24 +0100 This issue was detected by using the Coccinelle software. Adjust jump targets according to the current Linux coding style convention. Signed-off-by: Markus Elfring ---

[PATCH 0/8] rtc-ab-b5ze-s3: Fine-tuning for some function implementations

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 09:37:34 +0100 Several update suggestions were taken into account from static source code analysis. Markus Elfring (8): Better exception handling in abb5zes3_probe() Delete an unnecessary variable in

[PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in _abb5zes3_rtc_interrupt()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 09:00:30 +0100 Pass the address of the data structure element "time" directly in calls of the function "rtc_update_irq" instead of an extra initialisation for one local variable at the beginning. Signed-off-by: Markus

[PATCH 6/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in _abb5zes3_rtc_read_timer()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 08:46:50 +0100 Pass the address of the data structure element "time" directly in a call of the function "rtc_time_to_tm" instead of an extra initialisation for one local variable at the beginning. Signed-off-by: Markus

[PATCH 8/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in _abb5zes3_rtc_set_timer()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 09:19:32 +0100 Pass a value directly in a call of the function "regmap_update_bits" instead of an extra initialisation for one local variable at the beginning. Signed-off-by: Markus Elfring

[PATCH 2/2] 390/qeth: Refactoring for qeth_core_set_online()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 10:50:11 +0100 Reduce the scope for the local variable "def_discipline" to one branch of an if statement. Signed-off-by: Markus Elfring --- drivers/s390/net/qeth_core_main.c | 3 ++- 1

[PATCH 4/8] rtc-ab-b5ze-s3: Replace a variable initialisation by an assignment in _abb5zes3_rtc_set_alarm()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 07:51:49 +0100 Replace an explicit initialisation for one local variable at the beginning by an assignment. Signed-off-by: Markus Elfring --- drivers/rtc/rtc-ab-b5ze-s3.c | 3 ++- 1 file

[PATCH 3/8] rtc-ab-b5ze-s3: Delete an unnecessary variable initialisation in _abb5zes3_rtc_set_timer()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 07:42:18 +0100 Omit explicit initialisation at the beginning for one local variable that is redefined before its first use. Signed-off-by: Markus Elfring --- drivers/rtc/rtc-ab-b5ze-s3.c |

[PATCH 5/8] rtc-ab-b5ze-s3: Replace a variable initialisation by an assignment in _abb5zes3_rtc_read_alarm()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 08:00:29 +0100 Replace an explicit initialisation for one local variable at the beginning by an assignment. Signed-off-by: Markus Elfring --- drivers/rtc/rtc-ab-b5ze-s3.c | 3 ++- 1 file

[PATCH 1/8] rtc-ab-b5ze-s3: Better exception handling in abb5zes3_probe()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 07:07:49 +0100 This issue was detected by using the Coccinelle software. * Return directly before the data structure element "irq" was assigned. * Drop the explicit initialisation for the variable "data" at the

[PATCH 2/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in abb5zes3_rtc_set_alarm()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 07:35:09 +0100 Pass the address of the data structure element "time" directly in a call of the function "rtc_tm_to_time" instead of an extra initialisation for one local variable at the beginning. Signed-off-by: Markus

[PATCH 0/2] 390/qeth: Fine-tuning for qeth_core_set_online()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 10:56:45 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an unnecessary variable initialisation Refactoring drivers/s390/net/qeth_core_main.c | 5

[PATCH 1/2] 390/qeth: Delete an unnecessary variable initialisation in qeth_core_set_online()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 10:48:05 +0100 Omit explicit initialisation at the beginning for one local variable that is redefined before its first use. Signed-off-by: Markus Elfring ---

Re: [PATCH 1/3] NFC-mei_phy: Refactoring for mei_nfc_connect()

2016-01-02 Thread SF Markus Elfring
>> r = 0; >> - >> -err: >> +free_reply: >> kfree(reply); >> +free_cmd: >> kfree(cmd); >> - > > Why are you deleting the two blank lines here? Can they be unnecessary at this source code place according to the Linux coding style convention? Regards, Markus -- To

[PATCH] staging-slicoss: Replace variable initialisations by assignments in slic_if_init()

2016-01-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Jan 2016 17:25:59 +0100 Replace explicit initialisation for two local variables at the beginning by assignments. Signed-off-by: Markus Elfring --- drivers/staging/slicoss/slicoss.c | 6 -- 1

Re: net-libertas: Better exception handling in if_spi_host_to_card_worker()

2016-01-03 Thread SF Markus Elfring
>>> What the patch tries to do is avoid the extra 'if (err)'. >> >> Yes. - I propose to look at related consequences together with the usage >> of a popular short jump label once more. > > When I read a subject saying "Better exception handling" it sounds like > a functional improvement. Your

Re: rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt()

2016-01-05 Thread SF Markus Elfring
> Every time you send a set of patches, I suggested some updates for Linux source files since October 2014. > there are legitimate issues which people raise, There was usual feedback. > and every time they are discussed, The discussion results were mixed between acceptance and usual

[PATCH 1/2] mmc-sdricoh_cs: Delete unnecessary variable initialisations in sdricoh_init_mmc()

2015-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 29 Dec 2015 21:11:45 +0100 These variables will eventually be set to an appropriate value a bit later. * host * iobase * result Thus let us omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring

[PATCH] mmc-core: One check less in mmc_select_hs200() after error detection

2015-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 29 Dec 2015 20:28:46 +0100 This issue was detected by using the Coccinelle software. Move the jump label directly before the desired log statement so that the variable "err" will not be checked once more after it was determined that

[PATCH 0/2] mmc-host: Fine-tuning for one function

2015-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 29 Dec 2015 21:54:14 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete unnecessary variable initialisations in sdricoh_init_mmc() Less checks in

[PATCH 2/2] mmc-sdricoh_cs: Less checks in sdricoh_init_mmc() after, error detection

2015-12-29 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 29 Dec 2015 21:45:34 +0100 This issue was detected by using the Coccinelle software. Two pointer checks could be repeated by the sdricoh_init_mmc() function during error handling even if the relevant properties can be determined for

[PATCH 0/3] mtd-rfd_ftl: Fine-tuning for two function implementations

2015-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 31 Dec 2015 21:15:15 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Replace a variable initialisation by assignments Refactoring for move_block_contents()

[PATCH] be2net: Delete an unnecessary check in two functions

2015-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 00:11:57 +0100 Remove two checks for null pointers which would be handled by usual error detection before. Signed-off-by: Markus Elfring --- drivers/net/ethernet/emulex/benet/be_cmds.c | 9

[PATCH 2/3] mtd-rfd_ftl: Refactoring for move_block_contents()

2015-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 31 Dec 2015 20:54:50 +0100 This issue was detected by using the Coccinelle software. Rename jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring ---

[PATCH] net-thunder: One check less in nicvf_register_interrupts() after error detection

2015-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 31 Dec 2015 22:40:39 +0100 Adjust a jump target to eliminate a check before error logging. Use the identifier "report_failure" instead of "err". Signed-off-by: Markus Elfring ---

<    3   4   5   6   7   8   9   10   11   12   >