Patchwork [U-Boot,1/3] lib/asm-offsets.c: Clean coding style

login
register
mail settings
Submitter Michal Simek
Date Dec. 21, 2010, 6:12 p.m.
Message ID <1292955178-13018-1-git-send-email-monstr@monstr.eu>
Download mbox | patch
Permalink /patch/76308/
State Rejected
Headers show

Comments

Michal Simek - Dec. 21, 2010, 6:12 p.m.
Clear coding style issues.

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 lib/asm-offsets.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Wolfgang Denk - Dec. 21, 2010, 6:55 p.m.
Dear Michal Simek,

In message <1292955178-13018-1-git-send-email-monstr@monstr.eu> you wrote:
> Clear coding style issues.
> 
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> ---
>  lib/asm-offsets.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
> index 2209561..f1af7e2 100644
> --- a/lib/asm-offsets.c
> +++ b/lib/asm-offsets.c
> @@ -19,11 +19,11 @@
>  
>  #include <linux/kbuild.h>
>  
> -int main(void)
> +int main (void)
>  {
>  	/* Round up to make sure size gives nice stack alignment */
> -	DEFINE(GENERATED_GBL_DATA_SIZE,
> -		(sizeof(struct global_data)+15) & ~15);
> +	DEFINE (GENERATED_GBL_DATA_SIZE,
> +		(sizeof (struct global_data) + 15) & ~15);

These changes are to the worse.  All.  Why do you think this would be
better?


Best regards,

Wolfgang Denk
Michal Simek - Dec. 21, 2010, 8:02 p.m.
Wolfgang Denk wrote:
> Dear Michal Simek,
> 
> In message <1292955178-13018-1-git-send-email-monstr@monstr.eu> you wrote:
>> Clear coding style issues.
>>
>> Signed-off-by: Michal Simek <monstr@monstr.eu>
>> ---
>>  lib/asm-offsets.c |    6 +++---
>>  1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
>> index 2209561..f1af7e2 100644
>> --- a/lib/asm-offsets.c
>> +++ b/lib/asm-offsets.c
>> @@ -19,11 +19,11 @@
>>  
>>  #include <linux/kbuild.h>
>>  
>> -int main(void)
>> +int main (void)
>>  {
>>  	/* Round up to make sure size gives nice stack alignment */
>> -	DEFINE(GENERATED_GBL_DATA_SIZE,
>> -		(sizeof(struct global_data)+15) & ~15);
>> +	DEFINE (GENERATED_GBL_DATA_SIZE,
>> +		(sizeof (struct global_data) + 15) & ~15);
> 
> These changes are to the worse.  All.  Why do you think this would be
> better?

It is what intend suggest to do.
intend -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1 -pcs

I am OK to remove space between macro name and argument as you suggested 
in your other email.

 >> +	DEFINE (GENERATED_GBL_DATA_SIZE,
 >> +		(sizeof (struct global_data) + 15) & ~15);
                                             ^ ^   ^ ^

I believe that marked space are OK, or not?

Thanks,
Michal
Wolfgang Denk - Dec. 21, 2010, 9:11 p.m.
Dear Michal Simek,

In message <4D1107D2.7070607@monstr.eu> you wrote:
>
> > These changes are to the worse.  All.  Why do you think this would be
> > better?
> 
> It is what intend suggest to do.
> intend -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1 -pcs

Please omit the "-pcs" part.  It has always been my personal
preference, but I've been overruled, and we use plain Lindent these
days.

> I am OK to remove space between macro name and argument as you suggested 
> in your other email.
> 
>  >> +	DEFINE (GENERATED_GBL_DATA_SIZE,
>  >> +		(sizeof (struct global_data) + 15) & ~15);
>                                              ^ ^   ^ ^
> 
> I believe that marked space are OK, or not?

Yes.

Best regards,

Wolfgang Denk
Michal Simek - Dec. 22, 2010, 6:39 a.m.
Wolfgang Denk wrote:
> Dear Michal Simek,
> 
> In message <4D1107D2.7070607@monstr.eu> you wrote:
>>> These changes are to the worse.  All.  Why do you think this would be
>>> better?
>> It is what intend suggest to do.
>> intend -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1 -pcs
> 
> Please omit the "-pcs" part.  It has always been my personal
> preference, but I've been overruled, and we use plain Lindent these
> days.

Ok. Would it be possible to remove it from coding style page.
http://www.denx.de/wiki/U-Boot/CodingStyle

I just used what there is.

Best regards,
Michal
Wolfgang Denk - Dec. 22, 2010, 7 a.m.
Dear Michal Simek,

In message <4D119D06.2010709@monstr.eu> you wrote:
>
> > Please omit the "-pcs" part.  It has always been my personal
> > preference, but I've been overruled, and we use plain Lindent these
> > days.
> 
> Ok. Would it be possible to remove it from coding style page.
> http://www.denx.de/wiki/U-Boot/CodingStyle

Sure, done.

Note: you could have fixed this yourself.  The DULG is a wiki, and
everybody can contribute to correct and extend the documentation.

> I just used what there is.

I understand, sorry for the confusion.

Best regards,

Wolfgang Denk
Michal Simek - Dec. 22, 2010, 7:19 a.m.
Wolfgang Denk wrote:
> Dear Michal Simek,
> 
> In message <4D119D06.2010709@monstr.eu> you wrote:
>>> Please omit the "-pcs" part.  It has always been my personal
>>> preference, but I've been overruled, and we use plain Lindent these
>>> days.
>> Ok. Would it be possible to remove it from coding style page.
>> http://www.denx.de/wiki/U-Boot/CodingStyle
> 
> Sure, done.
> 
> Note: you could have fixed this yourself.  The DULG is a wiki, and
> everybody can contribute to correct and extend the documentation.
> 
>> I just used what there is.
> 
> I understand, sorry for the confusion.

No problem,

Thanks,
Michal
Sergei Shtylyov - Dec. 22, 2010, 11:38 a.m.
Hello.

On 21-12-2010 21:12, Michal Simek wrote:

> Clear coding style issues.

> Signed-off-by: Michal Simek<monstr@monstr.eu>
[...]

> diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
> index 2209561..f1af7e2 100644
> --- a/lib/asm-offsets.c
> +++ b/lib/asm-offsets.c
> @@ -19,11 +19,11 @@
>
>   #include<linux/kbuild.h>
>
> -int main(void)
> +int main (void)

    Why add space before paren? checkpatch.pl wouldn't like it.

>   {
>   	/* Round up to make sure size gives nice stack alignment */
> -	DEFINE(GENERATED_GBL_DATA_SIZE,
> -		(sizeof(struct global_data)+15) & ~15);
> +	DEFINE (GENERATED_GBL_DATA_SIZE,

    Same here...

WBR, Sergei

Patch

diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index 2209561..f1af7e2 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -19,11 +19,11 @@ 
 
 #include <linux/kbuild.h>
 
-int main(void)
+int main (void)
 {
 	/* Round up to make sure size gives nice stack alignment */
-	DEFINE(GENERATED_GBL_DATA_SIZE,
-		(sizeof(struct global_data)+15) & ~15);
+	DEFINE (GENERATED_GBL_DATA_SIZE,
+		(sizeof (struct global_data) + 15) & ~15);
 
 	return 0;
 }