* [PATCH v2 1/5] staging: greybus Align parameters to parentheses
2018-11-02 12:47 [PATCH v2 0/5] staging: greybus Addressed minor styling issues Ioannis Valasakis
@ 2018-11-02 12:48 ` Ioannis Valasakis
2018-11-02 14:26 ` [Outreachy kernel] " Sasha Levin
2018-11-02 12:48 ` [PATCH v2 2/5] staging: greybus Shorten comparison to NULL Ioannis Valasakis
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Ioannis Valasakis @ 2018-11-02 12:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh
Align parameters to the right side of the left parentheses
Reported by checkpatch.
Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
---
drivers/staging/greybus/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index dafa430d176e..d28773e06838 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 1/5] staging: greybus Align parameters to parentheses
2018-11-02 12:48 ` [PATCH v2 1/5] staging: greybus Align parameters to parentheses Ioannis Valasakis
@ 2018-11-02 14:26 ` Sasha Levin
2018-11-02 14:33 ` Ioannis Valasakis
0 siblings, 1 reply; 8+ messages in thread
From: Sasha Levin @ 2018-11-02 14:26 UTC (permalink / raw)
To: Ioannis Valasakis; +Cc: outreachy-kernel, gregkh
On Fri, Nov 02, 2018 at 12:48:01PM +0000, Ioannis Valasakis wrote:
>Align parameters to the right side of the left parentheses
>Reported by checkpatch.
>
>Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
>---
> drivers/staging/greybus/core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
>index dafa430d176e..d28773e06838 100644
>--- a/drivers/staging/greybus/core.c
>+++ b/drivers/staging/greybus/core.c
>@@ -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;
This change doesn't look right. It also doesn't do what the commit log
says this commit does.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 1/5] staging: greybus Align parameters to parentheses
2018-11-02 14:26 ` [Outreachy kernel] " Sasha Levin
@ 2018-11-02 14:33 ` Ioannis Valasakis
0 siblings, 0 replies; 8+ messages in thread
From: Ioannis Valasakis @ 2018-11-02 14:33 UTC (permalink / raw)
To: Sasha Levin; +Cc: outreachy-kernel, gregkh
On Fri, Nov 02, 2018 at 10:26:57AM -0400, Sasha Levin wrote:
> On Fri, Nov 02, 2018 at 12:48:01PM +0000, Ioannis Valasakis wrote:
> > Align parameters to the right side of the left parentheses
> > Reported by checkpatch.
> >
> > Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
> > ---
> > drivers/staging/greybus/core.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
> > index dafa430d176e..d28773e06838 100644
> > --- a/drivers/staging/greybus/core.c
> > +++ b/drivers/staging/greybus/core.c
> > @@ -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;
>
> This change doesn't look right. It also doesn't do what the commit log
> says this commit does.
>
> --
> Thanks,
> Sasha
Indeed, I am sending a correction to this patch.
--
ta
ioannis
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/5] staging: greybus Shorten comparison to NULL
2018-11-02 12:47 [PATCH v2 0/5] staging: greybus Addressed minor styling issues Ioannis Valasakis
2018-11-02 12:48 ` [PATCH v2 1/5] staging: greybus Align parameters to parentheses Ioannis Valasakis
@ 2018-11-02 12:48 ` Ioannis Valasakis
2018-11-02 12:48 ` [PATCH v2 3/5] staging: greybus Add a blank line after declaration Ioannis Valasakis
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Ioannis Valasakis @ 2018-11-02 12:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh
Shorten the comparison to NULL by using ! to make a NULL test
Reported by checkpatch.
Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
---
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 d28773e06838..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)
return NULL;
for (; id->vendor || id->product || id->class || id->driver_info;
--
2.19.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/5] staging: greybus Add a blank line after declaration
2018-11-02 12:47 [PATCH v2 0/5] staging: greybus Addressed minor styling issues Ioannis Valasakis
2018-11-02 12:48 ` [PATCH v2 1/5] staging: greybus Align parameters to parentheses Ioannis Valasakis
2018-11-02 12:48 ` [PATCH v2 2/5] staging: greybus Shorten comparison to NULL Ioannis Valasakis
@ 2018-11-02 12:48 ` Ioannis Valasakis
2018-11-02 12:48 ` [PATCH v2 4/5] staging: greybus Fix SPDX identifier Ioannis Valasakis
2018-11-02 12:49 ` [PATCH v2 5/5] staging: greybus Align arguments with parentheses Ioannis Valasakis
4 siblings, 0 replies; 8+ messages in thread
From: Ioannis Valasakis @ 2018-11-02 12:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh
Add a blank line after the struct declaration
Reported by checkpatch.
Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
---
drivers/staging/greybus/control.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/greybus/control.h b/drivers/staging/greybus/control.h
index 643ddb9e0f92..9c453e0b1b33 100644
--- a/drivers/staging/greybus/control.h
+++ b/drivers/staging/greybus/control.h
@@ -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);
--
2.19.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/5] staging: greybus Fix SPDX identifier
2018-11-02 12:47 [PATCH v2 0/5] staging: greybus Addressed minor styling issues Ioannis Valasakis
` (2 preceding siblings ...)
2018-11-02 12:48 ` [PATCH v2 3/5] staging: greybus Add a blank line after declaration Ioannis Valasakis
@ 2018-11-02 12:48 ` Ioannis Valasakis
2018-11-02 12:49 ` [PATCH v2 5/5] staging: greybus Align arguments with parentheses Ioannis Valasakis
4 siblings, 0 replies; 8+ messages in thread
From: Ioannis Valasakis @ 2018-11-02 12:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh
Fix the SPDX identifier as by replacing with standard C comment the
file
Reported by checkpatch
Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
---
drivers/staging/greybus/control.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/control.h b/drivers/staging/greybus/control.h
index 9c453e0b1b33..ebb7a2ee17dc 100644
--- a/drivers/staging/greybus/control.h
+++ b/drivers/staging/greybus/control.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus CPort control protocol
*
--
2.19.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 5/5] staging: greybus Align arguments with parentheses
2018-11-02 12:47 [PATCH v2 0/5] staging: greybus Addressed minor styling issues Ioannis Valasakis
` (3 preceding siblings ...)
2018-11-02 12:48 ` [PATCH v2 4/5] staging: greybus Fix SPDX identifier Ioannis Valasakis
@ 2018-11-02 12:49 ` Ioannis Valasakis
4 siblings, 0 replies; 8+ messages in thread
From: Ioannis Valasakis @ 2018-11-02 12:49 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh
Align arguments with the right side of the open left parentheses
Reported by checkpatch.
Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
---
drivers/staging/greybus/control.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/control.h b/drivers/staging/greybus/control.h
index ebb7a2ee17dc..5a45d55349a1 100644
--- a/drivers/staging/greybus/control.h
+++ b/drivers/staging/greybus/control.h
@@ -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);
--
2.19.1
^ permalink raw reply related [flat|nested] 8+ messages in thread