Skip to contentSkip to conversation

Staging: greybus: Fix various checkpatch.pl issues

PATCH Superseded Bhanusree Pola 1 participant 5 messages Feb 25, 2019

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Staging: greybus: Fix various checkpatch.pl issues

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

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(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/4 Staging: greybus: Alignment should match open paranthesis

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

Adjust parameters to match alignment with open paranthesis

---
 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(-)
drivers/staging/greybus/bundle.c +1 -1
index 81c018da1248..e97b2b87ba47 100644
@@ -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;
 
drivers/staging/greybus/connection.h +1 -1
index 8deeb1d5f008..5ca3befc0636 100644
@@ -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);
drivers/staging/greybus/core.c +1 -1
index 412337daf45c..d6b0d49130c0 100644
@@ -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;
 
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/4 Staging: greybus: Blank lines not required before '}'

In reply to Bhanusree Pola

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

---
 drivers/staging/greybus/audio_topology.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/greybus/audio_topology.c +0 -1
index 8bcbc3c4588c..4ac30accf226 100644
@@ -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,
Signature · 1 line
2.17.1
#3 lore raw

PATCH v2 3/4 Staging: greybus: Use a blank line after declarations

In reply to Bhanusree Pola

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.

---
 drivers/staging/greybus/bundle.h  | 1 +
 drivers/staging/greybus/control.h | 1 +
 2 files changed, 2 insertions(+)
drivers/staging/greybus/bundle.h +1 -0
index 8734d2055657..4aaf7a0880fd 100644
@@ -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" */
drivers/staging/greybus/control.h +1 -0
index 3a29ec05f631..5a45d55349a1 100644
@@ -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);
Signature · 1 line
2.17.1
#4 lore raw

PATCH v2 4/4 Staging: greybus: Do not use multiple blank lines

In reply to Bhanusree Pola

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

---
 drivers/staging/greybus/control.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/greybus/control.c +0 -1
index ffa41d31896d..a9e8b6036cac 100644
@@ -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;
Signature · 1 line
2.17.1