staging: greybus Address minor styling issues
v3 cover staging: greybus Address minor styling issues
Changes to v3:
- Pointer comparison to NULL is corrected
Ioannis Valasakis (5):
staging: greybus Align parameters to parentheses
staging: greybus Add a blank line after declaration
staging: greybus Fix SPDX identifier
staging: greybus Align arguments with parentheses
staging: greybus Shorten comparison to NULL
drivers/staging/greybus/control.h | 5 +++-- drivers/staging/greybus/core.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-)
Signature · 6 lines
2.19.1 -- ta ioannis
PATCH v3 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 · 6 lines
2.19.1 -- ta ioannis
PATCH v3 2/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 · 6 lines
2.19.1 -- ta ioannis
PATCH v3 3/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 · 6 lines
2.19.1 -- ta ioannis
PATCH v3 4/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 · 6 lines
2.19.1 -- ta ioannis
PATCH v3 5/5 staging: greybus Shorten comparison to NULL
In reply to Ioannis ValasakisShorten pointer NULL check by simple truth 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 · 6 lines
2.19.1 -- ta ioannis
Re: [Outreachy kernel] [PATCH v3 1/5] staging: greybus Align parameters to parentheses
In reply to Ioannis ValasakisQuoted 9 lines · Ioannis Valasakis
(quoted diff) +0
-0@@ -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 )return NULL; for (; id->vendor || id->product || id->class || id->driver_info;
This still looks broken.
--
Thanks,
Sasha
Re: [Outreachy kernel] [PATCH v3 5/5] staging: greybus Shorten comparison to NULL
In reply to Ioannis ValasakisQuoted 13 lines · Ioannis Valasakis
Shorten pointer NULL check by simple truth test
Reported by checkpatch.Signed-off-by Ioannis Valasakis <[email protected]>--- drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/greybus/core.c +0
-0
drivers/staging/greybus/core.c static bool greybus_match_one_id(struct gb_bundle *bundle, · line 51
Quoted 5 lines
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)
I don't think the original code was if (!id == NULL)
Signature · 4 lines
Himanshu Jha Undergraduate Student Department of Electronics & Communication Guru Tegh Bahadur Institute of Technology
Re: [Outreachy kernel] [PATCH v3 5/5] staging: greybus Shorten comparison to NULL
Quoted 9 lines · Himanshu Jha
Quoted 8 lines · Ioannis Valasakis
Shorten pointer NULL check by simple truth test
Reported by checkpatch.Signed-off-by Ioannis Valasakis <[email protected]>--- drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines
drivers/staging/greybus/core.c static bool greybus_match_one_id(struct gb_bundle *bundle, · line 51
Quoted 10 lines
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)I don't think the original code was
if (!id == NULL)
As Himanshu says, you need to start with Greg's tree. If you don't feel that you have the git commands down to do that, then just destroy your tree and start over.
julia
Re: [Outreachy kernel] [PATCH v3 1/5] staging: greybus Align parameters to parentheses
In reply to Ioannis ValasakisQuoted 22 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))
drivers/staging/greybus/core.c static bool greybus_match_one_id(struct gb_bundle *bundle, · line 51
Quoted 5 lines
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 ==NULL )
This change is still wrong and is still not coveredby the log message.
I think it would be better to start over rather than trying to fix up this series, because it is not progressing.
julia
Quoted 27 lines
drivers/staging/greybus/core.c +1
-2return 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; --2.19.1
--
ta
ioannis--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/537e6bd9f572df1cce6fc8624471a9c7c2714c35.1541194567.git.code%40wizofe.uk.
For more options, visit https://groups.google.com/d/optout.