[PATCH] fixed formatting issues

Anshul posted 1 patch 2 years, 3 months ago
arch/alpha/boot/main.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
[PATCH] fixed formatting issues
Posted by Anshul 2 years, 3 months ago
Fixed minor formatting issues as per `scripts/checkpatch.pl`

Six changes to the file and their severity are as follows:
* [WARNING] Removed unnecessary braces from single statement blocks
* [ERROR]   5 fixes are to pointer formatting
* [ERROR]   Removed a trailing whitespace

6 errors and 1 warning of the previously present 6 errors and 5
warnings have been fixed.

Signed-off-by: Anshul <anshulusr@gmail.com>
---
 arch/alpha/boot/main.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c
index 22a1cb026..f609c3a83 100644
--- a/arch/alpha/boot/main.c
+++ b/arch/alpha/boot/main.c
@@ -20,8 +20,9 @@
 #include "ksize.h"
 
 extern unsigned long switch_to_osf_pal(unsigned long nr,
-	struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
-	unsigned long *vptb);
+				       struct pcb_struct *pcb_va,
+				       struct pcb_struct *pcb_pa,
+				       unsigned long *vptb);
 struct hwrpb_struct *hwrpb = INIT_HWRPB;
 static struct pcb_struct pcb_va[1];
 
@@ -42,7 +43,7 @@ find_pa(unsigned long *vptb, void *ptr)
 	result <<= 13;
 	result |= address & 0x1fff;
 	return (void *) result;
-}	
+}
 
 /*
  * This function moves into OSF/1 pal-code, and has a temporary
@@ -62,8 +63,8 @@ void
 pal_init(void)
 {
 	unsigned long i, rev;
-	struct percpu_struct * percpu;
-	struct pcb_struct * pcb_pa;
+	struct percpu_struct *percpu;
+	struct pcb_struct *pcb_pa;
 
 	/* Create the dummy PCB.  */
 	pcb_va->ksp = 0;
@@ -176,11 +177,10 @@ void start_kernel(void)
 	}
 
 	nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval));
-	if (nbytes < 0) {
+	if (nbytes < 0)
 		nbytes = 0;
-	}
 	envval[nbytes] = '\0';
-	strcpy((char*)ZERO_PGE, envval);
+	strcpy((char *)ZERO_PGE, envval);
 
 	srm_printk(" Ok\nNow booting the kernel\n");
 	runkernel();
-- 
2.42.0
Re: [PATCH] fixed formatting issues
Posted by Greg KH 2 years, 3 months ago
On Mon, Aug 28, 2023 at 12:48:25PM +0530, Anshul wrote:
> Fixed minor formatting issues as per `scripts/checkpatch.pl`
> 
> Six changes to the file and their severity are as follows:
> * [WARNING] Removed unnecessary braces from single statement blocks
> * [ERROR]   5 fixes are to pointer formatting
> * [ERROR]   Removed a trailing whitespace
> 
> 6 errors and 1 warning of the previously present 6 errors and 5
> warnings have been fixed.
> 
> Signed-off-by: Anshul <anshulusr@gmail.com>
> ---
>  arch/alpha/boot/main.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

- You did not write a descriptive Subject: for the patch, allowing
  everyone, to know what this patch is all about.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/process/submitting-patches.rst for what a proper
  Subject: line should look like.

- It looks like you did not use your "real" name for the patch on either
  the Signed-off-by: line, or the From: line (both of which have to
  match).  Please read the kernel file,
  Documentation/process/submitting-patches.rst for how to do this
  correctly.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot
Re: [PATCH] fixed formatting issues
Posted by Anshul 2 years, 3 months ago
Hello Greg,

> - Your patch did many different things all at once, making it difficult
>   to review.  All Linux kernel patches need to only do one thing at a
>   time.  If you need to do multiple things (such as clean up all coding
>   style issues in a file/driver), do it in a sequence of patches, each
>   one doing only one thing.  This will make it easier to review the
>   patches to ensure that they are correct, and to help alleviate any
>   merge issues that larger patches can cause.

I believe that splitting the patch is not necessary in this instance since
the changes are localized and trivial to reason about.

> - You did not write a descriptive Subject: for the patch, allowing
>   everyone, to know what this patch is all about.  Please read the
>   section entitled "The canonical patch format" in the kernel file,
>   Documentation/process/submitting-patches.rst for what a proper
>   Subject: line should look like.

As per the feedback, the updated patch has incorporated the changes.

> - It looks like you did not use your "real" name for the patch on either
>   the Signed-off-by: line, or the From: line (both of which have to
>   match).  Please read the kernel file,
>   Documentation/process/submitting-patches.rst for how to do this
>   correctly.

I have verified that the Signed-off-by: line and the From: line contain the
same content.

Thanks for the feedback,

Anshul
Re: [PATCH] fixed formatting issues
Posted by Greg KH 2 years, 3 months ago
On Mon, Aug 28, 2023 at 01:54:41PM +0530, Anshul wrote:
> Hello Greg,
> 
> > - Your patch did many different things all at once, making it difficult
> >   to review.  All Linux kernel patches need to only do one thing at a
> >   time.  If you need to do multiple things (such as clean up all coding
> >   style issues in a file/driver), do it in a sequence of patches, each
> >   one doing only one thing.  This will make it easier to review the
> >   patches to ensure that they are correct, and to help alleviate any
> >   merge issues that larger patches can cause.
> 
> I believe that splitting the patch is not necessary in this instance since
> the changes are localized and trivial to reason about.

That's up to the maintainer to decide.

> > - You did not write a descriptive Subject: for the patch, allowing
> >   everyone, to know what this patch is all about.  Please read the
> >   section entitled "The canonical patch format" in the kernel file,
> >   Documentation/process/submitting-patches.rst for what a proper
> >   Subject: line should look like.
> 
> As per the feedback, the updated patch has incorporated the changes.

Why are you changing coding style issues in this portion of the kernel?
Do you have this hardware to test with?

Normally coding style cleanups like this are only allowed in the
drivers/staging/* portion of the kernel.  Unless you get approval from
the maintainer of the subsystem you are changing, I wouldn't work on
this as it's generally considered bad form.

> > - It looks like you did not use your "real" name for the patch on either
> >   the Signed-off-by: line, or the From: line (both of which have to
> >   match).  Please read the kernel file,
> >   Documentation/process/submitting-patches.rst for how to do this
> >   correctly.
> 
> I have verified that the Signed-off-by: line and the From: line contain the
> same content.

Your name is only 1 word?

thanks,

greg k-h
Re: [PATCH] fixed formatting issues
Posted by Anshul 2 years, 3 months ago
> Why are you changing coding style issues in this portion of the kernel?
> Do you have this hardware to test with?

I was exploring the source code and noticed a few discrepancies in the
coding style and followed to run `scripts/checkpatch.pl`.

> Normally coding style cleanups like this are only allowed in the
> drivers/staging/* portion of the kernel.  Unless you get approval from
> the maintainer of the subsystem you are changing, I wouldn't work on
> this as it's generally considered bad form.

I was not aware of that. I apologise in case my actions caused any
undue inconveniences, that was never my intention.

> Your name is only 1 word?
Yes, my legal name doesn't have a last name. I could change my From:
or Signed-off-by: lines to have "Anshul A" or add my informal last name
if that aligns better with kernel standards.

I appreciate your feedback and apologise for any problems caused,

Anshul
[PATCH] alpha/boot: fixes formatting issues in `main.c`
Posted by Anshul 2 years, 3 months ago
Fixed minor formatting issues as per `scripts/checkpatch.pl`

Six changes to the file and their severity are as follows:
* [WARNING] Removed unnecessary braces from single statement blocks
* [ERROR] 5 fixes are to pointer formatting
* [ERROR] Removed a trailing whitespace

6 errors and 1 warning of the previously present 6 errors and 5
warnings have been fixed.

Signed-off-by: Anshul <anshulusr@gmail.com>
---
 arch/alpha/boot/main.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c
index 22a1cb026..f609c3a83 100644
--- a/arch/alpha/boot/main.c
+++ b/arch/alpha/boot/main.c
@@ -20,8 +20,9 @@
 #include "ksize.h"
 
 extern unsigned long switch_to_osf_pal(unsigned long nr,
-	struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
-	unsigned long *vptb);
+				       struct pcb_struct *pcb_va,
+				       struct pcb_struct *pcb_pa,
+				       unsigned long *vptb);
 struct hwrpb_struct *hwrpb = INIT_HWRPB;
 static struct pcb_struct pcb_va[1];
 
@@ -42,7 +43,7 @@ find_pa(unsigned long *vptb, void *ptr)
 	result <<= 13;
 	result |= address & 0x1fff;
 	return (void *) result;
-}	
+}
 
 /*
  * This function moves into OSF/1 pal-code, and has a temporary
@@ -62,8 +63,8 @@ void
 pal_init(void)
 {
 	unsigned long i, rev;
-	struct percpu_struct * percpu;
-	struct pcb_struct * pcb_pa;
+	struct percpu_struct *percpu;
+	struct pcb_struct *pcb_pa;
 
 	/* Create the dummy PCB.  */
 	pcb_va->ksp = 0;
@@ -176,11 +177,10 @@ void start_kernel(void)
 	}
 
 	nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval));
-	if (nbytes < 0) {
+	if (nbytes < 0)
 		nbytes = 0;
-	}
 	envval[nbytes] = '\0';
-	strcpy((char*)ZERO_PGE, envval);
+	strcpy((char *)ZERO_PGE, envval);
 
 	srm_printk(" Ok\nNow booting the kernel\n");
 	runkernel();
-- 
2.42.0
Re: [PATCH] alpha/boot: fixes formatting issues in `main.c`
Posted by Greg KH 2 years, 3 months ago
On Mon, Aug 28, 2023 at 01:36:59PM +0530, Anshul wrote:
> Fixed minor formatting issues as per `scripts/checkpatch.pl`
> 
> Six changes to the file and their severity are as follows:
> * [WARNING] Removed unnecessary braces from single statement blocks
> * [ERROR] 5 fixes are to pointer formatting
> * [ERROR] Removed a trailing whitespace
> 
> 6 errors and 1 warning of the previously present 6 errors and 5
> warnings have been fixed.
> 
> Signed-off-by: Anshul <anshulusr@gmail.com>
> ---
>  arch/alpha/boot/main.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c
> index 22a1cb026..f609c3a83 100644
> --- a/arch/alpha/boot/main.c
> +++ b/arch/alpha/boot/main.c
> @@ -20,8 +20,9 @@
>  #include "ksize.h"
>  
>  extern unsigned long switch_to_osf_pal(unsigned long nr,
> -	struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
> -	unsigned long *vptb);
> +				       struct pcb_struct *pcb_va,
> +				       struct pcb_struct *pcb_pa,
> +				       unsigned long *vptb);
>  struct hwrpb_struct *hwrpb = INIT_HWRPB;
>  static struct pcb_struct pcb_va[1];
>  
> @@ -42,7 +43,7 @@ find_pa(unsigned long *vptb, void *ptr)
>  	result <<= 13;
>  	result |= address & 0x1fff;
>  	return (void *) result;
> -}	
> +}
>  
>  /*
>   * This function moves into OSF/1 pal-code, and has a temporary
> @@ -62,8 +63,8 @@ void
>  pal_init(void)
>  {
>  	unsigned long i, rev;
> -	struct percpu_struct * percpu;
> -	struct pcb_struct * pcb_pa;
> +	struct percpu_struct *percpu;
> +	struct pcb_struct *pcb_pa;
>  
>  	/* Create the dummy PCB.  */
>  	pcb_va->ksp = 0;
> @@ -176,11 +177,10 @@ void start_kernel(void)
>  	}
>  
>  	nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval));
> -	if (nbytes < 0) {
> +	if (nbytes < 0)
>  		nbytes = 0;
> -	}
>  	envval[nbytes] = '\0';
> -	strcpy((char*)ZERO_PGE, envval);
> +	strcpy((char *)ZERO_PGE, envval);
>  
>  	srm_printk(" Ok\nNow booting the kernel\n");
>  	runkernel();
> -- 
> 2.42.0


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

- It looks like you did not use your "real" name for the patch on either
  the Signed-off-by: line, or the From: line (both of which have to
  match).  Please read the kernel file,
  Documentation/process/submitting-patches.rst for how to do this
  correctly.

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/process/submitting-patches.rst for what
  needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot