All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Staging: greybus: Fix various checkpatch.pl issues
@ 2019-02-25 15:35 Bhanusree Pola
  2019-02-25 15:35 ` [PATCH v3 1/4] Staging: greybus: Alignment should match open paranthesis Bhanusree Pola
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Bhanusree Pola @ 2019-02-25 15:35 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: Greg Kroah-Hartman, Vaibhav Hiremath, Mark Greer, Johan Hovold,
	Alex Elder clear

Staging: greybus: Fix various checkpatch.pl issuesThis patch series cleans various checkpatch.pl issues
CHECK: Alignment should match open parenthesis
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Please use a blank line after function/struct/union/enum declarations
CHECK: Please don't use multiple blank lines

v2:
   [PATCH 1/4]: Commit log modified
   [PATCH 2/4]: Commit log modified
   [PATCH 3/4]: Commit log modified
   [PATCH 4/4]: Commit log modified
v3:
  Include all the mailing list

Bhanusree Pola (4):
  Staging: greybus: Alignment should match open paranthesis
  Staging: greybus: Blank lines not required before '}'
  Staging: greybus: Use a blank line after declarations
  Staging: greybus: Do not use multiple blank lines

 drivers/staging/greybus/audio_topology.c | 1 -
 drivers/staging/greybus/bundle.c         | 2 +-
 drivers/staging/greybus/bundle.h         | 1 +
 drivers/staging/greybus/connection.h     | 2 +-
 drivers/staging/greybus/control.c        | 1 -
 drivers/staging/greybus/control.h        | 1 +
 drivers/staging/greybus/core.c           | 2 +-
 7 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.17.1



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

* [PATCH v3 1/4] Staging: greybus: Alignment should match open paranthesis
  2019-02-25 15:35 [PATCH v3 0/4] Staging: greybus: Fix various checkpatch.pl issues Bhanusree Pola
@ 2019-02-25 15:35 ` Bhanusree Pola
  2019-02-25 15:35 ` [PATCH v3 2/4] Staging: greybus: Blank lines not required before '}' Bhanusree Pola
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Bhanusree Pola @ 2019-02-25 15:35 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: Greg Kroah-Hartman, Vaibhav Hiremath, Mark Greer, Johan Hovold,
	Alex Elder clear

Clean checkpatch.pl issue in various files:
CHECK: Alignment should match open parenthesis

Adjust parameters to match alignment with open paranthesis

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>

---
 drivers/staging/greybus/bundle.c     | 2 +-
 drivers/staging/greybus/connection.h | 2 +-
 drivers/staging/greybus/core.c       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index 81c018da1248..e97b2b87ba47 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -65,7 +65,7 @@ static struct attribute *bundle_attrs[] = {
 ATTRIBUTE_GROUPS(bundle);
 
 static struct gb_bundle *gb_bundle_find(struct gb_interface *intf,
-							u8 bundle_id)
+					u8 bundle_id)
 {
 	struct gb_bundle *bundle;
 
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h
index 8deeb1d5f008..5ca3befc0636 100644
--- a/drivers/staging/greybus/connection.h
+++ b/drivers/staging/greybus/connection.h
@@ -88,7 +88,7 @@ void gb_connection_mode_switch_prepare(struct gb_connection *connection);
 void gb_connection_mode_switch_complete(struct gb_connection *connection);
 
 void greybus_data_rcvd(struct gb_host_device *hd, u16 cport_id,
-			u8 *data, size_t length);
+		       u8 *data, size_t length);
 
 void gb_connection_latency_tag_enable(struct gb_connection *connection);
 void gb_connection_latency_tag_disable(struct gb_connection *connection);
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index 412337daf45c..d6b0d49130c0 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -266,7 +266,7 @@ static int greybus_remove(struct device *dev)
 }
 
 int greybus_register_driver(struct greybus_driver *driver, struct module *owner,
-		const char *mod_name)
+			    const char *mod_name)
 {
 	int retval;
 
-- 
2.17.1



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

* [PATCH v3 2/4] Staging: greybus: Blank lines not required before '}'
  2019-02-25 15:35 [PATCH v3 0/4] Staging: greybus: Fix various checkpatch.pl issues Bhanusree Pola
  2019-02-25 15:35 ` [PATCH v3 1/4] Staging: greybus: Alignment should match open paranthesis Bhanusree Pola
@ 2019-02-25 15:35 ` Bhanusree Pola
  2019-02-25 15:35 ` [PATCH v3 3/4] Staging: greybus: Use a blank line after declarations Bhanusree Pola
  2019-02-25 15:35 ` [PATCH v3 4/4] Staging: greybus: Do not use multiple blank lines Bhanusree Pola
  3 siblings, 0 replies; 6+ messages in thread
From: Bhanusree Pola @ 2019-02-25 15:35 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: Greg Kroah-Hartman, Vaibhav Hiremath, Mark Greer, Johan Hovold,
	Alex Elder clear

Remove blank line to resolve checkpatch.pl issue:
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
---
 drivers/staging/greybus/audio_topology.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
index 8bcbc3c4588c..4ac30accf226 100644
--- a/drivers/staging/greybus/audio_topology.c
+++ b/drivers/staging/greybus/audio_topology.c
@@ -923,7 +923,6 @@ static int gbaudio_tplg_create_wcontrol(struct gbaudio_module_info *gb,
 		break;
 	default:
 		return -EINVAL;
-
 	}
 
 	dev_dbg(gb->dev, "%s:%d DAPM control created, ret:%d\n", ctl->name,
-- 
2.17.1



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

* [PATCH v3 3/4] Staging: greybus: Use a blank line after declarations
  2019-02-25 15:35 [PATCH v3 0/4] Staging: greybus: Fix various checkpatch.pl issues Bhanusree Pola
  2019-02-25 15:35 ` [PATCH v3 1/4] Staging: greybus: Alignment should match open paranthesis Bhanusree Pola
  2019-02-25 15:35 ` [PATCH v3 2/4] Staging: greybus: Blank lines not required before '}' Bhanusree Pola
@ 2019-02-25 15:35 ` Bhanusree Pola
  2019-02-26 10:45   ` Greg Kroah-Hartman
  2019-02-25 15:35 ` [PATCH v3 4/4] Staging: greybus: Do not use multiple blank lines Bhanusree Pola
  3 siblings, 1 reply; 6+ messages in thread
From: Bhanusree Pola @ 2019-02-25 15:35 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: Greg Kroah-Hartman, Vaibhav Hiremath, Mark Greer, Johan Hovold,
	Alex Elder clear

Clean checkpatch.pl issue:
CHECK: Please use a blank line after function/struct/union/enum declarations
Insert blank line after declarations in bundle.h and control.h files.

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
---
 drivers/staging/greybus/bundle.h  | 1 +
 drivers/staging/greybus/control.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/staging/greybus/bundle.h b/drivers/staging/greybus/bundle.h
index 8734d2055657..4aaf7a0880fd 100644
--- a/drivers/staging/greybus/bundle.h
+++ b/drivers/staging/greybus/bundle.h
@@ -31,6 +31,7 @@ struct gb_bundle {
 
 	struct list_head	links;	/* interface->bundles */
 };
+
 #define to_gb_bundle(d) container_of(d, struct gb_bundle, dev)
 
 /* Greybus "private" definitions" */
diff --git a/drivers/staging/greybus/control.h b/drivers/staging/greybus/control.h
index 3a29ec05f631..5a45d55349a1 100644
--- a/drivers/staging/greybus/control.h
+++ b/drivers/staging/greybus/control.h
@@ -24,6 +24,7 @@ struct gb_control {
 	char *vendor_string;
 	char *product_string;
 };
+
 #define to_gb_control(d) container_of(d, struct gb_control, dev)
 
 struct gb_control *gb_control_create(struct gb_interface *intf);
-- 
2.17.1



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

* [PATCH v3 4/4] Staging: greybus: Do not use multiple blank lines
  2019-02-25 15:35 [PATCH v3 0/4] Staging: greybus: Fix various checkpatch.pl issues Bhanusree Pola
                   ` (2 preceding siblings ...)
  2019-02-25 15:35 ` [PATCH v3 3/4] Staging: greybus: Use a blank line after declarations Bhanusree Pola
@ 2019-02-25 15:35 ` Bhanusree Pola
  3 siblings, 0 replies; 6+ messages in thread
From: Bhanusree Pola @ 2019-02-25 15:35 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: Greg Kroah-Hartman, Vaibhav Hiremath, Mark Greer, Johan Hovold,
	Alex Elder clear

Remove unnecessary blank line
issue found with checkpatch.pl:
CHECK: Please don't use multiple blank lines

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
---
 drivers/staging/greybus/control.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c
index ffa41d31896d..a9e8b6036cac 100644
--- a/drivers/staging/greybus/control.c
+++ b/drivers/staging/greybus/control.c
@@ -15,7 +15,6 @@
 #define GB_CONTROL_VERSION_MAJOR	0
 #define GB_CONTROL_VERSION_MINOR	1
 
-
 static int gb_control_get_version(struct gb_control *control)
 {
 	struct gb_interface *intf = control->connection->intf;
-- 
2.17.1



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

* Re: [PATCH v3 3/4] Staging: greybus: Use a blank line after declarations
  2019-02-25 15:35 ` [PATCH v3 3/4] Staging: greybus: Use a blank line after declarations Bhanusree Pola
@ 2019-02-26 10:45   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-02-26 10:45 UTC (permalink / raw)
  To: Bhanusree Pola
  Cc: outreachy-kernel, Vaibhav Hiremath, Mark Greer, Johan Hovold,
	Alex Elder clear

On Mon, Feb 25, 2019 at 09:05:45PM +0530, Bhanusree Pola wrote:
> Clean checkpatch.pl issue:
> CHECK: Please use a blank line after function/struct/union/enum declarations
> Insert blank line after declarations in bundle.h and control.h files.
> 
> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
> ---
>  drivers/staging/greybus/bundle.h  | 1 +
>  drivers/staging/greybus/control.h | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/greybus/bundle.h b/drivers/staging/greybus/bundle.h
> index 8734d2055657..4aaf7a0880fd 100644
> --- a/drivers/staging/greybus/bundle.h
> +++ b/drivers/staging/greybus/bundle.h
> @@ -31,6 +31,7 @@ struct gb_bundle {
>  
>  	struct list_head	links;	/* interface->bundles */
>  };
> +
>  #define to_gb_bundle(d) container_of(d, struct gb_bundle, dev)

This is one place where the coding "guidelines" don't make sense.  We do
a lot of #define with container_of right after a structure to make it
obvious that this is to be used with that structure.  It's a common
pattern in the kernel, so this is fine as-is.

thanks,

greg k-h


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

end of thread, other threads:[~2019-02-26 10:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25 15:35 [PATCH v3 0/4] Staging: greybus: Fix various checkpatch.pl issues Bhanusree Pola
2019-02-25 15:35 ` [PATCH v3 1/4] Staging: greybus: Alignment should match open paranthesis Bhanusree Pola
2019-02-25 15:35 ` [PATCH v3 2/4] Staging: greybus: Blank lines not required before '}' Bhanusree Pola
2019-02-25 15:35 ` [PATCH v3 3/4] Staging: greybus: Use a blank line after declarations Bhanusree Pola
2019-02-26 10:45   ` Greg Kroah-Hartman
2019-02-25 15:35 ` [PATCH v3 4/4] Staging: greybus: Do not use multiple blank lines Bhanusree Pola

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.