staging: greybus: address minor styling issues
v4 cover staging: greybus: address minor styling issues
Changed in v5:
- Rebase the patchset onto gregkh's staging source tree
- Decouple unrelevant patches to two separate commits
Ioannis Valasakis (5):
staging: greybus: align parameters to parentheses
staging: greybus: shorten comparison to NULL
staging: greybus: insert blank line after struct
staging: greybus correct SPDX License 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 · 6 lines
2.19.1 -- ta ioannis
PATCH v4 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/core.c +2 -2
@@ -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))
@@ -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 v4 2/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 v4 2/5] staging: greybus: shorten comparison to NULL
Quoted 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)
This seems to have the right start and end now.
Quoted 10 lines
drivers/staging/greybus/core.c +0
-1return NULL ; for (; id->vendor || id->product || id->class || id->driver_info; --2.19.1
--
ta
ioannis
You don't need to put anything down here.
julia
Quoted 8 lines
--
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/f4c8e02349e53545f542f02e453bf18f340ed897.1541246060.git.code%40wizofe.uk.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH v4 2/5] staging: greybus: shorten comparison to NULL
Quoted 37 lines · Julia Lawall
Review
Quoted 9 lines · Ioannis Valasakis
Shorten pointer NULL check by simple truth test
Reported by checkpatch.Signed-off-by Ioannis Valasakis <[email protected] <javascript:>>---
drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/staging/greybus/core.cdrivers/staging/greybus/core.c static bool greybus_match_one_id(struct gb_bundle
Quoted 4 lines
index
6b1f3a27fa9d..d6b0d49130c0100644drivers/staging/greybus/core.c +0
-0@@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle*bundle,
drivers/staging/greybus/core.c static bool greybus_match_one_id(struct gb_bundle · line 49
Quoted 2 lines
drivers/staging/greybus/core.c +0
-0static const struct greybus_bundle_id * greybus_match_id(struct gb_bundle *bundle, const struct
greybus_bundle_id*id)drivers/staging/greybus/core.c static bool greybus_match_one_id(struct gb_bundle *bundle, · line 51
Quoted 3 lines
drivers/staging/greybus/core.c +1
-1{ -if (id ==NULL ) +if (!id)This seems to have the right start and end now.
drivers/staging/greybus/core.c static bool greybus_match_one_id(struct gb_bundle *bundle,
Quoted 3 lines
drivers/staging/greybus/core.c +0
-0return NULL ; for (; id->vendor || id->product || id->class ||
id->driver_info;Quoted 4 lines
Signature · 1 line
2.19.1
Quoted 9 lines
Quoted 3 lines
Signature · 2 lines
ta ioannisYou don't need to put anything down here.
julia
Can I leave it as it is or does my signature need to be removed in order to be approved? :)
And if so, should I just send a new version just for this patch or for the whole patchset?
thanks!
Quoted 14 lines
Quoted 3 lines
Signature · 2 lines
-- You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected] <javascript:>.
Quoted 1 line
To post to this group, send email to [email protected]
<javascript:>.
Quoted 1 line
To view this discussion on the web visit
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH v4 2/5] staging: greybus: shorten comparison to NULL
Quoted 46 lines · On Sat, 3 Nov 2018, [email protected] wrote:
On Saturday, November 3, 2018 at 2:13:49 PM UTC, Julia Lawall wrote:
On Sat, 3 Nov 2018, Ioannis Valasakis wrote: > 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(-) > > diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c > index 6b1f3a27fa9d..d6b0d49130c0 100644 > --- a/drivers/staging/greybus/core.c > +++ b/drivers/staging/greybus/core.c > @@ -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) This seems to have the right start and end now. > return NULL; > > for (; id->vendor || id->product || id->class || id->driver_info; > -- > 2.19.1 > > > -- > ta > ioannis You don't need to put anything down here. julia
Quoted 2 lines
Can I leave it as it is or does my signature need to be removed in order to be approved? :)
I think it is ok, because diffs include line numbers, so it knows how many lines to take into account, and ignores the rest.
julia
Quoted 28 lines
And if so, should I just send a new version just for this patch or for the
whole patchset?
thanks!
>
> --
> 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 visithttps://groups.google.com/d/msgid/outreachy-kernel/f4c8e02349e53545f542f02e 453bf18f340ed897.1541246060.git.code%40wizofe.uk.
> For more options, visit https://groups.google.com/d/optout.
>--
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 visithttps://groups.google.com/d/msgid/outreachy-kernel/9a45b0e8-7715-44b5-a3dc- 347277102d30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PATCH v4 3/5 staging: greybus: insert blank line after struct
In reply to Ioannis ValasakisInsert 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 v4 4/5 staging: greybus correct SPDX License Identifier
In reply to Ioannis ValasakisCorrect the SPDX License Identifiers by replacing the comment to C-style comment. 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 v4 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 · 6 lines
2.19.1 -- ta ioannis