Re: char/tpm: Improve a size determination in nine functions

2017-10-17 Thread SF Markus Elfring
>> p = kmalloc(sizeof(*p), ...); >> >> The alternative form where struct name is spelled out hurts readability and >> introduces an opportunity for a bug when the pointer variable type is changed >> but the corresponding sizeof that is passed to a memory allocator is not. > > True, thanks for

Re: char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Mimi Zohar
On Tue, 2017-10-17 at 20:41 +0200, SF Markus Elfring wrote: > Do you find my wording “This issue was detected by using the > Coccinelle software.” insufficient? The question is not whether it is insufficient, but whether it is appropriate.  Detecting Coccinelle issues is one step.  The next step

Re: char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Andy Shevchenko
On Tue, 2017-10-17 at 20:41 +0200, SF Markus Elfring wrote: > > > p = kmalloc(sizeof(*p), ...); > > > > > > The alternative form where struct name is spelled out hurts > > > readability and > > > introduces an opportunity for a bug when the pointer variable type > > > is changed > > > but the co

Re: char/tpm: Improve a size determination in nine functions

2017-10-17 Thread SF Markus Elfring
>> Do you find my wording “This issue was detected by using the >> Coccinelle software.” insufficient? > > The question is not whether it is insufficient, but whether it is appropriate. I am curious on how our corresponding discussion will evolve further. > Detecting Coccinelle issues is one st

Re: char/tpm: Improve a size determination in nine functions

2017-10-17 Thread SF Markus Elfring
>> I imagine that a corresponding source code analysis variant could be applied >> in more cases if sufficient acceptance could be achieved. > > So, then instead of still keeping people busy with this noise you better > start doing something like CI integration with that for *new* code? There are

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 08:41:04PM +0200, SF Markus Elfring wrote: > Do you find my wording “This issue was detected by using the > Coccinelle software.” insufficient? This is fine for cover letter, not for the commits. After your analysis software finds an issue you should manually analyze what

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread SF Markus Elfring
>> Do you find my wording “This issue was detected by using the >> Coccinelle software.” insufficient? > > This is fine for cover letter, not for the commits. I guess that there are more opinions available by other contributors for this aspect. > After your analysis software finds an issue you

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Wed, Oct 18, 2017 at 05:22:19PM +0200, SF Markus Elfring wrote: > >> Do you find my wording “This issue was detected by using the > >> Coccinelle software.” insufficient? > > > > This is fine for cover letter, not for the commits. > > I guess that there are more opinions available by other con

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread SF Markus Elfring
> Commit message should just describe in plain text what you are doing Did other contributors find the wording “Replace …” > and why. and “… a bit safer according to the Linux coding style convention.” sufficient often enough already? Which description would you find more appropriate for this

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Wed, Oct 18, 2017 at 06:43:10PM +0200, SF Markus Elfring wrote: > > Commit message should just describe in plain text what you are doing > > Did other contributors find the wording “Replace …” > > > > and why. > > and “… a bit safer according to the Linux coding style convention.” > sufficie

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Wed, Oct 18, 2017 at 08:18:58PM +0300, Jarkko Sakkinen wrote: > On Wed, Oct 18, 2017 at 06:43:10PM +0200, SF Markus Elfring wrote: > > > Commit message should just describe in plain text what you are doing > > > > Did other contributors find the wording “Replace …” > > > > > > > and why. > >

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread SF Markus Elfring
> For 1/4 and 2/4: explain why the message can be omitted. Why did you not reply directly with this request for the update steps with the subject “Delete an error message for a failed memory allocation in tpm_…()”? https://patchwork.kernel.org/patch/10009405/ https://patchwork.kernel.org/patch/10

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread SF Markus Elfring
> One more word of advice: send the three as separate patches. I do not see a need for an immediate resend at the moment. > My guess is that it takes a factor longer time to apply 4/4 > than other patches because there's more limited crowd who can test it. This is fine for me if somebody would

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Andy Shevchenko
On Wed, 2017-10-18 at 19:48 +0200, SF Markus Elfring wrote: > > For 1/4 and 2/4: explain why the message can be omitted. > > That's all. > > I assume that there might be also some communication challenges > involved. > > > > 3/4: definitive NAK, too much noise compared to value. > > I tried to

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jerry Snitselaar
On Wed Oct 18 17, SF Markus Elfring wrote: For 1/4 and 2/4: explain why the message can be omitted. Why did you not reply directly with this request for the update steps with the subject “Delete an error message for a failed memory allocation in tpm_…()”? https://patchwork.kernel.org/patch/100

Re: char/tpm: Improve a size determination in nine functions

2017-10-19 Thread Michal Suchánek
On Wed, 18 Oct 2017 21:03:13 +0300 Andy Shevchenko wrote: > On Wed, 2017-10-18 at 19:48 +0200, SF Markus Elfring wrote: > > > For 1/4 and 2/4: explain why the message can be omitted. > > > > That's all. > > > > I assume that there might be also some communication challenges > > involved. >

Re: char/tpm: Improve a size determination in nine functions

2017-10-19 Thread Jarkko Sakkinen
On Wed, Oct 18, 2017 at 07:48:06PM +0200, SF Markus Elfring wrote: > > For 1/4 and 2/4: explain why the message can be omitted. > > Why did you not reply directly with this request for the update steps > with the subject “Delete an error message for a failed memory allocation > in tpm_…()”? > > h

[PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Oct 2017 18:28:17 +0200 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 issue was detec

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Andy Shevchenko
On Mon, 2017-10-16 at 19:33 +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 16 Oct 2017 18:28:17 +0200 > > Replace the specification of data structures by pointer dereferences > as the parameter for the operator "sizeof" to make the corresponding > size > determination a bit s

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Mimi Zohar
On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com wrote: > > > 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 sty

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Julia Lawall
On Tue, 17 Oct 2017, Mimi Zohar wrote: > On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > wrote: > > > > Replace the specification of data structures by pointer dereferences > > > > as the parameter for the operator "sizeof" to make the corresponding > > > > size > > > > deter

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Andy Shevchenko
On Tue, 2017-10-17 at 08:52 -0400, Mimi Zohar wrote: > On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > wrote: > > > > Replace the specification of data structures by pointer > > > > dereferences > > > > as the parameter for the operator "sizeof" to make the > > > > corresponding

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Mimi Zohar
On Tue, 2017-10-17 at 14:58 +0200, Julia Lawall wrote: > > On Tue, 17 Oct 2017, Mimi Zohar wrote: > > > On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > > wrote: > > > > > Replace the specification of data structures by pointer dereferences > > > > > as the parameter for the op

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Julia Lawall
On Tue, 17 Oct 2017, Mimi Zohar wrote: > On Tue, 2017-10-17 at 14:58 +0200, Julia Lawall wrote: > > > > On Tue, 17 Oct 2017, Mimi Zohar wrote: > > > > > On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > > > wrote: > > > > > > Replace the specification of data structures by poin

RE: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Alexander.Steffen
> > 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 patch does one style in favor of the other. I ac

RE: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Alexander.Steffen
> On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > wrote: > > > > 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 Linu

RE: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Alexander.Steffen
> On Tue, 17 Oct 2017, Mimi Zohar wrote: > > > On Tue, 2017-10-17 at 14:58 +0200, Julia Lawall wrote: > > > > > > On Tue, 17 Oct 2017, Mimi Zohar wrote: > > > > > > > On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > > > > wrote: > > > > > > > Replace the specification of data st

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 02:03:02PM +0300, Andy Shevchenko wrote: > On Mon, 2017-10-16 at 19:33 +0200, SF Markus Elfring wrote: > > From: Markus Elfring > > Date: Mon, 16 Oct 2017 18:28:17 +0200 > > > > Replace the specification of data structures by pointer dereferences > > as the parameter for t

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 11:50:05AM +, alexander.stef...@infineon.com wrote: > > > 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 cod

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jarkko Sakkinen
On Tue, Oct 17, 2017 at 04:02:05PM +0300, Andy Shevchenko wrote: > On Tue, 2017-10-17 at 08:52 -0400, Mimi Zohar wrote: > > On Tue, 2017-10-17 at 11:50 +, alexander.stef...@infineon.com > > wrote: > > > > > Replace the specification of data structures by pointer > > > > > dereferences > > > > >

RE: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-19 Thread Alexander.Steffen
> On Tue, Oct 17, 2017 at 11:50:05AM +, alexander.stef...@infineon.com > wrote: > > > > 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 t

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-20 Thread Jarkko Sakkinen
On Thu, Oct 19, 2017 at 04:58:23PM +, alexander.stef...@infineon.com wrote: > > On Tue, Oct 17, 2017 at 11:50:05AM +, alexander.stef...@infineon.com > > wrote: > > > > > Replace the specification of data structures by pointer dereferences > > > > > as the parameter for the operator "sizeof"

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-20 Thread Jarkko Sakkinen
On Fri, Oct 20, 2017 at 12:01:39PM +0300, Jarkko Sakkinen wrote: > On Thu, Oct 19, 2017 at 04:58:23PM +, alexander.stef...@infineon.com > wrote: > > > On Tue, Oct 17, 2017 at 11:50:05AM +, alexander.stef...@infineon.com > > > wrote: > > > > > > Replace the specification of data structures

RE: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-20 Thread Alexander.Steffen
> On Fri, Oct 20, 2017 at 12:01:39PM +0300, Jarkko Sakkinen wrote: > > On Thu, Oct 19, 2017 at 04:58:23PM +, > alexander.stef...@infineon.com wrote: > > > > On Tue, Oct 17, 2017 at 11:50:05AM +, > alexander.stef...@infineon.com > > > > wrote: > > > > > > > Replace the specification of data

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-23 Thread Dan Carpenter
On Thu, Oct 19, 2017 at 04:58:23PM +, alexander.stef...@infineon.com wrote: > > On Tue, Oct 17, 2017 at 11:50:05AM +, alexander.stef...@infineon.com > > wrote: > > > > > Replace the specification of data structures by pointer dereferences > > > > > as the parameter for the operator "sizeof"