staging: greybus Addressed minor styling issues
v2 cover staging: greybus Addressed minor styling issues
Changes in v2:
- Ammend commit messages per recommendation of julia
- Correct typo on type per note from gregkh
Ioannis Valasakis (5):
staging: greybus Align parameters to parentheses
staging: greybus Shorten comparison to NULL
staging: greybus Add a blank line after declaration
staging: greybus Fix SPDX identifier
staging: greybus Align arguments with parentheses
drivers/staging/greybus/control.h | 5 +++-- drivers/staging/greybus/core.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-)
Signature · 1 line
2.19.1
PATCH v2 1/5 staging: greybus Align parameters to parentheses
Align parameters to the right side of the left parentheses Reported by checkpatch.
--- drivers/staging/greybus/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/greybus/core.c +3 -3
@@ -28,7 +28,7 @@ int greybus_disabled(void)EXPORT_SYMBOL_GPL (greybus_disabled);static bool greybus_match_one_id (struct gb_bundle *bundle, -const struct greybus_bundle_id *id) +const struct greybus_bundle_id *id) {if ((id->match_flags &GREYBUS_ID_MATCH_VENDOR ) && (id->vendor != bundle->intf->vendor_id))
@@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle,static const struct greybus_bundle_id *greybus_match_id (struct gb_bundle *bundle,const struct greybus_bundle_id *id) { -if (id ==NULL ) +if (!id ==NULL )return NULL ; for (; id->vendor || id->product || id->class || id->driver_info;
@@ -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.19.1
Re: [Outreachy kernel] [PATCH v2 1/5] staging: greybus Align parameters to parentheses
Quoted 27 lines · Ioannis Valasakis
Align parameters to the right side of the left parentheses Reported by checkpatch.
Signed-off-by Ioannis Valasakis <[email protected]>---
drivers/staging/greybus/core.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/greybus/core.c +1
-1@@ -28,7 +28,7 @@ int greybus_disabled(void)EXPORT_SYMBOL_GPL (greybus_disabled);static bool greybus_match_one_id (struct gb_bundle *bundle, -const struct greybus_bundle_id *id) +const struct greybus_bundle_id *id) {if ((id->match_flags &GREYBUS_ID_MATCH_VENDOR ) && (id->vendor != bundle->intf->vendor_id))@@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle,static const struct
greybus_bundle_id*greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id){drivers/staging/greybus/core.c +1
-1-if (id ==NULL ) +if (!id ==NULL )
Quoted 1 line
return NULL;
This change doesn't look right. It also doesn't do what the commit log says this commit does.
--
Thanks,
Sasha
Re: [Outreachy kernel] [PATCH v2 1/5] staging: greybus Align parameters to parentheses
Quoted 33 lines · Sasha Levin
Quoted 27 lines · Ioannis Valasakis
Align parameters to the right side of the left parentheses Reported by checkpatch.
Signed-off-by Ioannis Valasakis <[email protected]>---
drivers/staging/greybus/core.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/greybus/core.c +1
-1@@ -28,7 +28,7 @@ int greybus_disabled(void)EXPORT_SYMBOL_GPL (greybus_disabled);static bool greybus_match_one_id (struct gb_bundle *bundle, -const struct greybus_bundle_id *id) +const struct greybus_bundle_id *id) {if ((id->match_flags &GREYBUS_ID_MATCH_VENDOR ) && (id->vendor != bundle->intf->vendor_id))@@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle,static const struct
greybus_bundle_id*greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id){drivers/staging/greybus/core.c +1
-1-if (id ==NULL ) +if (!id ==NULL )Quoted 1 line
return NULL;This change doesn't look right. It also doesn't do what the commit log says this commit does.
Quoted 3 lines
--
Thanks,
Sasha
Indeed, I am sending a correction to this patch.
Signature · 2 lines
ta ioannis
PATCH v2 2/5 staging: greybus Shorten comparison to NULL
In reply to Ioannis ValasakisShorten the comparison to NULL by using ! to make a NULL test Reported by checkpatch.
--- drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/core.c +1 -1
@@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle,static const struct greybus_bundle_id *greybus_match_id (struct gb_bundle *bundle,const struct greybus_bundle_id *id) { -if (!id ==NULL ) +if (!id)return NULL ; for (; id->vendor || id->product || id->class || id->driver_info;
Signature · 1 line
2.19.1
PATCH v2 3/5 staging: greybus Add a blank line after declaration
In reply to Ioannis ValasakisAdd a blank line after the struct declaration
Reported by checkpatch.
--- drivers/staging/greybus/control.h | 1 + 1 file changed, 1 insertion(+)
drivers/staging/greybus/control.h +1 -0
@@ -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.19.1
PATCH v2 4/5 staging: greybus Fix SPDX identifier
In reply to Ioannis ValasakisFix the SPDX identifier as by replacing with standard C comment the file
Reported by checkpatch
--- drivers/staging/greybus/control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/control.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus CPort control protocol *
Signature · 1 line
2.19.1
PATCH v2 5/5 staging: greybus Align arguments with parentheses
In reply to Ioannis ValasakisAlign arguments with the right side of the open left parentheses Reported by checkpatch.
--- drivers/staging/greybus/control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/control.h +1 -1
@@ -41,7 +41,7 @@ int gb_control_get_bundle_versions(struct gb_control *control);int gb_control_connected_operation (struct gb_control *control,u16 cport_id);int gb_control_disconnected_operation (struct gb_control *control,u16 cport_id);int gb_control_disconnecting_operation (struct gb_control *control, -u16 cport_id); +u16 cport_id);int gb_control_mode_switch_operation (struct gb_control *control);void gb_control_mode_switch_prepare (struct gb_control *control);void gb_control_mode_switch_complete (struct gb_control *control);
Signature · 1 line
2.19.1