staging: greybus Various stylistic errors
cover staging: greybus Various stylistic errors
Ioannis Valasakis (5):
staging: greybus Fix styling, parenthesis matching
staging: greybus Change comparison to NULL
staging: greybus Add a blank line after declaration
staging: greybus Match with open parentheses
staging: greybus Fix SPDX identifier
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 1/5 staging: greybus Fix styling, parenthesis matching
Fix two instances where a styling issue is found. That is unmatched parentheses correct to match.
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 1/5] staging: greybus Fix styling, parenthesis matching
Quoted 2 lines · Ioannis Valasakis
Fix two instances where a styling issue is found. That is unmatched parentheses correct to match.
This makes three changes and the second one is quit incorrect. The first sentence of the log message gives no information. I don't know what s styling issue is; there are lots of them. I don't understand the second sentence, and I don't see the connection with the change that is made. It looks like Align parameters to the right side of the corresponing (.
Sorry to be picky about your English, which seems to not be your native language. I realize that of my suggestions, only "avoid fix" is the only one that is easily generalizable. Still it is important to be clear. For what you want to say, try to find an appropriate verb, and put it at the beginning of the sentence. Your messages often contain many words, with the important part coming later.
julia
Quoted 49 lines
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 +3
-4@@ -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; --2.19.1
--
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/833e98c464540e296f7a577fe672ab5c7931ee10.1541123999.git.code%40wizofe.uk.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 1/5] staging: greybus Fix styling, parenthesis matching
Quoted 14 lines · Julia Lawall
Quoted 2 lines · Ioannis Valasakis
Fix two instances where a styling issue is found. That is unmatched parentheses correct to match.
This makes three changes and the second one is quit incorrect. The first sentence of the log message gives no information. I don't know what s styling issue is; there are lots of them. I don't understand the second sentence, and I don't see the connection with the change that is made. It looks like Align parameters to the right side of the corresponing (.
Quoted 6 lines
Sorry to be picky about your English, which seems to not be your native language. I realize that of my suggestions, only "avoid fix" is the only one that is easily generalizable. Still it is important to be clear. For what you want to say, try to find an appropriate verb, and put it at the beginning of the sentence. Your messages often contain many words, with the important part coming later.
Indeed as you probably noticed, English isn't my first language. That is to say though that writting descriptive commits needs also a different approach. Don't be sorry, any room of improvement is important to be able to write more clear commit messages. Thanks for the tips!
ta
ioannis
Quoted 53 lines
julia
Quoted 49 lines
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 +3
-4@@ -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; --2.19.1
--
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/833e98c464540e296f7a577fe672ab5c7931ee10.1541123999.git.code%40wizofe.uk.
For more options, visit https://groups.google.com/d/optout.
PATCH 2/5 staging: greybus Change comparison to NULL
In reply to Ioannis ValasakisRewrite the comparison to null shortened.
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
Re: [Outreachy kernel] [PATCH 2/5] staging: greybus Change comparison to NULL
Quoted 1 line · Ioannis Valasakis
Rewrite the comparison to null shortened.
This would be more clear as Shorten the comparison to NULL. Or Use ! to make a NULL test.
julia
Quoted 31 lines
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 +1
-2@@ -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; --2.19.1
--
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/b305b4321ae1a13c4a8a6391a8db0c8cce109226.1541123999.git.code%40wizofe.uk.
For more options, visit https://groups.google.com/d/optout.
PATCH 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 4/5 staging: greybus Match with open parentheses
In reply to Ioannis ValasakisFix the arguments by open 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); +u17 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
Greg KH
maintainerRe: [PATCH 4/5] staging: greybus Match with open parentheses
Quoted 13 lines · Ioannis Valasakis
Fix the arguments by open parentheses
Reported by checkpatch.Signed-off-by Ioannis Valasakis <[email protected]>--- drivers/staging/greybus/control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/greybus/control.h +0
-0
drivers/staging/greybus/control.h int gb_control_get_bundle_versions(struct gb_control *control); · line 44
Quoted 5 lines
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); +u17 cport_id);
I don't think you built this code :(
Re: [PATCH 4/5] staging: greybus Match with open parentheses
Quoted 9 lines · Greg KH
Quoted 8 lines · Ioannis Valasakis
Fix the arguments by open parentheses
Reported by checkpatch.Signed-off-by Ioannis Valasakis <[email protected]>--- drivers/staging/greybus/control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines
drivers/staging/greybus/control.h int gb_control_get_bundle_versions(struct gb_control *control); · line 44
Quoted 10 lines
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); +u17 cport_id);I don't think you built this code :(
I did built it indeed but I didn't include the module on the make menuconfig, so I had the false impression of compiling. Silly me.
Thanks gregkh for the node.
ta
ioannis
Quoted 1 line
Re: [Outreachy kernel] Re: [PATCH 4/5] staging: greybus Match with open parentheses
Quoted 22 lines · Ioannis Valasakis
Quoted 9 lines · Greg KH
Quoted 8 lines · Ioannis Valasakis
Fix the arguments by open parentheses
Reported by checkpatch.Signed-off-by Ioannis Valasakis <[email protected]>--- drivers/staging/greybus/control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
drivers/staging/greybus/control.h int gb_control_get_bundle_versions(struct gb_control *control); · line 44
Quoted 10 lines
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); +u17 cport_id);I don't think you built this code :(
Quoted 2 lines
I did built it indeed but I didn't include the module on the make menuconfig, so I had the false impression of compiling. Silly me.
You can check for a .o file of the .c file you have modified.
julia
Quoted 15 lines
Thanks gregkh for the node.
ta
ioannisQuoted 1 line
--
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/20181102122539.GA1372%40kvasir.local.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] Re: [PATCH 4/5] staging: greybus Match with open parentheses
Quoted 26 lines · Julia Lawall
Quoted 22 lines · Ioannis Valasakis
Quoted 21 lines · Greg KH
Quoted 13 lines · Ioannis Valasakis
Fix the arguments by open parentheses
Reported by checkpatch.Signed-off-by Ioannis Valasakis <[email protected]>--- drivers/staging/greybus/control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/greybus/control.h +0
-0drivers/staging/greybus/control.h int gb_control_get_bundle_versions(struct gb_control *control); · line 44
Quoted 5 lines
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); +u17 cport_id);I don't think you built this code :(
Quoted 4 lines
Quoted 2 lines
I did built it indeed but I didn't include the module on the make menuconfig, so I had the false impression of compiling. Silly me.
You can check for a .o file of the .c file you have modified.
My local workflow for this is to do a 'make allmodconfig' to enable pretty much everything, and then just do targetted builds of subsystems I touch. In this case I would do 'make drivers/staging/greybus/'.
This way you don't have to worry about enabling the right things in menuconfig.
--
Thanks,
Sasha
Re: [Outreachy kernel] Re: [PATCH 4/5] staging: greybus Match with open parentheses
Quoted 36 lines · Sasha Levin
Quoted 26 lines · Julia Lawall
Quoted 22 lines · Ioannis Valasakis
Quoted 21 lines · Greg KH
Quoted 13 lines · Ioannis Valasakis
Fix the arguments by open parentheses
Reported by checkpatch.Signed-off-by Ioannis Valasakis <[email protected]>--- drivers/staging/greybus/control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/greybus/control.h +0
-0drivers/staging/greybus/control.h int gb_control_get_bundle_versions(struct gb_control *control); · line 44
Quoted 5 lines
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); +u17 cport_id);I don't think you built this code :(
Quoted 4 lines
Quoted 2 lines
I did built it indeed but I didn't include the module on the make menuconfig, so I had the false impression of compiling. Silly me.
You can check for a .o file of the .c file you have modified.
My local workflow for this is to do a 'make allmodconfig' to enable pretty much everything, and then just do targetted builds of subsystems I touch. In this case I would do 'make
drivers/staging/greybus/'.
Quoted 6 lines
This way you don't have to worry about enabling the right things in menuconfig.
--
Thanks,
Sasha
That is very useful, thank you! Noted.
Signature · 2 lines
ta ioannis
PATCH 5/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
Re: [Outreachy kernel] [PATCH 5/5] staging: greybus Fix SPDX identifier
Quoted 3 lines · Ioannis Valasakis
Fix the SPDX identifier as by replacing with standard C comment the file
Reported by checkpatch
Try not to use Fix in your log messages. It takes up a word and doesn't give any information. Here you could start the sentence wit Replace, and the Fix would go away.
julia
Quoted 27 lines
Signed-off-by Ioannis Valasakis <[email protected]>--- drivers/staging/greybus/control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/greybus/control.h +1
-2@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus CPort control protocol * -- 2.19.1
--
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/a37d37114de31fc8bb116bceadd2cb0fbc28f56c.1541123999.git.code%40wizofe.uk.
For more options, visit https://groups.google.com/d/optout.