Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-12 Thread Jes Sorensen
Dan Carpenter writes: > Compare: > > foo = kmalloc(sizeof(*foo), GFP_KERNEL); > > This says you are allocating enough space for foo. It can be reviewed > by looking at one line. If you change the type of foo it will still > work. > > foo =

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-12 Thread Jes Sorensen
Dan Carpenter writes: > Compare: > > foo = kmalloc(sizeof(*foo), GFP_KERNEL); > > This says you are allocating enough space for foo. It can be reviewed > by looking at one line. If you change the type of foo it will still > work. > > foo = kmalloc(sizeof(struct whatever),

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-12 Thread Dan Carpenter
Compare: foo = kmalloc(sizeof(*foo), GFP_KERNEL); This says you are allocating enough space for foo. It can be reviewed by looking at one line. If you change the type of foo it will still work. foo = kmalloc(sizeof(struct whatever), GFP_KERNEL); There isn't enough information

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-12 Thread Dan Carpenter
Compare: foo = kmalloc(sizeof(*foo), GFP_KERNEL); This says you are allocating enough space for foo. It can be reviewed by looking at one line. If you change the type of foo it will still work. foo = kmalloc(sizeof(struct whatever), GFP_KERNEL); There isn't enough information

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-11 Thread Dan Carpenter
Oops. I sent this email twice. Sorry, about that. regards, dan carpenter

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-11 Thread Dan Carpenter
Oops. I sent this email twice. Sorry, about that. regards, dan carpenter

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread SF Markus Elfring
>> Can it "accidentally" happen that some of them will be really worth >> also for your precious software development attention? > > Given that none of your patches fix any real bugs Are there any ones which would eventually become "real" also for you? > and you do your best to ignore any

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread SF Markus Elfring
>> Can it "accidentally" happen that some of them will be really worth >> also for your precious software development attention? > > Given that none of your patches fix any real bugs Are there any ones which would eventually become "real" also for you? > and you do your best to ignore any

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Jes Sorensen
SF Markus Elfring writes: >>> How do you value compliance with coding styles? >> >> The Linux Coding Style is not a law, > > How serious can such guidelines become for software developers? > >> nor is it at all perfect. > > I got a similar impression. But are there

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Jes Sorensen
SF Markus Elfring writes: >>> How do you value compliance with coding styles? >> >> The Linux Coding Style is not a law, > > How serious can such guidelines become for software developers? > >> nor is it at all perfect. > > I got a similar impression. But are there enough items where a mostly

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Bjørn Mork
Dan Carpenter writes: > I am ignoring Markus patches and have told him that he should focus on > bug fixes. These patches don't add any value and regularly introduce > bugs. I think there should be a big fat warning in CodingStyle: THIS DOCUMENT DOES NOT APPLY TO

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Bjørn Mork
Dan Carpenter writes: > I am ignoring Markus patches and have told him that he should focus on > bug fixes. These patches don't add any value and regularly introduce > bugs. I think there should be a big fat warning in CodingStyle: THIS DOCUMENT DOES NOT APPLY TO ANY EXISTING KERNEL CODE.

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread SF Markus Elfring
>> How do you value compliance with coding styles? > > The Linux Coding Style is not a law, How serious can such guidelines become for software developers? > nor is it at all perfect. I got a similar impression. But are there enough items where a mostly clear guidance is specified? > You

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread SF Markus Elfring
>> How do you value compliance with coding styles? > > The Linux Coding Style is not a law, How serious can such guidelines become for software developers? > nor is it at all perfect. I got a similar impression. But are there enough items where a mostly clear guidance is specified? > You

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Jes Sorensen
SF Markus Elfring writes: but patches that just fix coding style are a bad thing >>> >>> When you find such a change opportunity so "bad", are there any >>> circumstances left over where you would dare to touch the corresponding >>> source code line. >> >>

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Jes Sorensen
SF Markus Elfring writes: but patches that just fix coding style are a bad thing >>> >>> When you find such a change opportunity so "bad", are there any >>> circumstances left over where you would dare to touch the corresponding >>> source code line. >> >> If you actually rewrite the code

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Jes Sorensen
Dan Carpenter writes: > On Thu, Oct 06, 2016 at 11:29:20AM +0200, Richard Weinberger wrote: >> On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring >> wrote: >> > From: Markus Elfring >> > Date: Tue, 4 Oct

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Jes Sorensen
Dan Carpenter writes: > On Thu, Oct 06, 2016 at 11:29:20AM +0200, Richard Weinberger wrote: >> On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring >> wrote: >> > From: Markus Elfring >> > Date: Tue, 4 Oct 2016 21:46:18 +0200 >> > >> > Replace the specification of a data structure by a pointer

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Jes Sorensen
SF Markus Elfring writes: Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. >>> >>> Isn't this pure matter of taste? >>> Some

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Jes Sorensen
SF Markus Elfring writes: Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. >>> >>> Isn't this pure matter of taste? >>> Some developers prefer sizeof(*ptr)

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread SF Markus Elfring
> I am ignoring Markus patches It's a pity that you chose such a reaction. > and have told him that he should focus on bug fixes. I find that I suggest to improve something. Could you admit a few times that I found a "bug" you care also about at other source code places? > These patches

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread SF Markus Elfring
> I am ignoring Markus patches It's a pity that you chose such a reaction. > and have told him that he should focus on bug fixes. I find that I suggest to improve something. Could you admit a few times that I found a "bug" you care also about at other source code places? > These patches

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Dan Carpenter
On Thu, Oct 06, 2016 at 11:29:20AM +0200, Richard Weinberger wrote: > On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring > wrote: > > From: Markus Elfring > > Date: Tue, 4 Oct 2016 21:46:18 +0200 > > > > Replace the specification of a

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-10 Thread Dan Carpenter
On Thu, Oct 06, 2016 at 11:29:20AM +0200, Richard Weinberger wrote: > On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring > wrote: > > From: Markus Elfring > > Date: Tue, 4 Oct 2016 21:46:18 +0200 > > > > Replace the specification of a data structure by a pointer dereference > > as the parameter

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread SF Markus Elfring
>>> but patches that just fix coding style are a bad thing >> >> When you find such a change opportunity so "bad", are there any >> circumstances left over where you would dare to touch the corresponding >> source code line. > > If you actually rewrite the code or fix some real bug there. Do

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread SF Markus Elfring
>>> but patches that just fix coding style are a bad thing >> >> When you find such a change opportunity so "bad", are there any >> circumstances left over where you would dare to touch the corresponding >> source code line. > > If you actually rewrite the code or fix some real bug there. Do

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Jiri Kosina
On Fri, 7 Oct 2016, SF Markus Elfring wrote: > > but patches that just fix coding style are a bad thing > > When you find such a change opportunity so "bad", are there any > circumstances left over where you would dare to touch the corresponding > source code line. If you actually rewrite the

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Jiri Kosina
On Fri, 7 Oct 2016, SF Markus Elfring wrote: > > but patches that just fix coding style are a bad thing > > When you find such a change opportunity so "bad", are there any > circumstances left over where you would dare to touch the corresponding > source code line. If you actually rewrite the

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread SF Markus Elfring
>> Why do various software developers bother about coding style specifications >> at all then? > Coding style is important, Thanks that you "dare" to express also such an opinion. > but patches that just fix coding style are a bad thing When you find such a change opportunity so "bad", are

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread SF Markus Elfring
>> Why do various software developers bother about coding style specifications >> at all then? > Coding style is important, Thanks that you "dare" to express also such an opinion. > but patches that just fix coding style are a bad thing When you find such a change opportunity so "bad", are

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Austin S. Hemmelgarn
On 2016-10-07 06:50, SF Markus Elfring wrote: Linux has tons of issues, fixes for real problems are very welcome. Is a spectrum of software improvements to reconsider there? But coding style bike shedding is just a waste of time. Why do various software developers bother about coding

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Austin S. Hemmelgarn
On 2016-10-07 06:50, SF Markus Elfring wrote: Linux has tons of issues, fixes for real problems are very welcome. Is a spectrum of software improvements to reconsider there? But coding style bike shedding is just a waste of time. Why do various software developers bother about coding

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread SF Markus Elfring
> Linux has tons of issues, fixes for real problems are very welcome. Is a spectrum of software improvements to reconsider there? > But coding style bike shedding is just a waste of time. Why do various software developers bother about coding style specifications at all then? Regards, Markus

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread SF Markus Elfring
> Linux has tons of issues, fixes for real problems are very welcome. Is a spectrum of software improvements to reconsider there? > But coding style bike shedding is just a waste of time. Why do various software developers bother about coding style specifications at all then? Regards, Markus

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Richard Weinberger
On 07.10.2016 10:53, SF Markus Elfring wrote: Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. >>> >>> Isn't this pure matter of taste? >>> Some developers

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Richard Weinberger
On 07.10.2016 10:53, SF Markus Elfring wrote: Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. >>> >>> Isn't this pure matter of taste? >>> Some developers

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread SF Markus Elfring
>>> Replace the specification of a data structure by a pointer dereference >>> as the parameter for the operator "sizeof" to make the corresponding size >>> determination a bit safer. >> >> Isn't this pure matter of taste? >> Some developers prefer sizeof(*ptr) because it is easier to type, other

Re: md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread SF Markus Elfring
>>> Replace the specification of a data structure by a pointer dereference >>> as the parameter for the operator "sizeof" to make the corresponding size >>> determination a bit safer. >> >> Isn't this pure matter of taste? >> Some developers prefer sizeof(*ptr) because it is easier to type, other

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Richard Weinberger
On 07.10.2016 09:53, Dan Carpenter wrote: > On Thu, Oct 06, 2016 at 11:29:20AM +0200, Richard Weinberger wrote: >> On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring >> wrote: >>> From: Markus Elfring >>> Date: Tue, 4 Oct 2016

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Richard Weinberger
On 07.10.2016 09:53, Dan Carpenter wrote: > On Thu, Oct 06, 2016 at 11:29:20AM +0200, Richard Weinberger wrote: >> On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring >> wrote: >>> From: Markus Elfring >>> Date: Tue, 4 Oct 2016 21:46:18 +0200 >>> >>> Replace the specification of a data structure

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Dan Carpenter
On Thu, Oct 06, 2016 at 11:29:20AM +0200, Richard Weinberger wrote: > On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring > wrote: > > From: Markus Elfring > > Date: Tue, 4 Oct 2016 21:46:18 +0200 > > > > Replace the specification of a

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-07 Thread Dan Carpenter
On Thu, Oct 06, 2016 at 11:29:20AM +0200, Richard Weinberger wrote: > On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring > wrote: > > From: Markus Elfring > > Date: Tue, 4 Oct 2016 21:46:18 +0200 > > > > Replace the specification of a data structure by a pointer dereference > > as the parameter

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-06 Thread Richard Weinberger
On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 4 Oct 2016 21:46:18 +0200 > > Replace the specification of a data structure by a pointer dereference > as the parameter for the operator

Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-06 Thread Richard Weinberger
On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 4 Oct 2016 21:46:18 +0200 > > Replace the specification of a data structure by a pointer dereference > as the parameter for the operator "sizeof" to make the corresponding size > determination a bit

[PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-06 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 4 Oct 2016 21:46:18 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. Signed-off-by: Markus Elfring

[PATCH 24/54] md/raid1: Improve another size determination in setup_conf()

2016-10-06 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 4 Oct 2016 21:46:18 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. Signed-off-by: Markus Elfring --- drivers/md/raid1.c | 2 +- 1