Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-26 Thread Dan Carpenter
These patches are often correct in the same way a stopped clock is correct twice a day, but I reject the motivation/approach/patch description. Just because there is a sanity check does not mean we should use it (ie, do an insane thing). It hurts readability to hide the NULL check. On the other

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-26 Thread SF Markus Elfring
>> Do you try this update suggestion out without integrating the corresponding >> previous >> update suggestion "Delete unnecessary checks before two function calls" >> where I proposed to remove extra checks before a few calls of the function >> "kobject_put" >> (which seems to matter for the

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-26 Thread Greg Kroah-Hartman
On Thu, Nov 26, 2015 at 08:08:28AM +0100, SF Markus Elfring wrote: > Am 25.11.2015 um 17:39 schrieb Greg Kroah-Hartman: > > On Thu, Nov 05, 2015 at 01:20:33PM +0100, SF Markus Elfring wrote: > >> From: Markus Elfring > >> Date: Thu, 5 Nov 2015 12:48:58 +0100 > >> > >> The functions "kfree" and

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-26 Thread Dan Carpenter
These patches are often correct in the same way a stopped clock is correct twice a day, but I reject the motivation/approach/patch description. Just because there is a sanity check does not mean we should use it (ie, do an insane thing). It hurts readability to hide the NULL check. On the other

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-26 Thread Greg Kroah-Hartman
On Thu, Nov 26, 2015 at 08:08:28AM +0100, SF Markus Elfring wrote: > Am 25.11.2015 um 17:39 schrieb Greg Kroah-Hartman: > > On Thu, Nov 05, 2015 at 01:20:33PM +0100, SF Markus Elfring wrote: > >> From: Markus Elfring > >> Date: Thu, 5 Nov 2015 12:48:58 +0100 > >> >

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-26 Thread SF Markus Elfring
>> Do you try this update suggestion out without integrating the corresponding >> previous >> update suggestion "Delete unnecessary checks before two function calls" >> where I proposed to remove extra checks before a few calls of the function >> "kobject_put" >> (which seems to matter for the

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-25 Thread SF Markus Elfring
Am 25.11.2015 um 17:39 schrieb Greg Kroah-Hartman: > On Thu, Nov 05, 2015 at 01:20:33PM +0100, SF Markus Elfring wrote: >> From: Markus Elfring >> Date: Thu, 5 Nov 2015 12:48:58 +0100 >> >> The functions "kfree" and "kobject_put" were called in a few cases by the >> function "class_register_type"

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-25 Thread Greg Kroah-Hartman
On Thu, Nov 05, 2015 at 01:20:33PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 5 Nov 2015 12:48:58 +0100 > > The functions "kfree" and "kobject_put" were called in a few cases by the > function "class_register_type" during error handling even if the passed > variable

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-25 Thread Greg Kroah-Hartman
On Thu, Nov 05, 2015 at 01:20:33PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 5 Nov 2015 12:48:58 +0100 > > The functions "kfree" and "kobject_put" were called in a few cases by the > function "class_register_type" during error handling

Re: [PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-25 Thread SF Markus Elfring
Am 25.11.2015 um 17:39 schrieb Greg Kroah-Hartman: > On Thu, Nov 05, 2015 at 01:20:33PM +0100, SF Markus Elfring wrote: >> From: Markus Elfring >> Date: Thu, 5 Nov 2015 12:48:58 +0100 >> >> The functions "kfree" and "kobject_put" were called in a few cases by the >>

[PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Nov 2015 12:48:58 +0100 The functions "kfree" and "kobject_put" were called in a few cases by the function "class_register_type" during error handling even if the passed variable contained a null pointer. This implementation detail could be improved by the

[PATCH 3/3] staging: lustre: Less function calls in class_register_type() after error detection

2015-11-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Nov 2015 12:48:58 +0100 The functions "kfree" and "kobject_put" were called in a few cases by the function "class_register_type" during error handling even if the passed variable contained a null pointer. This implementation