linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] staging: greybus: Coding style cleanup patches
@ 2023-10-22 12:13 Nandha Kumar Singaram
  2023-10-22 12:15 ` [PATCH v2 1/3] staging: greybus: camera: Alignment should match open parenthesis Nandha Kumar Singaram
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-22 12:13 UTC (permalink / raw)
  To: Viresh Kumar, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
	greybus-dev, linux-staging, linux-kernel
  Cc: kumaran.4353

This patchset performs code cleanup in greybus driver as per
linux coding style and may be applied in any sequence.

v2: Ammended wording in subject line for all the patches
    Suggested by Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Nandha Kumar Singaram (3):
  staging: greybus: camera: Alignment should match open parenthesis
  staging: greybus: camera: Modify lines end with a '('
  staging: greybus: bootrom: fixed prefer using ftrace warning

 drivers/staging/greybus/bootrom.c |  2 --
 drivers/staging/greybus/camera.c  | 13 ++++++-------
 2 files changed, 6 insertions(+), 9 deletions(-)

-- 
2.25.1


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

* [PATCH v2 1/3] staging: greybus: camera: Alignment should match open parenthesis
  2023-10-22 12:13 [PATCH v2 0/3] staging: greybus: Coding style cleanup patches Nandha Kumar Singaram
@ 2023-10-22 12:15 ` Nandha Kumar Singaram
  2023-10-26 18:18   ` Alex Elder
  2023-10-22 12:18 ` [PATCH v2 2/3] staging: greybus: camera: Modify lines end with a '(' Nandha Kumar Singaram
  2023-10-22 12:22 ` [PATCH v2 3/3] staging: greybus: bootrom: fixed prefer using ftrace warning Nandha Kumar Singaram
  2 siblings, 1 reply; 8+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-22 12:15 UTC (permalink / raw)
  To: Viresh Kumar, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
	greybus-dev, linux-staging, linux-kernel
  Cc: kumaran.4353

Adhere to linux coding style. Reported by checkpatch.pl:
CHECK: Alignment should match open parenthesis

Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
---
 drivers/staging/greybus/camera.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index ae49e37a87e9..6516e7efaab9 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -220,7 +220,7 @@ static int gb_camera_operation_sync_flags(struct gb_connection *connection,
 }
 
 static int gb_camera_get_max_pkt_size(struct gb_camera *gcam,
-		struct gb_camera_configure_streams_response *resp)
+				      struct gb_camera_configure_streams_response *resp)
 {
 	unsigned int max_pkt_size = 0;
 	unsigned int i;
@@ -378,8 +378,8 @@ struct ap_csi_config_request {
 #define GB_CAMERA_CSI_CLK_FREQ_MARGIN		150000000U
 
 static int gb_camera_setup_data_connection(struct gb_camera *gcam,
-		struct gb_camera_configure_streams_response *resp,
-		struct gb_camera_csi_params *csi_params)
+					   struct gb_camera_configure_streams_response *resp,
+					   struct gb_camera_csi_params *csi_params)
 {
 	struct ap_csi_config_request csi_cfg;
 	struct gb_connection *conn;
@@ -783,8 +783,8 @@ static ssize_t gb_camera_op_capabilities(void *priv, char *data, size_t len)
 }
 
 static int gb_camera_op_configure_streams(void *priv, unsigned int *nstreams,
-		unsigned int *flags, struct gb_camera_stream *streams,
-		struct gb_camera_csi_params *csi_params)
+					  unsigned int *flags, struct gb_camera_stream *streams,
+					  struct gb_camera_csi_params *csi_params)
 {
 	struct gb_camera *gcam = priv;
 	struct gb_camera_stream_config *gb_streams;
-- 
2.25.1


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

* [PATCH v2 2/3] staging: greybus: camera: Modify lines end with a '('
  2023-10-22 12:13 [PATCH v2 0/3] staging: greybus: Coding style cleanup patches Nandha Kumar Singaram
  2023-10-22 12:15 ` [PATCH v2 1/3] staging: greybus: camera: Alignment should match open parenthesis Nandha Kumar Singaram
@ 2023-10-22 12:18 ` Nandha Kumar Singaram
  2023-10-22 12:22 ` [PATCH v2 3/3] staging: greybus: bootrom: fixed prefer using ftrace warning Nandha Kumar Singaram
  2 siblings, 0 replies; 8+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-22 12:18 UTC (permalink / raw)
  To: Viresh Kumar, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
	greybus-dev, linux-staging, linux-kernel
  Cc: kumaran.4353

Adhere to linux coding style. Reported by checkpatch.pl:
CHECK: Lines should not end with a '('

Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
---
 drivers/staging/greybus/camera.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index 6516e7efaab9..40d3b8aca8f0 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -267,8 +267,7 @@ static int gb_camera_get_max_pkt_size(struct gb_camera *gcam,
  * Validate the stream configuration response verifying padding is correctly
  * set and the returned number of streams is supported
  */
-static const int gb_camera_configure_streams_validate_response(
-		struct gb_camera *gcam,
+static const int gb_camera_configure_streams_validate_response(struct gb_camera *gcam,
 		struct gb_camera_configure_streams_response *resp,
 		unsigned int nstreams)
 {
-- 
2.25.1


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

* [PATCH v2 3/3] staging: greybus: bootrom: fixed prefer using ftrace warning
  2023-10-22 12:13 [PATCH v2 0/3] staging: greybus: Coding style cleanup patches Nandha Kumar Singaram
  2023-10-22 12:15 ` [PATCH v2 1/3] staging: greybus: camera: Alignment should match open parenthesis Nandha Kumar Singaram
  2023-10-22 12:18 ` [PATCH v2 2/3] staging: greybus: camera: Modify lines end with a '(' Nandha Kumar Singaram
@ 2023-10-22 12:22 ` Nandha Kumar Singaram
  2023-10-26 18:20   ` Alex Elder
  2 siblings, 1 reply; 8+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-22 12:22 UTC (permalink / raw)
  To: Viresh Kumar, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
	greybus-dev, linux-staging, linux-kernel
  Cc: kumaran.4353

Adhere to linux coding style. Reported by checkpatch.pl:
WARNING: Unnecessary ftrace-like logging - prefer using ftrace

Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
---
 drivers/staging/greybus/bootrom.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
index a8efb86de140..79581457c4af 100644
--- a/drivers/staging/greybus/bootrom.c
+++ b/drivers/staging/greybus/bootrom.c
@@ -491,8 +491,6 @@ static void gb_bootrom_disconnect(struct gb_bundle *bundle)
 {
 	struct gb_bootrom *bootrom = greybus_get_drvdata(bundle);
 
-	dev_dbg(&bundle->dev, "%s\n", __func__);
-
 	gb_connection_disable(bootrom->connection);
 
 	/* Disable timeouts */
-- 
2.25.1


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

* Re: [PATCH v2 1/3] staging: greybus: camera: Alignment should match open parenthesis
  2023-10-22 12:15 ` [PATCH v2 1/3] staging: greybus: camera: Alignment should match open parenthesis Nandha Kumar Singaram
@ 2023-10-26 18:18   ` Alex Elder
  2023-10-28 20:22     ` Nandha Kumar Singaram
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Elder @ 2023-10-26 18:18 UTC (permalink / raw)
  To: Nandha Kumar Singaram, Viresh Kumar, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, greybus-dev, linux-staging, linux-kernel
  Cc: kumaran.4353

On 10/22/23 7:15 AM, Nandha Kumar Singaram wrote:
> Adhere to linux coding style. Reported by checkpatch.pl:
> CHECK: Alignment should match open parenthesis

Generally, the result of this patch in isolation looks OK.
But when you compare it with your next patch, what you're
doing here becomes inconsistent with the indentation used
for the function arguments there.

There is value in consistency as advocated by checkpatch,
but there's also value in consistency within a single
source file.

I'd stay away from these white space changes.

					-Alex

> Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
> ---
>   drivers/staging/greybus/camera.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
> index ae49e37a87e9..6516e7efaab9 100644
> --- a/drivers/staging/greybus/camera.c
> +++ b/drivers/staging/greybus/camera.c
> @@ -220,7 +220,7 @@ static int gb_camera_operation_sync_flags(struct gb_connection *connection,
>   }
>   
>   static int gb_camera_get_max_pkt_size(struct gb_camera *gcam,
> -		struct gb_camera_configure_streams_response *resp)
> +				      struct gb_camera_configure_streams_response *resp)
>   {
>   	unsigned int max_pkt_size = 0;
>   	unsigned int i;
> @@ -378,8 +378,8 @@ struct ap_csi_config_request {
>   #define GB_CAMERA_CSI_CLK_FREQ_MARGIN		150000000U
>   
>   static int gb_camera_setup_data_connection(struct gb_camera *gcam,
> -		struct gb_camera_configure_streams_response *resp,
> -		struct gb_camera_csi_params *csi_params)
> +					   struct gb_camera_configure_streams_response *resp,
> +					   struct gb_camera_csi_params *csi_params)
>   {
>   	struct ap_csi_config_request csi_cfg;
>   	struct gb_connection *conn;
> @@ -783,8 +783,8 @@ static ssize_t gb_camera_op_capabilities(void *priv, char *data, size_t len)
>   }
>   
>   static int gb_camera_op_configure_streams(void *priv, unsigned int *nstreams,
> -		unsigned int *flags, struct gb_camera_stream *streams,
> -		struct gb_camera_csi_params *csi_params)
> +					  unsigned int *flags, struct gb_camera_stream *streams,
> +					  struct gb_camera_csi_params *csi_params)
>   {
>   	struct gb_camera *gcam = priv;
>   	struct gb_camera_stream_config *gb_streams;


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

* Re: [PATCH v2 3/3] staging: greybus: bootrom: fixed prefer using ftrace warning
  2023-10-22 12:22 ` [PATCH v2 3/3] staging: greybus: bootrom: fixed prefer using ftrace warning Nandha Kumar Singaram
@ 2023-10-26 18:20   ` Alex Elder
  2023-10-28 20:25     ` Nandha Kumar Singaram
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Elder @ 2023-10-26 18:20 UTC (permalink / raw)
  To: Nandha Kumar Singaram, Viresh Kumar, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, greybus-dev, linux-staging, linux-kernel
  Cc: kumaran.4353

On 10/22/23 7:22 AM, Nandha Kumar Singaram wrote:
> Adhere to linux coding style. Reported by checkpatch.pl:
> WARNING: Unnecessary ftrace-like logging - prefer using ftrace
> 
> Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>

This change looks reasonable to me, though I don't think
ftrace provides device information.

Acked-by: Alex Elder <elder@linaro.org>

> ---
>   drivers/staging/greybus/bootrom.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
> index a8efb86de140..79581457c4af 100644
> --- a/drivers/staging/greybus/bootrom.c
> +++ b/drivers/staging/greybus/bootrom.c
> @@ -491,8 +491,6 @@ static void gb_bootrom_disconnect(struct gb_bundle *bundle)
>   {
>   	struct gb_bootrom *bootrom = greybus_get_drvdata(bundle);
>   
> -	dev_dbg(&bundle->dev, "%s\n", __func__);
> -
>   	gb_connection_disable(bootrom->connection);
>   
>   	/* Disable timeouts */


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

* Re: [PATCH v2 1/3] staging: greybus: camera: Alignment should match open parenthesis
  2023-10-26 18:18   ` Alex Elder
@ 2023-10-28 20:22     ` Nandha Kumar Singaram
  0 siblings, 0 replies; 8+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-28 20:22 UTC (permalink / raw)
  To: Alex Elder
  Cc: Viresh Kumar, Johan Hovold, greybus-dev, linux-staging,
	linux-kernel, kumaran.4353

On Thu, Oct 26, 2023 at 01:18:04PM -0500, Alex Elder wrote:
> On 10/22/23 7:15 AM, Nandha Kumar Singaram wrote:
> > Adhere to linux coding style. Reported by checkpatch.pl:
> > CHECK: Alignment should match open parenthesis
> 
> Generally, the result of this patch in isolation looks OK.
> But when you compare it with your next patch, what you're
> doing here becomes inconsistent with the indentation used
> for the function arguments there.
> 
> There is value in consistency as advocated by checkpatch,
> but there's also value in consistency within a single
> source file.
> 
> I'd stay away from these white space changes.
> 
> 					-Alex
> 
> > Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
> > ---
> >   drivers/staging/greybus/camera.c | 10 +++++-----
> >   1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
> > index ae49e37a87e9..6516e7efaab9 100644
> > --- a/drivers/staging/greybus/camera.c
> > +++ b/drivers/staging/greybus/camera.c
> > @@ -220,7 +220,7 @@ static int gb_camera_operation_sync_flags(struct gb_connection *connection,
> >   }
> >   static int gb_camera_get_max_pkt_size(struct gb_camera *gcam,
> > -		struct gb_camera_configure_streams_response *resp)
> > +				      struct gb_camera_configure_streams_response *resp)
> >   {
> >   	unsigned int max_pkt_size = 0;
> >   	unsigned int i;
> > @@ -378,8 +378,8 @@ struct ap_csi_config_request {
> >   #define GB_CAMERA_CSI_CLK_FREQ_MARGIN		150000000U
> >   static int gb_camera_setup_data_connection(struct gb_camera *gcam,
> > -		struct gb_camera_configure_streams_response *resp,
> > -		struct gb_camera_csi_params *csi_params)
> > +					   struct gb_camera_configure_streams_response *resp,
> > +					   struct gb_camera_csi_params *csi_params)
> >   {
> >   	struct ap_csi_config_request csi_cfg;
> >   	struct gb_connection *conn;
> > @@ -783,8 +783,8 @@ static ssize_t gb_camera_op_capabilities(void *priv, char *data, size_t len)
> >   }
> >   static int gb_camera_op_configure_streams(void *priv, unsigned int *nstreams,
> > -		unsigned int *flags, struct gb_camera_stream *streams,
> > -		struct gb_camera_csi_params *csi_params)
> > +					  unsigned int *flags, struct gb_camera_stream *streams,
> > +					  struct gb_camera_csi_params *csi_params)
> >   {
> >   	struct gb_camera *gcam = priv;
> >   	struct gb_camera_stream_config *gb_streams;
>

Thanks Alex for the review.

yeah, I understood about the indentation issue when comparing 
to other patch but fixing the indentation there results in 
another checkpatch check(CHECK: line length of 113 exceeds 100
columns) so didn't added any change over there. 

Regards,
Nandha Kumar

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

* Re: [PATCH v2 3/3] staging: greybus: bootrom: fixed prefer using ftrace warning
  2023-10-26 18:20   ` Alex Elder
@ 2023-10-28 20:25     ` Nandha Kumar Singaram
  0 siblings, 0 replies; 8+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-28 20:25 UTC (permalink / raw)
  To: Alex Elder
  Cc: Viresh Kumar, Johan Hovold, greybus-dev, linux-staging,
	linux-kernel, kumaran.4353

On Thu, Oct 26, 2023 at 01:20:47PM -0500, Alex Elder wrote:
> On 10/22/23 7:22 AM, Nandha Kumar Singaram wrote:
> > Adhere to linux coding style. Reported by checkpatch.pl:
> > WARNING: Unnecessary ftrace-like logging - prefer using ftrace
> > 
> > Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
> 
> This change looks reasonable to me, though I don't think
> ftrace provides device information.
> 
> Acked-by: Alex Elder <elder@linaro.org>
> 
> > ---
> >   drivers/staging/greybus/bootrom.c | 2 --
> >   1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
> > index a8efb86de140..79581457c4af 100644
> > --- a/drivers/staging/greybus/bootrom.c
> > +++ b/drivers/staging/greybus/bootrom.c
> > @@ -491,8 +491,6 @@ static void gb_bootrom_disconnect(struct gb_bundle *bundle)
> >   {
> >   	struct gb_bootrom *bootrom = greybus_get_drvdata(bundle);
> > -	dev_dbg(&bundle->dev, "%s\n", __func__);
> > -
> >   	gb_connection_disable(bootrom->connection);
> >   	/* Disable timeouts */
>

Thanks Alex for the review and feedback.

Regards,
Nandha Kumar

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

end of thread, other threads:[~2023-10-28 20:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-22 12:13 [PATCH v2 0/3] staging: greybus: Coding style cleanup patches Nandha Kumar Singaram
2023-10-22 12:15 ` [PATCH v2 1/3] staging: greybus: camera: Alignment should match open parenthesis Nandha Kumar Singaram
2023-10-26 18:18   ` Alex Elder
2023-10-28 20:22     ` Nandha Kumar Singaram
2023-10-22 12:18 ` [PATCH v2 2/3] staging: greybus: camera: Modify lines end with a '(' Nandha Kumar Singaram
2023-10-22 12:22 ` [PATCH v2 3/3] staging: greybus: bootrom: fixed prefer using ftrace warning Nandha Kumar Singaram
2023-10-26 18:20   ` Alex Elder
2023-10-28 20:25     ` Nandha Kumar Singaram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).