2023-08-08 17:02:38

by Alexon Oliveira

[permalink] [raw]
Subject: [PATCH v3] staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces

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

Signed-off-by: Alexon Oliveira <[email protected]>
---

Changes in v3:
- Rebased against staging.git and staging-next branch, noted by Greg KH

Changes in v2:
- Fixed changelog, noted by Greg KH

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



2023-08-09 12:57:38

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v3] staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces

On Tue, Aug 08, 2023 at 10:59:40AM -0300, Alexon Oliveira wrote:
> Fixed all CHECK: Alignment should match open parenthesis
> and deleted the trailing whitespaces as reported by
> checkpatch to adhere to the Linux kernel coding-style
> guidelines.
>
> Signed-off-by: Alexon Oliveira <[email protected]>
> ---
>
> Changes in v3:
> - Rebased against staging.git and staging-next branch, noted by Greg KH

I don't think you did this as it still fails to apply for me :(

Can you go through the exact steps and try again?

thanks,

greg k-h

2023-08-09 15:18:09

by Nam Cao

[permalink] [raw]
Subject: Re: [PATCH v3] staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces

On Tue, Aug 08, 2023 at 10:59:40AM -0300, Alexon Oliveira wrote:
> Fixed all CHECK: Alignment should match open parenthesis
> and deleted the trailing whitespaces as reported by
> checkpatch to adhere to the Linux kernel coding-style
> guidelines.
>
> Signed-off-by: Alexon Oliveira <[email protected]>
> ---
>
> Changes in v3:
> - Rebased against staging.git and staging-next branch, noted by Greg KH
>
> Changes in v2:
> - Fixed changelog, noted by Greg KH
>
> 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)

As Greg said, it doesn't look like this in staging tree, so your patch doesn't apply.

However I look it up and the last change to this line was 12 years ago, so I doubt
that it is because you didn't rebase to Greg's tree. I think the more likely
possibility is that you have a commit to this line yourself (by mistake perhaps?),
and this patch is on top of that.

Make sure you don't have any accident commit that modifies this line in your tree.

Best regards,
Nam

2023-08-09 16:41:33

by Alexon Oliveira

[permalink] [raw]
Subject: Re: [PATCH v3] staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces

On Wed, Aug 09, 2023 at 04:29:32PM +0200, Nam Cao wrote:
> On Tue, Aug 08, 2023 at 10:59:40AM -0300, Alexon Oliveira wrote:
> > Fixed all CHECK: Alignment should match open parenthesis
> > and deleted the trailing whitespaces as reported by
> > checkpatch to adhere to the Linux kernel coding-style
> > guidelines.
> >
> > Signed-off-by: Alexon Oliveira <[email protected]>
> > ---
> >
> > Changes in v3:
> > - Rebased against staging.git and staging-next branch, noted by Greg KH
> >
> > Changes in v2:
> > - Fixed changelog, noted by Greg KH
> >
> > 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)
>
> As Greg said, it doesn't look like this in staging tree, so your patch doesn't apply.
>

Hi Nam,

I did all the steps to have my branch updated with the origin/main
branch, but I've found out that was something more.

> However I look it up and the last change to this line was 12 years ago, so I doubt
> that it is because you didn't rebase to Greg's tree. I think the more likely
> possibility is that you have a commit to this line yourself (by mistake perhaps?),
> and this patch is on top of that.
>

Thank you for poiting that out. You're right. I found that was indeed an issue on my
side thanks to your input.

> Make sure you don't have any accident commit that modifies this line in your tree.
>

There was indeed and accident commit modifying more than one line in my
tree, hence the "trailing whitespaces" messages in one of the commits.
So, to clean evertyhing up, I decided to drop these commits and start
all over again, from scratch. That way I'm sure I'm not messing up
anything else. I just sent a fresh patch in another thread.

> Best regards,
> Nam

Thank you.

Alexon Oliveira

2023-08-09 18:05:33

by Alexon Oliveira

[permalink] [raw]
Subject: Re: [PATCH v3] staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces

On Wed, Aug 09, 2023 at 02:24:25PM +0200, Greg KH wrote:
> On Tue, Aug 08, 2023 at 10:59:40AM -0300, Alexon Oliveira wrote:
> > Fixed all CHECK: Alignment should match open parenthesis
> > and deleted the trailing whitespaces as reported by
> > checkpatch to adhere to the Linux kernel coding-style
> > guidelines.
> >
> > Signed-off-by: Alexon Oliveira <[email protected]>
> > ---
> >
> > Changes in v3:
> > - Rebased against staging.git and staging-next branch, noted by Greg KH
>
> I don't think you did this as it still fails to apply for me :(
>
> Can you go through the exact steps and try again?
>

I'm pretty positive I did as you instructed me, but I think the problem
seems to be another thing:

$ git fetch origin

remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 46 (delta 35), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (46/46), 33.97 KiB | 135.00 KiB/s, done.
From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
1422b526fba9..c3bdcb94967d staging-testing -> origin/staging-testing

$ git rebase -i origin/staging-testing

warning: skipped previously applied commit 7d5ce25fb4c3
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
^[[AERROR: trailing whitespace
#158: FILE: drivers/staging/vme_user/vme.c:566:
+^I^I unsigned long long vme_base, unsigned long long size, $

ERROR: trailing whitespace
#180: FILE: drivers/staging/vme_user/vme.c:617:
+^I^I unsigned long long *vme_base, unsigned long long *size, $

ERROR: trailing whitespace
#244: FILE: drivers/staging/vme_user/vme.c:1048:
+^I^I^I^I^I u32 aspace, u32 cycle, $

ERROR: trailing whitespace
#311: FILE: drivers/staging/vme_user/vme.c:1844:
+^I^I^I^I struct vme_bridge *bridge, $

total: 4 errors, 0 warnings, 0 checks, 277 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
You may wish to use scripts/cleanpatch or scripts/cleanfile

"[PATCH] staging: vme_user: fix alignment of open parenthesis and" has style problems, please review.

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 0 checks, 32 lines checked

"[PATCH] staging: vme_user: fix alignment of open parenthesis and" has no obvious style problems and is ready for submission.
Successfully rebased and updated refs/heads/first-patch.

$ git rebase -i origin/staging-testing
Stopped at d13431f7a7ba... staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces
You can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

$ git commit --amend -s -v
ERROR: trailing whitespace
#158: FILE: drivers/staging/vme_user/vme.c:566:
+^I^I unsigned long long vme_base, unsigned long long size, $

ERROR: trailing whitespace
#180: FILE: drivers/staging/vme_user/vme.c:617:
+^I^I unsigned long long *vme_base, unsigned long long *size, $

ERROR: trailing whitespace
#244: FILE: drivers/staging/vme_user/vme.c:1048:
+^I^I^I^I^I u32 aspace, u32 cycle, $

ERROR: trailing whitespace
#311: FILE: drivers/staging/vme_user/vme.c:1844:
+^I^I^I^I struct vme_bridge *bridge, $

total: 4 errors, 0 warnings, 0 checks, 277 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
You may wish to use scripts/cleanpatch or scripts/cleanfile

"[PATCH] staging: vme_user: fix alignment of open parenthesis and" has style problems, please review.

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[detached HEAD 527a5480c032] staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces
Date: Fri Aug 4 18:01:54 2023 -0300
1 file changed, 43 insertions(+), 42 deletions(-)

$ git rebase --continue
total: 0 errors, 0 warnings, 0 checks, 32 lines checked

"[PATCH] staging: vme_user: fix alignment of open parenthesis and" has no obvious style problems and is ready for submission.
Successfully rebased and updated refs/heads/first-patch.

$ git rebase -i origin/staging-testing
Successfully rebased and updated refs/heads/first-patch.

$ git rebase -i origin/staging-next
Successfully rebased and updated refs/heads/first-patch.

> thanks,
>
> greg k-h

Thank you.

Alexon Oliveira

2023-08-09 20:05:54

by Nam Cao

[permalink] [raw]
Subject: Re: [PATCH v3] staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces

On Wed, Aug 09, 2023 at 01:18:38PM -0300, Alexon Oliveira wrote:
> There was indeed and accident commit modifying more than one line in my
> tree, hence the "trailing whitespaces" messages in one of the commits.
> So, to clean evertyhing up, I decided to drop these commits and start
> all over again, from scratch. That way I'm sure I'm not messing up
> anything else. I just sent a fresh patch in another thread.

FYI just in case you are new with git, you can always work on different stuffs
in different git branches. No need to delete your previous works, just create a
new fresh branch.

Best regards,
Nam

2023-08-09 21:02:57

by Alexon Oliveira

[permalink] [raw]
Subject: Re: [PATCH v3] staging: vme_user: fix alignment of open parenthesis and deleted trailing spaces

On Wed, Aug 09, 2023 at 09:26:00PM +0200, Nam Cao wrote:
> On Wed, Aug 09, 2023 at 01:18:38PM -0300, Alexon Oliveira wrote:
> > There was indeed and accident commit modifying more than one line in my
> > tree, hence the "trailing whitespaces" messages in one of the commits.
> > So, to clean evertyhing up, I decided to drop these commits and start
> > all over again, from scratch. That way I'm sure I'm not messing up
> > anything else. I just sent a fresh patch in another thread.
>
> FYI just in case you are new with git, you can always work on different stuffs
> in different git branches. No need to delete your previous works, just create a
> new fresh branch.
>

ACK, thank you for the tip. I'm not new with git, but I'm indeed new
using git to contribute do kernel. I'm still learning my way through
the steps needed to adhere to the community procedures.

In this case, I preferred to start from scratch because I'm using this
branch only for this type of stuff, and I'm going to use different
branches for different purposes.

> Best regards,
> Nam

Thank you.

Alexon Oliveira