Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: Alignment warning
@ 2025-03-22  6:58 Erick Karanja
  2025-03-25 12:15 ` Alex Elder
  0 siblings, 1 reply; 2+ messages in thread
From: Erick Karanja @ 2025-03-22  6:58 UTC (permalink / raw)
  To: outreachy, johan, elder, gregkh
  Cc: greybus-dev, linux-staging, linux-kernel, Erick Karanja

Correct the alignment of the parameters to match the open parenthesis.

Reported by checkpatch:

    CHECK: Alignment should match open parenthesis

Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
---
 drivers/staging/greybus/camera.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index 5d80ace41d8e..ec9fddfc0b14 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -1165,8 +1165,8 @@ static int gb_camera_debugfs_init(struct gb_camera *gcam)
 		gcam->debugfs.buffers[i].length = 0;
 
 		debugfs_create_file_aux(entry->name, entry->mask,
-				    gcam->debugfs.root, gcam, entry,
-				    &gb_camera_debugfs_ops);
+					gcam->debugfs.root, gcam, entry,
+					&gb_camera_debugfs_ops);
 	}
 
 	return 0;
-- 
2.43.0


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

* Re: [PATCH] staging: greybus: Alignment warning
  2025-03-22  6:58 [PATCH] staging: greybus: Alignment warning Erick Karanja
@ 2025-03-25 12:15 ` Alex Elder
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2025-03-25 12:15 UTC (permalink / raw)
  To: Erick Karanja, outreachy, johan, elder, gregkh
  Cc: greybus-dev, linux-staging, linux-kernel

On 3/22/25 1:58 AM, Erick Karanja wrote:
> Correct the alignment of the parameters to match the open parenthesis.
> 
> Reported by checkpatch:
> 
>      CHECK: Alignment should match open parenthesis

I think this change is OK.  However you'll notice that checkpatch.pl
has three categories of issues that get reported:  errors, warnings,
and checks.  These are in decreasing order of severity.

Alignment issues like this are just "checks", which means they are
minor nits that are often not considered a "real" problem.  In many
cases, white space variances like this are done intentionally, to
make the code more readable, or sometimes simply because the code
that surrounds it used a different convention for alignment (some
people simply align to an even number of tabs, for example).

In this case, the change doesn't make the "look" of the code any
worse, and doesn't reduce readability.  It furthermore gets rid
of spaces after a tab that do *not* lead to the suggested alignment.
It probably isn't a necessary change, but I think it's reasonable.

I write all this to explain that these sorts of changes are in many
cases rejected.

I'll leave it to Greg to accept this, or offer a second opinion.

Reviewed-by: Alex Elder <elder@riscstar.com>

> 
> Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
> ---
>   drivers/staging/greybus/camera.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
> index 5d80ace41d8e..ec9fddfc0b14 100644
> --- a/drivers/staging/greybus/camera.c
> +++ b/drivers/staging/greybus/camera.c
> @@ -1165,8 +1165,8 @@ static int gb_camera_debugfs_init(struct gb_camera *gcam)
>   		gcam->debugfs.buffers[i].length = 0;
>   
>   		debugfs_create_file_aux(entry->name, entry->mask,
> -				    gcam->debugfs.root, gcam, entry,
> -				    &gb_camera_debugfs_ops);
> +					gcam->debugfs.root, gcam, entry,
> +					&gb_camera_debugfs_ops);
>   	}
>   
>   	return 0;


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

end of thread, other threads:[~2025-03-25 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-22  6:58 [PATCH] staging: greybus: Alignment warning Erick Karanja
2025-03-25 12:15 ` Alex Elder

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