mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86, setup: Removed spaces, trailing character and suspect code indent warnings and errors in a20.c This is a patch to the a20.c file that fixes following warnings/errors found by the checkpatch.pl tool i)  WARNING: please, no spaces at the start of a line ii) WARNING: suspect code indent for conditional statements iii) ERROR: trailing whitespace
@ 2013-05-07 13:20 Syed Salman Mansoor
  2013-05-07 13:50 ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: Syed Salman Mansoor @ 2013-05-07 13:20 UTC (permalink / raw)
  To: hpa, tglx, mingo; +Cc: x86, linux-kernel, Syed Salman Mansoor

Signed-off-by: Syed Salman Mansoor <syed.salman.mansoor@gmail.com>
---
 arch/x86/boot/a20.c |   48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c
index 64a31a6..4565f4d 100644
--- a/arch/x86/boot/a20.c
+++ b/arch/x86/boot/a20.c
@@ -129,37 +129,37 @@ static void enable_a20_fast(void)
 
 int enable_a20(void)
 {
-       int loops = A20_ENABLE_LOOPS;
-       int kbc_err;
+	int loops = A20_ENABLE_LOOPS;
+	int kbc_err;
 
-       while (loops--) {
-	       /* First, check to see if A20 is already enabled
+	while (loops--) {
+		/* First, check to see if A20 is already enabled
 		  (legacy free, etc.) */
-	       if (a20_test_short())
-		       return 0;
-	       
+		if (a20_test_short())
+			return 0;
+
 	       /* Next, try the BIOS (INT 0x15, AX=0x2401) */
 	       enable_a20_bios();
-	       if (a20_test_short())
-		       return 0;
-	       
+		if (a20_test_short())
+			return 0;
+
 	       /* Try enabling A20 through the keyboard controller */
 	       kbc_err = empty_8042();
 
-	       if (a20_test_short())
-		       return 0; /* BIOS worked, but with delayed reaction */
-	
-	       if (!kbc_err) {
-		       enable_a20_kbc();
-		       if (a20_test_long())
-			       return 0;
+		if (a20_test_short())
+			return 0; /* BIOS worked, but with delayed reaction */
+
+		if (!kbc_err) {
+			enable_a20_kbc();
+			if (a20_test_long())
+				return 0;
 	       }
-	       
+
 	       /* Finally, try enabling the "fast A20 gate" */
-	       enable_a20_fast();
-	       if (a20_test_long())
-		       return 0;
-       }
-       
-       return -1;
+		enable_a20_fast();
+		if (a20_test_long())
+			return 0;
+	}
+
+	return -1;
 }
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, setup: Removed spaces, trailing character and suspect code indent warnings and errors in a20.c This is a patch to the a20.c file that fixes following warnings/errors found by the checkpatch.pl tool i)  WARNING: please, no spaces at the start of a line ii) WARNING: suspect code indent for conditional statements iii) ERROR: trailing whitespace
  2013-05-07 13:20 [PATCH] x86, setup: Removed spaces, trailing character and suspect code indent warnings and errors in a20.c This is a patch to the a20.c file that fixes following warnings/errors found by the checkpatch.pl tool i) WARNING: please, no spaces at the start of a line ii) WARNING: suspect code indent for conditional statements iii) ERROR: trailing whitespace Syed Salman Mansoor
@ 2013-05-07 13:50 ` Borislav Petkov
  2013-05-07 15:58   ` Syed Salman Mansoor
  0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2013-05-07 13:50 UTC (permalink / raw)
  To: Syed Salman Mansoor; +Cc: hpa, tglx, mingo, x86, linux-kernel

On Tue, May 07, 2013 at 06:20:22PM +0500, Syed Salman Mansoor wrote:
> Signed-off-by: Syed Salman Mansoor <syed.salman.mansoor@gmail.com>

No,

this is still wrong:

Subject: [PATCH] x86, setup: Removed spaces, trailing character and suspect code indent warnings and errors in a20.c This is a patch to the a20.c file that
        fixes following warnings/errors found by the checkpatch.pl tool i)  WARNING: please, no spaces at the start of a line ii) WARNING: suspect code
        indent for conditional statements iii) ERROR: trailing whitespace

Don't you think that this Subject line is insanely long but the patch
still doesn't have a commit message?

I can see you're using git so when you do:

git commit -a -s

and the editor opens, simply type in a short name for the patch into the
first line:

"x86, boot: Cleanup A20 code"

or something which hints at what this patch does.

Then, do a newline and on the third line, type in the rest of the
subject above:

> Remove spaces, trailing character and suspect code indent warnings and
> errors in a20.c This is a patch to the a20.c file that fixes following

You don't have to say which file it patches since we can see that from
the diffstat.

> warnings/errors found by the checkpatch.pl tool i) WARNING: please,
> no spaces at the start of a line ii) WARNING: suspect code indent for
> conditional statements iii) ERROR: trailing whitespace

So basically do something like that:

"Fix checkpatch.pl warnings in a20.c:
 i) blabla
 ii) more blabla
 iii) and so on blabla"

Btw, Documentation/SubmittingPatches is a good document to read. :-)

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, setup: Removed spaces, trailing character and suspect code indent warnings and errors in a20.c This is a patch to the a20.c file that fixes following warnings/errors found by the checkpatch.pl tool i) WARNING: please, no spaces at the start of a line ii) WARNING: suspect code indent for conditional statements iii) ERROR: trailing whitespace
  2013-05-07 13:50 ` Borislav Petkov
@ 2013-05-07 15:58   ` Syed Salman Mansoor
  0 siblings, 0 replies; 3+ messages in thread
From: Syed Salman Mansoor @ 2013-05-07 15:58 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: hpa, tglx, mingo, x86, linux-kernel

Thanks a lot.
I am trying again. Hopefully this will work :)

On Tue, May 7, 2013 at 6:50 PM, Borislav Petkov <bp@alien8.de> wrote:
> On Tue, May 07, 2013 at 06:20:22PM +0500, Syed Salman Mansoor wrote:
>> Signed-off-by: Syed Salman Mansoor <syed.salman.mansoor@gmail.com>
>
> No,
>
> this is still wrong:
>
> Subject: [PATCH] x86, setup: Removed spaces, trailing character and suspect code indent warnings and errors in a20.c This is a patch to the a20.c file that
>         fixes following warnings/errors found by the checkpatch.pl tool i)  WARNING: please, no spaces at the start of a line ii) WARNING: suspect code
>         indent for conditional statements iii) ERROR: trailing whitespace
>
> Don't you think that this Subject line is insanely long but the patch
> still doesn't have a commit message?
>
> I can see you're using git so when you do:
>
> git commit -a -s
>
> and the editor opens, simply type in a short name for the patch into the
> first line:
>
> "x86, boot: Cleanup A20 code"
>
> or something which hints at what this patch does.
>
> Then, do a newline and on the third line, type in the rest of the
> subject above:
>
>> Remove spaces, trailing character and suspect code indent warnings and
>> errors in a20.c This is a patch to the a20.c file that fixes following
>
> You don't have to say which file it patches since we can see that from
> the diffstat.
>
>> warnings/errors found by the checkpatch.pl tool i) WARNING: please,
>> no spaces at the start of a line ii) WARNING: suspect code indent for
>> conditional statements iii) ERROR: trailing whitespace
>
> So basically do something like that:
>
> "Fix checkpatch.pl warnings in a20.c:
>  i) blabla
>  ii) more blabla
>  iii) and so on blabla"
>
> Btw, Documentation/SubmittingPatches is a good document to read. :-)
>
> Thanks.
>
> --
> Regards/Gruss,
>     Boris.
>
> Sent from a fat crate under my desk. Formatting is fine.
> --

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-07 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07 13:20 [PATCH] x86, setup: Removed spaces, trailing character and suspect code indent warnings and errors in a20.c This is a patch to the a20.c file that fixes following warnings/errors found by the checkpatch.pl tool i) WARNING: please, no spaces at the start of a line ii) WARNING: suspect code indent for conditional statements iii) ERROR: trailing whitespace Syed Salman Mansoor
2013-05-07 13:50 ` Borislav Petkov
2013-05-07 15:58   ` Syed Salman Mansoor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®