public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: vme_user: fix check alignment should match open parenthesis
@ 2023-07-08  3:55 Alexon Oliveira
  2023-07-27  8:03 ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Alexon Oliveira @ 2023-07-08  3:55 UTC (permalink / raw)
  To: alexondunkan; +Cc: martyn, manohar.vanga, gregkh, linux-kernel, linux-staging

Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Alignment should match open parenthesis

#132: FILE: drivers/staging/vme_user/vme_bridge.h:132
#135: FILE: drivers/staging/vme_user/vme_bridge.h:135
#139: FILE: drivers/staging/vme_user/vme_bridge.h:139
#142: FILE: drivers/staging/vme_user/vme_bridge.h:142
#144: FILE: drivers/staging/vme_user/vme_bridge.h:144
#146: FILE: drivers/staging/vme_user/vme_bridge.h:146
#148: FILE: drivers/staging/vme_user/vme_bridge.h:148
#152: FILE: drivers/staging/vme_user/vme_bridge.h:152
#163: FILE: drivers/staging/vme_user/vme_bridge.h:163
#173: FILE: drivers/staging/vme_user/vme_bridge.h:173
#175: FILE: drivers/staging/vme_user/vme_bridge.h:175

    Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>

diff --git a/drivers/staging/vme_user/vme_bridge.h b/drivers/staging/vme_user/vme_bridge.h
index 11df0a5e7f7b..a0d7a8db239d 100644
--- a/drivers/staging/vme_user/vme_bridge.h
+++ b/drivers/staging/vme_user/vme_bridge.h
@@ -128,28 +128,21 @@ struct vme_bridge {
 	struct mutex irq_mtx;

 	/* Slave Functions */
-	int (*slave_get)(struct vme_slave_resource *, int *,
-		unsigned long long *, unsigned long long *, dma_addr_t *,
-		u32 *, u32 *);
-	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long,
-		unsigned long long, dma_addr_t, u32, u32);
+	int (*slave_get)(struct vme_slave_resource *, int *, unsigned long long *,
+			 unsigned long long *, dma_addr_t *, u32 *, u32 *);
+	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);

 	/* Master Functions */
-	int (*master_get)(struct vme_master_resource *, int *,
-		unsigned long long *, unsigned long long *, u32 *, u32 *,
-		u32 *);
-	int (*master_set)(struct vme_master_resource *, int,
-		unsigned long long, unsigned long long,  u32, u32, u32);
-	ssize_t (*master_read)(struct vme_master_resource *, void *, size_t,
-		loff_t);
-	ssize_t (*master_write)(struct vme_master_resource *, void *, size_t,
-		loff_t);
-	unsigned int (*master_rmw)(struct vme_master_resource *, unsigned int,
-		unsigned int, unsigned int, loff_t);
+	int (*master_get)(struct vme_master_resource *, int *, unsigned long long *,
+			  unsigned long long *, u32 *, u32 *, u32 *);
+	int (*master_set)(struct vme_master_resource *, int, unsigned long long,
+			  unsigned long long,  u32, u32, u32);
+	ssize_t (*master_read)(struct vme_master_resource *, void *, size_t, loff_t);
+	ssize_t (*master_write)(struct vme_master_resource *, void *, size_t, loff_t);
+	unsigned int (*master_rmw)(struct vme_master_resource *, unsigned int, unsigned int, unsigned int, loff_t);

 	/* DMA Functions */
-	int (*dma_list_add)(struct vme_dma_list *, struct vme_dma_attr *,
-		struct vme_dma_attr *, size_t);
+	int (*dma_list_add)(struct vme_dma_list *, struct vme_dma_attr *, struct vme_dma_attr *, size_t);
 	int (*dma_list_exec)(struct vme_dma_list *);
 	int (*dma_list_empty)(struct vme_dma_list *);

@@ -159,24 +152,19 @@ struct vme_bridge {

 	/* Location monitor functions */
 	int (*lm_set)(struct vme_lm_resource *, unsigned long long, u32, u32);
-	int (*lm_get)(struct vme_lm_resource *, unsigned long long *, u32 *,
-		u32 *);
-	int (*lm_attach)(struct vme_lm_resource *, int,
-			 void (*callback)(void *), void *);
+	int (*lm_get)(struct vme_lm_resource *, unsigned long long *, u32 *, u32 *);
+	int (*lm_attach)(struct vme_lm_resource *, int, void (*callback)(void *), void *);
 	int (*lm_detach)(struct vme_lm_resource *, int);

 	/* CR/CSR space functions */
 	int (*slot_get)(struct vme_bridge *);

 	/* Bridge parent interface */
-	void *(*alloc_consistent)(struct device *dev, size_t size,
-		dma_addr_t *dma);
-	void (*free_consistent)(struct device *dev, size_t size,
-		void *vaddr, dma_addr_t dma);
+	void *(*alloc_consistent)(struct device *dev, size_t size, dma_addr_t *dma);
+	void (*free_consistent)(struct device *dev, size_t size, void *vaddr, dma_addr_t dma);
 };

-void vme_bus_error_handler(struct vme_bridge *bridge,
-			   unsigned long long address, int am);
+void vme_bus_error_handler(struct vme_bridge *bridge, unsigned long long address, int am);
 void vme_irq_handler(struct vme_bridge *, int, int);

 struct vme_bridge *vme_init_bridge(struct vme_bridge *);

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-08  3:55 [PATCH] staging: vme_user: fix check alignment should match open parenthesis Alexon Oliveira
@ 2023-07-27  8:03 ` Greg KH
  2023-07-27 14:47   ` Alexon Oliveira
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2023-07-27  8:03 UTC (permalink / raw)
  To: Alexon Oliveira; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Sat, Jul 08, 2023 at 12:55:11AM -0300, Alexon Oliveira wrote:
> Adhere to Linux kernel coding style.
> 
> Reported by checkpatch:
> 
> CHECK: Alignment should match open parenthesis
> 
> #132: FILE: drivers/staging/vme_user/vme_bridge.h:132
> #135: FILE: drivers/staging/vme_user/vme_bridge.h:135
> #139: FILE: drivers/staging/vme_user/vme_bridge.h:139
> #142: FILE: drivers/staging/vme_user/vme_bridge.h:142
> #144: FILE: drivers/staging/vme_user/vme_bridge.h:144
> #146: FILE: drivers/staging/vme_user/vme_bridge.h:146
> #148: FILE: drivers/staging/vme_user/vme_bridge.h:148
> #152: FILE: drivers/staging/vme_user/vme_bridge.h:152
> #163: FILE: drivers/staging/vme_user/vme_bridge.h:163
> #173: FILE: drivers/staging/vme_user/vme_bridge.h:173
> #175: FILE: drivers/staging/vme_user/vme_bridge.h:175

We don't need all of these lines.

>     Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>

Please don't indent your signed-off-by line, that should be to the left.

> 
> diff --git a/drivers/staging/vme_user/vme_bridge.h b/drivers/staging/vme_user/vme_bridge.h
> index 11df0a5e7f7b..a0d7a8db239d 100644
> --- a/drivers/staging/vme_user/vme_bridge.h
> +++ b/drivers/staging/vme_user/vme_bridge.h
> @@ -128,28 +128,21 @@ struct vme_bridge {
>  	struct mutex irq_mtx;
> 
>  	/* Slave Functions */
> -	int (*slave_get)(struct vme_slave_resource *, int *,
> -		unsigned long long *, unsigned long long *, dma_addr_t *,
> -		u32 *, u32 *);
> -	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long,
> -		unsigned long long, dma_addr_t, u32, u32);
> +	int (*slave_get)(struct vme_slave_resource *, int *, unsigned long long *,
> +			 unsigned long long *, dma_addr_t *, u32 *, u32 *);
> +	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);

Did you run your patch through checkpatch.pl after making this change?
I think you just added more warnings...

thanks,

greg k-h

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-27  8:03 ` Greg KH
@ 2023-07-27 14:47   ` Alexon Oliveira
  2023-07-27 15:05     ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Alexon Oliveira @ 2023-07-27 14:47 UTC (permalink / raw)
  To: Greg KH; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Thu, Jul 27, 2023 at 10:03:19AM +0200, Greg KH wrote:
> On Sat, Jul 08, 2023 at 12:55:11AM -0300, Alexon Oliveira wrote:
> > Adhere to Linux kernel coding style.
> > 
> > Reported by checkpatch:
> > 
> > CHECK: Alignment should match open parenthesis
> > 
> > #132: FILE: drivers/staging/vme_user/vme_bridge.h:132
> > #135: FILE: drivers/staging/vme_user/vme_bridge.h:135
> > #139: FILE: drivers/staging/vme_user/vme_bridge.h:139
> > #142: FILE: drivers/staging/vme_user/vme_bridge.h:142
> > #144: FILE: drivers/staging/vme_user/vme_bridge.h:144
> > #146: FILE: drivers/staging/vme_user/vme_bridge.h:146
> > #148: FILE: drivers/staging/vme_user/vme_bridge.h:148
> > #152: FILE: drivers/staging/vme_user/vme_bridge.h:152
> > #163: FILE: drivers/staging/vme_user/vme_bridge.h:163
> > #173: FILE: drivers/staging/vme_user/vme_bridge.h:173
> > #175: FILE: drivers/staging/vme_user/vme_bridge.h:175
> 
> We don't need all of these lines.

Hi Greg, I hope you're good and these messages find you well.

ACK. I thought it would be good to explain what I changed.

> 
> >     Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>
> 
> Please don't indent your signed-off-by line, that should be to the left.
> 

ACK. I didn't indent. This was the output of "git format-patch" I copied and pasted. Next time I'll remove the indentation manually.

> > 
> > diff --git a/drivers/staging/vme_user/vme_bridge.h b/drivers/staging/vme_user/vme_bridge.h
> > index 11df0a5e7f7b..a0d7a8db239d 100644
> > --- a/drivers/staging/vme_user/vme_bridge.h
> > +++ b/drivers/staging/vme_user/vme_bridge.h
> > @@ -128,28 +128,21 @@ struct vme_bridge {
> >  	struct mutex irq_mtx;
> > 
> >  	/* Slave Functions */
> > -	int (*slave_get)(struct vme_slave_resource *, int *,
> > -		unsigned long long *, unsigned long long *, dma_addr_t *,
> > -		u32 *, u32 *);
> > -	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long,
> > -		unsigned long long, dma_addr_t, u32, u32);
> > +	int (*slave_get)(struct vme_slave_resource *, int *, unsigned long long *,
> > +			 unsigned long long *, dma_addr_t *, u32 *, u32 *);
> > +	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);
> 
> Did you run your patch through checkpatch.pl after making this change?

Yes, I did it. No more checks about "Alignment should match open parenthesis".

> I think you just added more warnings...

I only focused to solve the checks related to the message above. Nevertheless, there are still other warnings and checks reported by checkpath.pl non-related to this patch (i.e. not caused by this patch) that need to be fixed, but I intend to help to fix them afterwards in a different patch, so I don't send patches with too many changes at once.  

> 
> thanks,
> 
> greg k-h

I appreciate your feedback and if there's any other question or request, pleaset let me know.

Thank you.

Alexon Oliveira

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-27 14:47   ` Alexon Oliveira
@ 2023-07-27 15:05     ` Greg KH
  2023-07-27 17:08       ` Alexon Oliveira
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2023-07-27 15:05 UTC (permalink / raw)
  To: Alexon Oliveira; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Thu, Jul 27, 2023 at 11:47:23AM -0300, Alexon Oliveira wrote:
> On Thu, Jul 27, 2023 at 10:03:19AM +0200, Greg KH wrote:
> > On Sat, Jul 08, 2023 at 12:55:11AM -0300, Alexon Oliveira wrote:
> > > Adhere to Linux kernel coding style.
> > > 
> > > Reported by checkpatch:
> > > 
> > > CHECK: Alignment should match open parenthesis
> > > 
> > > #132: FILE: drivers/staging/vme_user/vme_bridge.h:132
> > > #135: FILE: drivers/staging/vme_user/vme_bridge.h:135
> > > #139: FILE: drivers/staging/vme_user/vme_bridge.h:139
> > > #142: FILE: drivers/staging/vme_user/vme_bridge.h:142
> > > #144: FILE: drivers/staging/vme_user/vme_bridge.h:144
> > > #146: FILE: drivers/staging/vme_user/vme_bridge.h:146
> > > #148: FILE: drivers/staging/vme_user/vme_bridge.h:148
> > > #152: FILE: drivers/staging/vme_user/vme_bridge.h:152
> > > #163: FILE: drivers/staging/vme_user/vme_bridge.h:163
> > > #173: FILE: drivers/staging/vme_user/vme_bridge.h:173
> > > #175: FILE: drivers/staging/vme_user/vme_bridge.h:175
> > 
> > We don't need all of these lines.
> 
> Hi Greg, I hope you're good and these messages find you well.
> 
> ACK. I thought it would be good to explain what I changed.
> 
> > 
> > >     Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>
> > 
> > Please don't indent your signed-off-by line, that should be to the left.
> > 
> 
> ACK. I didn't indent. This was the output of "git format-patch" I copied and pasted. Next time I'll remove the indentation manually.
> 
> > > 
> > > diff --git a/drivers/staging/vme_user/vme_bridge.h b/drivers/staging/vme_user/vme_bridge.h
> > > index 11df0a5e7f7b..a0d7a8db239d 100644
> > > --- a/drivers/staging/vme_user/vme_bridge.h
> > > +++ b/drivers/staging/vme_user/vme_bridge.h
> > > @@ -128,28 +128,21 @@ struct vme_bridge {
> > >  	struct mutex irq_mtx;
> > > 
> > >  	/* Slave Functions */
> > > -	int (*slave_get)(struct vme_slave_resource *, int *,
> > > -		unsigned long long *, unsigned long long *, dma_addr_t *,
> > > -		u32 *, u32 *);
> > > -	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long,
> > > -		unsigned long long, dma_addr_t, u32, u32);
> > > +	int (*slave_get)(struct vme_slave_resource *, int *, unsigned long long *,
> > > +			 unsigned long long *, dma_addr_t *, u32 *, u32 *);
> > > +	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);
> > 
> > Did you run your patch through checkpatch.pl after making this change?
> 
> Yes, I did it. No more checks about "Alignment should match open parenthesis".
> 
> > I think you just added more warnings...
> 
> I only focused to solve the checks related to the message above. Nevertheless, there are still other warnings and checks reported by checkpath.pl non-related to this patch (i.e. not caused by this patch) that need to be fixed, but I intend to help to fix them afterwards in a different patch, so I don't send patches with too many changes at once.  

You resolved one warning by replacing it with a different one, that's
not good :(

thanks,

greg k-h

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-27 15:05     ` Greg KH
@ 2023-07-27 17:08       ` Alexon Oliveira
  2023-07-27 17:21         ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Alexon Oliveira @ 2023-07-27 17:08 UTC (permalink / raw)
  To: Greg KH; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Thu, Jul 27, 2023 at 05:05:03PM +0200, Greg KH wrote:
> On Thu, Jul 27, 2023 at 11:47:23AM -0300, Alexon Oliveira wrote:
> > On Thu, Jul 27, 2023 at 10:03:19AM +0200, Greg KH wrote:
> > > On Sat, Jul 08, 2023 at 12:55:11AM -0300, Alexon Oliveira wrote:
> > > > Adhere to Linux kernel coding style.
> > > > 
> > > > Reported by checkpatch:
> > > > 
> > > > CHECK: Alignment should match open parenthesis
> > > > 
> > > > #132: FILE: drivers/staging/vme_user/vme_bridge.h:132
> > > > #135: FILE: drivers/staging/vme_user/vme_bridge.h:135
> > > > #139: FILE: drivers/staging/vme_user/vme_bridge.h:139
> > > > #142: FILE: drivers/staging/vme_user/vme_bridge.h:142
> > > > #144: FILE: drivers/staging/vme_user/vme_bridge.h:144
> > > > #146: FILE: drivers/staging/vme_user/vme_bridge.h:146
> > > > #148: FILE: drivers/staging/vme_user/vme_bridge.h:148
> > > > #152: FILE: drivers/staging/vme_user/vme_bridge.h:152
> > > > #163: FILE: drivers/staging/vme_user/vme_bridge.h:163
> > > > #173: FILE: drivers/staging/vme_user/vme_bridge.h:173
> > > > #175: FILE: drivers/staging/vme_user/vme_bridge.h:175
> > > 
> > > We don't need all of these lines.
> > 
> > Hi Greg, I hope you're good and these messages find you well.
> > 
> > ACK. I thought it would be good to explain what I changed.
> > 
> > > 
> > > >     Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>
> > > 
> > > Please don't indent your signed-off-by line, that should be to the left.
> > > 
> > 
> > ACK. I didn't indent. This was the output of "git format-patch" I copied and pasted. Next time I'll remove the indentation manually.
> > 
> > > > 
> > > > diff --git a/drivers/staging/vme_user/vme_bridge.h b/drivers/staging/vme_user/vme_bridge.h
> > > > index 11df0a5e7f7b..a0d7a8db239d 100644
> > > > --- a/drivers/staging/vme_user/vme_bridge.h
> > > > +++ b/drivers/staging/vme_user/vme_bridge.h
> > > > @@ -128,28 +128,21 @@ struct vme_bridge {
> > > >  	struct mutex irq_mtx;
> > > > 
> > > >  	/* Slave Functions */
> > > > -	int (*slave_get)(struct vme_slave_resource *, int *,
> > > > -		unsigned long long *, unsigned long long *, dma_addr_t *,
> > > > -		u32 *, u32 *);
> > > > -	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long,
> > > > -		unsigned long long, dma_addr_t, u32, u32);
> > > > +	int (*slave_get)(struct vme_slave_resource *, int *, unsigned long long *,
> > > > +			 unsigned long long *, dma_addr_t *, u32 *, u32 *);
> > > > +	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);
> > > 
> > > Did you run your patch through checkpatch.pl after making this change?
> > 
> > Yes, I did it. No more checks about "Alignment should match open parenthesis".
> > 
> > > I think you just added more warnings...
> > 
> > I only focused to solve the checks related to the message above. Nevertheless, there are still other warnings and checks reported by checkpath.pl non-related to this patch (i.e. not caused by this patch) that need to be fixed, but I intend to help to fix them afterwards in a different patch, so I don't send patches with too many changes at once.  
> 
> You resolved one warning by replacing it with a different one, that's
> not good :(

Well, honestly, I couldn't spot any new issue caused by this patch. At least it was not reported by the checkpatch.pl. The ones that are still showing up were already there. But, to move on, if you think it's more productive, I can fix all warnings and checks reported by the checkpatch.pl and send them over in only one patch. Is it that feasible?

> 
> thanks,
> 
> greg k-h

Thank you again.

Alexon Oliveira.

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-27 17:08       ` Alexon Oliveira
@ 2023-07-27 17:21         ` Greg KH
  2023-07-27 17:37           ` Alexon Oliveira
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2023-07-27 17:21 UTC (permalink / raw)
  To: Alexon Oliveira; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Thu, Jul 27, 2023 at 02:08:16PM -0300, Alexon Oliveira wrote:
> On Thu, Jul 27, 2023 at 05:05:03PM +0200, Greg KH wrote:
> > You resolved one warning by replacing it with a different one, that's
> > not good :(
> 
> Well, honestly, I couldn't spot any new issue caused by this patch. At least it was not reported by the checkpatch.pl. The ones that are still showing up were already there. But, to move on, if you think it's more productive, I can fix all warnings and checks reported by the checkpatch.pl and send them over in only one patch. Is it that feasible?

I would have thought you would get a "line is too long" warning, that
didn't happen?

Anyway, no, you can't send a "fix all the issues at once" patch, sorry,
if you do that you will get a message from my patch bot that says:

- 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.

So please break it up into logical changes.

thanks,

greg k-h

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-27 17:21         ` Greg KH
@ 2023-07-27 17:37           ` Alexon Oliveira
  2023-07-28  5:24             ` Dan Carpenter
  0 siblings, 1 reply; 16+ messages in thread
From: Alexon Oliveira @ 2023-07-27 17:37 UTC (permalink / raw)
  To: Greg KH; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Thu, Jul 27, 2023 at 07:21:08PM +0200, Greg KH wrote:
> On Thu, Jul 27, 2023 at 02:08:16PM -0300, Alexon Oliveira wrote:
> > On Thu, Jul 27, 2023 at 05:05:03PM +0200, Greg KH wrote:
> > > You resolved one warning by replacing it with a different one, that's
> > > not good :(
> > 
> > Well, honestly, I couldn't spot any new issue caused by this patch. At least it was not reported by the checkpatch.pl. The ones that are still showing up were already there. But, to move on, if you think it's more productive, I can fix all warnings and checks reported by the checkpatch.pl and send them over in only one patch. Is it that feasible?
> 
> I would have thought you would get a "line is too long" warning, that
> didn't happen?
$ pwd
/home/alolivei/git/kernels/staging
$ perl scripts/checkpatch.pl --strict -f drivers/staging/vme_user/vme_bridge.h | grep -i parenthesis
$ 
Nope. I didn't get any of that. Check it out:

$ pwd
/home/alolivei/git/kernels/staging
$ perl scripts/checkpatch.pl --strict -f drivers/staging/vme_user/vme_bridge.h | grep -i parenthesis
$

No more checks/warnings about that. Sure, that are other checks/warnings, but not related to this, and I was intending to fix them in another patch (or multiple patches), because they involve to change the code itself.

> 
> Anyway, no, you can't send a "fix all the issues at once" patch, sorry,
> if you do that you will get a message from my patch bot that says:
> 
> - 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.
> 

That's what I thought, thank you for the explanation. That's why I sent this "little one" only correcting the check reported by checkpatch.pl related to the code formatting style. At least, as you can see above, the tool is not complaining about that issue anymore, as I made sure to follow up the guidelines on that.

> So please break it up into logical changes.
> 

The logical change of this patch is to fix all the "CHECK: Alignment should match open parenthesis" reported by checkpatch.pl in this specific code in all the lines (11 of them) I reported in my first message.

> thanks,
> 
> greg k-h

Thank you.

Alexon Oliveira

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-27 17:37           ` Alexon Oliveira
@ 2023-07-28  5:24             ` Dan Carpenter
  2023-07-28 17:43               ` Alexon Oliveira
  0 siblings, 1 reply; 16+ messages in thread
From: Dan Carpenter @ 2023-07-28  5:24 UTC (permalink / raw)
  To: Alexon Oliveira
  Cc: Greg KH, martyn, manohar.vanga, linux-kernel, linux-staging

On Thu, Jul 27, 2023 at 02:37:54PM -0300, Alexon Oliveira wrote:
> > 
> > I would have thought you would get a "line is too long" warning, that
> > didn't happen?
> $ pwd
> /home/alolivei/git/kernels/staging
> $ perl scripts/checkpatch.pl --strict -f drivers/staging/vme_user/vme_bridge.h | grep -i parenthesis
> $ 
> Nope. I didn't get any of that. Check it out:

Heh.  The warning is there but you used grep to remove it.

Speaking of long lines.  Could you fix your email client to line wrap at
75 characters.

regards,
dan carpenter


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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-28  5:24             ` Dan Carpenter
@ 2023-07-28 17:43               ` Alexon Oliveira
  2023-07-28 17:59                 ` Dan Carpenter
  0 siblings, 1 reply; 16+ messages in thread
From: Alexon Oliveira @ 2023-07-28 17:43 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: gregkh, martyn, manohar.vanga, linux-kernel, linux-staging

On Fri, Jul 28, 2023 at 08:24:56AM +0300, Dan Carpenter wrote:
> On Thu, Jul 27, 2023 at 02:37:54PM -0300, Alexon Oliveira wrote:
> > > 
> > > I would have thought you would get a "line is too long" warning, that
> > > didn't happen?
> > $ pwd
> > /home/alolivei/git/kernels/staging
> > $ perl scripts/checkpatch.pl --strict -f drivers/staging/vme_user/vme_bridge.h | grep -i parenthesis
> > $ 
> > Nope. I didn't get any of that. Check it out:
> 
> Heh.  The warning is there but you used grep to remove it.
> 

I only used grep so as not to pollute my answer with too long
output, but you can validate the full output by running the following:

curl -ks https://people.redhat.com/alolivei/kernel/evidence

You'll see there's no warning related to this patch.
As I mentioned, there are other warnings that were already there before
I submitted the patch, and I didn't touch them (yet).

> Speaking of long lines.  Could you fix your email client to line wrap at
> 75 characters.
> 

ACK. Done.

> regards,
> dan carpenter
> 

Thank you.

Alexon Oliveira

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-28 17:43               ` Alexon Oliveira
@ 2023-07-28 17:59                 ` Dan Carpenter
  2023-08-01 15:53                   ` Alexon Oliveira
  0 siblings, 1 reply; 16+ messages in thread
From: Dan Carpenter @ 2023-07-28 17:59 UTC (permalink / raw)
  To: Alexon Oliveira
  Cc: gregkh, martyn, manohar.vanga, linux-kernel, linux-staging

On Fri, Jul 28, 2023 at 02:43:12PM -0300, Alexon Oliveira wrote:
> On Fri, Jul 28, 2023 at 08:24:56AM +0300, Dan Carpenter wrote:
> > On Thu, Jul 27, 2023 at 02:37:54PM -0300, Alexon Oliveira wrote:
> > > > 
> > > > I would have thought you would get a "line is too long" warning, that
> > > > didn't happen?
> > > $ pwd
> > > /home/alolivei/git/kernels/staging
> > > $ perl scripts/checkpatch.pl --strict -f drivers/staging/vme_user/vme_bridge.h | grep -i parenthesis
> > > $ 
> > > Nope. I didn't get any of that. Check it out:
> > 
> > Heh.  The warning is there but you used grep to remove it.
> > 
> 
> I only used grep so as not to pollute my answer with too long
> output, but you can validate the full output by running the following:
> 
> curl -ks https://people.redhat.com/alolivei/kernel/evidence
> 
> You'll see there's no warning related to this patch.

I checked before I emailed you...  The warning is there in your URL as
well.

CHECK: line length of 121 exceeds 100 columns
#133: FILE: drivers/staging/vme_user/vme_bridge.h:133:
+	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);

> As I mentioned, there are other warnings that were already there before
> I submitted the patch, and I didn't touch them (yet).

No, these warnings are new.  Here are the relevant lines from the diff.
Originally it was short and now it's a bajillion characters long.

-       int (*slave_set)(struct vme_slave_resource *, int, unsigned long long,
-               unsigned long long, dma_addr_t, u32, u32);
+       int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);

regards,
dan carpenter


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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-07-28 17:59                 ` Dan Carpenter
@ 2023-08-01 15:53                   ` Alexon Oliveira
  0 siblings, 0 replies; 16+ messages in thread
From: Alexon Oliveira @ 2023-08-01 15:53 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: gregkh, martyn, manohar.vanga, linux-kernel, linux-staging

On Fri, Jul 28, 2023 at 08:59:12PM +0300, Dan Carpenter wrote:
> On Fri, Jul 28, 2023 at 02:43:12PM -0300, Alexon Oliveira wrote:
> > On Fri, Jul 28, 2023 at 08:24:56AM +0300, Dan Carpenter wrote:
> > > On Thu, Jul 27, 2023 at 02:37:54PM -0300, Alexon Oliveira wrote:
> > > > > 
> > > > > I would have thought you would get a "line is too long" warning, that
> > > > > didn't happen?
> > > > $ pwd
> > > > /home/alolivei/git/kernels/staging
> > > > $ perl scripts/checkpatch.pl --strict -f drivers/staging/vme_user/vme_bridge.h | grep -i parenthesis
> > > > $ 
> > > > Nope. I didn't get any of that. Check it out:
> > > 
> > > Heh.  The warning is there but you used grep to remove it.
> > > 
> > 
> > I only used grep so as not to pollute my answer with too long
> > output, but you can validate the full output by running the following:
> > 
> > curl -ks https://people.redhat.com/alolivei/kernel/evidence
> > 
> > You'll see there's no warning related to this patch.
> 
> I checked before I emailed you...  The warning is there in your URL as
> well.
> 
> CHECK: line length of 121 exceeds 100 columns
> #133: FILE: drivers/staging/vme_user/vme_bridge.h:133:
> +	int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);
> 

It took me some time to finally understand your observation and now I
get it. I was able to identify these same new warnings. Thank you for
your patience in explaining that out to me.

> > As I mentioned, there are other warnings that were already there before
> > I submitted the patch, and I didn't touch them (yet).
> 
> No, these warnings are new.  Here are the relevant lines from the diff.
> Originally it was short and now it's a bajillion characters long.
> 
> -       int (*slave_set)(struct vme_slave_resource *, int, unsigned long long,
> -               unsigned long long, dma_addr_t, u32, u32);
> +       int (*slave_set)(struct vme_slave_resource *, int, unsigned long long, unsigned long long, dma_addr_t, u32, u32);
> 

You're correct (as so Greg). I've already applied the necessary fixes to
that and I'm submitting a v2 patch with these changes. Again, thank you
for your feedback and help.

> regards,
> dan carpenter
> 

Thank you.

Alexon Oliveira

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

* [PATCH] staging: vme_user: fix check alignment should match open parenthesis
@ 2023-08-04 21:20 Alexon Oliveira
  2023-08-05  6:14 ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Alexon Oliveira @ 2023-08-04 21:20 UTC (permalink / raw)
  To: gregkh; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

Fixed all CHECK: Alignment should match open parenthesis
as reported by checkpatch to adhere to the Linux kernel
coding-style guidelines.

Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>
---
 drivers/staging/vme_user/vme.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c
index 977c81e2f3c7..741593d75a63 100644
--- a/drivers/staging/vme_user/vme.c
+++ b/drivers/staging/vme_user/vme.c
@@ -563,7 +563,7 @@ EXPORT_SYMBOL(vme_master_request);
  *         returned.
  */
 int vme_master_set(struct vme_resource *resource, int enabled,
-		   unsigned long long vme_base, unsigned long long size, 
+		   unsigned long long vme_base, unsigned long long size,
 		   u32 aspace, u32 cycle, u32 dwidth)
 {
 	struct vme_bridge *bridge = find_bridge(resource);
@@ -614,7 +614,7 @@ EXPORT_SYMBOL(vme_master_set);
  *         device or if an invalid resource has been provided.
  */
 int vme_master_get(struct vme_resource *resource, int *enabled,
-		   unsigned long long *vme_base, unsigned long long *size, 
+		   unsigned long long *vme_base, unsigned long long *size,
 		   u32 *aspace, u32 *cycle, u32 *dwidth)
 {
 	struct vme_bridge *bridge = find_bridge(resource);
@@ -1045,7 +1045,7 @@ EXPORT_SYMBOL(vme_dma_pci_attribute);
  * Return: Pointer to VME DMA attribute, NULL on failure.
  */
 struct vme_dma_attr *vme_dma_vme_attribute(unsigned long long address,
-					   u32 aspace, u32 cycle, 
+					   u32 aspace, u32 cycle,
 					   u32 dwidth)
 {
 	struct vme_dma_attr *attributes;
@@ -1841,7 +1841,7 @@ EXPORT_SYMBOL(vme_unregister_bridge);
 /* - Driver Registration --------------------------------------------------- */
 
 static int __vme_register_driver_bus(struct vme_driver *drv,
-				     struct vme_bridge *bridge, 
+				     struct vme_bridge *bridge,
 				     unsigned int ndevs)
 {
 	int err;
-- 
2.41.0


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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-08-04 21:20 Alexon Oliveira
@ 2023-08-05  6:14 ` Greg KH
  2023-08-07 15:13   ` Alexon Oliveira
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2023-08-05  6:14 UTC (permalink / raw)
  To: Alexon Oliveira; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Fri, Aug 04, 2023 at 06:20:50PM -0300, Alexon Oliveira wrote:
> Fixed all CHECK: Alignment should match open parenthesis
> as reported by checkpatch to adhere to the Linux kernel
> coding-style guidelines.

This does not describe the changes you actually made in this patch :(


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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-08-05  6:14 ` Greg KH
@ 2023-08-07 15:13   ` Alexon Oliveira
  2023-08-07 15:26     ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Alexon Oliveira @ 2023-08-07 15:13 UTC (permalink / raw)
  To: Greg KH; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Sat, Aug 05, 2023 at 08:14:33AM +0200, Greg KH wrote:
> On Fri, Aug 04, 2023 at 06:20:50PM -0300, Alexon Oliveira wrote:
> > Fixed all CHECK: Alignment should match open parenthesis
> > as reported by checkpatch to adhere to the Linux kernel
> > coding-style guidelines.
> 
> This does not describe the changes you actually made in this patch :(
> 
Hi Greg,

Thank you for your feedback. Don't get me wrong, please, I'm just trying
to understand it now, but honestly I don't know what is wrong with
it this time. I described exactly what I did in the code: ran the
checkpatch, which identified a lot of "CHECK: Alignment should match
open parenthesis" messages, fixed them all according to the coding-style
guidelines and comitted it.

This is the same thing I did previously for the file
drivers/staging/vme_user/vme_bridge.h in the commit
7d5ce25fb4c3cc91d16e27163dc141de0eba213b, but now is the file
drivers/staging/vme_user/vme.c and commit
a1f0b0a8ba9a496504c2e3d4b37cee388e78f0ea. Different files,
different commits, similar fixes for the same warnings,
and same description.

The only thing I found strange is because instead of starting a new
email thread it ended up in the same email thread as the previous
patch. Would that be the problem?

If not, would you mind, please, to explain to me what would be the most
appropriate way you'd like me to write this changelog?

I really appreciate your patience and help.

Thank you.

Regards.

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-08-07 15:13   ` Alexon Oliveira
@ 2023-08-07 15:26     ` Greg KH
  2023-08-07 20:30       ` Alexon Oliveira
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2023-08-07 15:26 UTC (permalink / raw)
  To: Alexon Oliveira; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Mon, Aug 07, 2023 at 12:13:40PM -0300, Alexon Oliveira wrote:
> On Sat, Aug 05, 2023 at 08:14:33AM +0200, Greg KH wrote:
> > On Fri, Aug 04, 2023 at 06:20:50PM -0300, Alexon Oliveira wrote:
> > > Fixed all CHECK: Alignment should match open parenthesis
> > > as reported by checkpatch to adhere to the Linux kernel
> > > coding-style guidelines.
> > 
> > This does not describe the changes you actually made in this patch :(
> > 
> Hi Greg,
> 
> Thank you for your feedback. Don't get me wrong, please, I'm just trying
> to understand it now, but honestly I don't know what is wrong with
> it this time. I described exactly what I did in the code: ran the
> checkpatch, which identified a lot of "CHECK: Alignment should match
> open parenthesis" messages, fixed them all according to the coding-style
> guidelines and comitted it.

But you did not change the alignment of the open parenthesis, right?
You deleted the trailing whitespace.

> 
> This is the same thing I did previously for the file
> drivers/staging/vme_user/vme_bridge.h in the commit
> 7d5ce25fb4c3cc91d16e27163dc141de0eba213b, but now is the file
> drivers/staging/vme_user/vme.c and commit
> a1f0b0a8ba9a496504c2e3d4b37cee388e78f0ea. Different files,
> different commits, similar fixes for the same warnings,
> and same description.
> 
> The only thing I found strange is because instead of starting a new
> email thread it ended up in the same email thread as the previous
> patch. Would that be the problem?

That would be a problem, and it seems you used the same subject line as
previous patches that were different?

Anyway, my comment was about the trailing whitespace change.

thanks,

greg k-h

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

* Re: [PATCH] staging: vme_user: fix check alignment should match open parenthesis
  2023-08-07 15:26     ` Greg KH
@ 2023-08-07 20:30       ` Alexon Oliveira
  0 siblings, 0 replies; 16+ messages in thread
From: Alexon Oliveira @ 2023-08-07 20:30 UTC (permalink / raw)
  To: Greg KH; +Cc: martyn, manohar.vanga, linux-kernel, linux-staging

On Mon, Aug 07, 2023 at 05:26:04PM +0200, Greg KH wrote:
> On Mon, Aug 07, 2023 at 12:13:40PM -0300, Alexon Oliveira wrote:
> > On Sat, Aug 05, 2023 at 08:14:33AM +0200, Greg KH wrote:
> > > On Fri, Aug 04, 2023 at 06:20:50PM -0300, Alexon Oliveira wrote:
> > > > Fixed all CHECK: Alignment should match open parenthesis
> > > > as reported by checkpatch to adhere to the Linux kernel
> > > > coding-style guidelines.
> > > 
> > > This does not describe the changes you actually made in this patch :(
> > > 
> > Hi Greg,
> > 
> > Thank you for your feedback. Don't get me wrong, please, I'm just trying
> > to understand it now, but honestly I don't know what is wrong with
> > it this time. I described exactly what I did in the code: ran the
> > checkpatch, which identified a lot of "CHECK: Alignment should match
> > open parenthesis" messages, fixed them all according to the coding-style
> > guidelines and comitted it.
> 
> But you did not change the alignment of the open parenthesis, right?
> You deleted the trailing whitespace.
> 

Hmm, I did both, but the last one I did right before commit, due a final
check. But you're right, I forgot to mention it in the changelog as
well. I'm going to submit a new patch with the correct description.
Thank you for the explanation.

> > 
> > This is the same thing I did previously for the file
> > drivers/staging/vme_user/vme_bridge.h in the commit
> > 7d5ce25fb4c3cc91d16e27163dc141de0eba213b, but now is the file
> > drivers/staging/vme_user/vme.c and commit
> > a1f0b0a8ba9a496504c2e3d4b37cee388e78f0ea. Different files,
> > different commits, similar fixes for the same warnings,
> > and same description.
> > 
> > The only thing I found strange is because instead of starting a new
> > email thread it ended up in the same email thread as the previous
> > patch. Would that be the problem?
> 
> That would be a problem, and it seems you used the same subject line as
> previous patches that were different?
> 

Yep, used same subject line. I'm going to change it slightly to not
extend this thread, since it's a commit for a different file.

> Anyway, my comment was about the trailing whitespace change.
> 

ACK

> thanks,
> 
> greg k-h

Thank you.

Alexon Oliveira

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

end of thread, other threads:[~2023-08-07 20:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-08  3:55 [PATCH] staging: vme_user: fix check alignment should match open parenthesis Alexon Oliveira
2023-07-27  8:03 ` Greg KH
2023-07-27 14:47   ` Alexon Oliveira
2023-07-27 15:05     ` Greg KH
2023-07-27 17:08       ` Alexon Oliveira
2023-07-27 17:21         ` Greg KH
2023-07-27 17:37           ` Alexon Oliveira
2023-07-28  5:24             ` Dan Carpenter
2023-07-28 17:43               ` Alexon Oliveira
2023-07-28 17:59                 ` Dan Carpenter
2023-08-01 15:53                   ` Alexon Oliveira
  -- strict thread matches above, loose matches on Subject: below --
2023-08-04 21:20 Alexon Oliveira
2023-08-05  6:14 ` Greg KH
2023-08-07 15:13   ` Alexon Oliveira
2023-08-07 15:26     ` Greg KH
2023-08-07 20:30       ` Alexon Oliveira

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