driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: wimax: fix style check warnings
@ 2021-03-05 19:55 gabriele.modena
  2021-03-06 17:26 ` Greg KH
  2021-03-13 17:35 ` [PATCH v2 0/3] " Gabriele Modena
  0 siblings, 2 replies; 6+ messages in thread
From: gabriele.modena @ 2021-03-05 19:55 UTC (permalink / raw)
  To: devel; +Cc: Gabriele Modena, trivial

From: Gabriele Modena <gabriele.modena@gmail.com>

Fix style warnings reported by checkpatch.pl on op-rfkill.c
by moving */ on a separate line in a block comment,
adding a missing blank line after declarations,
and reformatting a quoted string split across lines.

Signed-off-by: Gabriele Modena <gabriele.modena@gmail.com>
---
 drivers/staging/wimax/op-rfkill.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wimax/op-rfkill.c b/drivers/staging/wimax/op-rfkill.c
index 78b294481a59..52612ed09183 100644
--- a/drivers/staging/wimax/op-rfkill.c
+++ b/drivers/staging/wimax/op-rfkill.c
@@ -294,7 +294,8 @@ int wimax_rfkill(struct wimax_dev *wimax_dev, enum wimax_rf_state state)
 		/* While initializing, < 1.4.3 wimax-tools versions use
 		 * this call to check if the device is a valid WiMAX
 		 * device; so we allow it to proceed always,
-		 * considering the radios are all off. */
+		 * considering the radios are all off.
+		 */
 		if (result == -ENOMEDIUM && state == WIMAX_RF_QUERY)
 			result = WIMAX_RF_OFF << 1 | WIMAX_RF_OFF;
 		goto error_not_ready;
@@ -378,6 +379,7 @@ int wimax_rfkill_add(struct wimax_dev *wimax_dev)
 void wimax_rfkill_rm(struct wimax_dev *wimax_dev)
 {
 	struct device *dev = wimax_dev_to_dev(wimax_dev);
+
 	d_fnstart(3, dev, "(wimax_dev %p)\n", wimax_dev);
 	rfkill_unregister(wimax_dev->rfkill);
 	rfkill_destroy(wimax_dev->rfkill);
@@ -415,8 +417,7 @@ int wimax_gnl_doit_rfkill(struct sk_buff *skb, struct genl_info *info)
 	dev = wimax_dev_to_dev(wimax_dev);
 	result = -EINVAL;
 	if (info->attrs[WIMAX_GNL_RFKILL_STATE] == NULL) {
-		dev_err(dev, "WIMAX_GNL_RFKILL: can't find RFKILL_STATE "
-			"attribute\n");
+		dev_err(dev, "WIMAX_GNL_RFKILL: can't find RFKILL_STATE attribute\n");
 		goto error_no_pid;
 	}
 	new_state = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_STATE]);
-- 
2.11.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: wimax: fix style check warnings
  2021-03-05 19:55 [PATCH] staging: wimax: fix style check warnings gabriele.modena
@ 2021-03-06 17:26 ` Greg KH
  2021-03-13 17:35 ` [PATCH v2 0/3] " Gabriele Modena
  1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-03-06 17:26 UTC (permalink / raw)
  To: gabriele.modena; +Cc: devel, trivial

On Fri, Mar 05, 2021 at 08:55:09PM +0100, gabriele.modena@gmail.com wrote:
> From: Gabriele Modena <gabriele.modena@gmail.com>
> 
> Fix style warnings reported by checkpatch.pl on op-rfkill.c
> by moving */ on a separate line in a block comment,
> adding a missing blank line after declarations,
> and reformatting a quoted string split across lines.
> 
> Signed-off-by: Gabriele Modena <gabriele.modena@gmail.com>
> ---
>  drivers/staging/wimax/op-rfkill.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/wimax/op-rfkill.c b/drivers/staging/wimax/op-rfkill.c
> index 78b294481a59..52612ed09183 100644
> --- a/drivers/staging/wimax/op-rfkill.c
> +++ b/drivers/staging/wimax/op-rfkill.c
> @@ -294,7 +294,8 @@ int wimax_rfkill(struct wimax_dev *wimax_dev, enum wimax_rf_state state)
>  		/* While initializing, < 1.4.3 wimax-tools versions use
>  		 * this call to check if the device is a valid WiMAX
>  		 * device; so we allow it to proceed always,
> -		 * considering the radios are all off. */
> +		 * considering the radios are all off.
> +		 */
>  		if (result == -ENOMEDIUM && state == WIMAX_RF_QUERY)
>  			result = WIMAX_RF_OFF << 1 | WIMAX_RF_OFF;
>  		goto error_not_ready;
> @@ -378,6 +379,7 @@ int wimax_rfkill_add(struct wimax_dev *wimax_dev)
>  void wimax_rfkill_rm(struct wimax_dev *wimax_dev)
>  {
>  	struct device *dev = wimax_dev_to_dev(wimax_dev);
> +
>  	d_fnstart(3, dev, "(wimax_dev %p)\n", wimax_dev);
>  	rfkill_unregister(wimax_dev->rfkill);
>  	rfkill_destroy(wimax_dev->rfkill);
> @@ -415,8 +417,7 @@ int wimax_gnl_doit_rfkill(struct sk_buff *skb, struct genl_info *info)
>  	dev = wimax_dev_to_dev(wimax_dev);
>  	result = -EINVAL;
>  	if (info->attrs[WIMAX_GNL_RFKILL_STATE] == NULL) {
> -		dev_err(dev, "WIMAX_GNL_RFKILL: can't find RFKILL_STATE "
> -			"attribute\n");
> +		dev_err(dev, "WIMAX_GNL_RFKILL: can't find RFKILL_STATE attribute\n");
>  		goto error_no_pid;
>  	}
>  	new_state = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_STATE]);
> -- 
> 2.11.0
> 
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 0/3] staging: wimax: fix style check warnings
  2021-03-05 19:55 [PATCH] staging: wimax: fix style check warnings gabriele.modena
  2021-03-06 17:26 ` Greg KH
@ 2021-03-13 17:35 ` Gabriele Modena
  2021-03-13 17:35   ` [PATCH v2 1/3] staging: wimax: fix block comment style check in op-rfkill.c Gabriele Modena
                     ` (2 more replies)
  1 sibling, 3 replies; 6+ messages in thread
From: Gabriele Modena @ 2021-03-13 17:35 UTC (permalink / raw)
  To: devel; +Cc: Gabriele Modena, trivial


Fix style warnings reported by checkpatch.pl on op-rfkill.c
by moving */ on a separate line in a block comment,
adding a missing blank line after declarations,
and reformatting a quoted string split across lines.

Resubmitting so that each style warning is addressed in a separate
commit.

This patch is both an attempt to address the warnings, as well as 
a way for me to familiarise with the linux kernel contribution 
process, by following tasks proposed by a popular online challenge.



Gabriele Modena (3):
  staging: wimax: fix block comment style check in op-rfkill.c
  staging: wimax: add a blank line after declaration in op-rfkill.c
  staging: wimax: fix quoted string split across lines in op-rfkill.c

 drivers/staging/wimax/op-rfkill.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

-- 
2.11.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/3] staging: wimax: fix block comment style check in op-rfkill.c
  2021-03-13 17:35 ` [PATCH v2 0/3] " Gabriele Modena
@ 2021-03-13 17:35   ` Gabriele Modena
  2021-03-13 17:35   ` [PATCH v2 2/3] staging: wimax: add a blank line after declaration " Gabriele Modena
  2021-03-13 17:35   ` [PATCH v2 3/3] staging: wimax: fix quoted string split across lines " Gabriele Modena
  2 siblings, 0 replies; 6+ messages in thread
From: Gabriele Modena @ 2021-03-13 17:35 UTC (permalink / raw)
  To: devel; +Cc: Gabriele Modena, trivial

This commit fixes the following checkpatch.pl warning:

WARNING: Block comments use a trailing */ on a separate line
+		 * considering the radios are all off. */

Signed-off-by: Gabriele Modena <gabriele.modena@gmail.com>
---
 drivers/staging/wimax/op-rfkill.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wimax/op-rfkill.c b/drivers/staging/wimax/op-rfkill.c
index 78b294481a59..ad9d1c682ca2 100644
--- a/drivers/staging/wimax/op-rfkill.c
+++ b/drivers/staging/wimax/op-rfkill.c
@@ -294,7 +294,8 @@ int wimax_rfkill(struct wimax_dev *wimax_dev, enum wimax_rf_state state)
 		/* While initializing, < 1.4.3 wimax-tools versions use
 		 * this call to check if the device is a valid WiMAX
 		 * device; so we allow it to proceed always,
-		 * considering the radios are all off. */
+		 * considering the radios are all off.
+		 */
 		if (result == -ENOMEDIUM && state == WIMAX_RF_QUERY)
 			result = WIMAX_RF_OFF << 1 | WIMAX_RF_OFF;
 		goto error_not_ready;
-- 
2.11.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] staging: wimax: add a blank line after declaration in op-rfkill.c
  2021-03-13 17:35 ` [PATCH v2 0/3] " Gabriele Modena
  2021-03-13 17:35   ` [PATCH v2 1/3] staging: wimax: fix block comment style check in op-rfkill.c Gabriele Modena
@ 2021-03-13 17:35   ` Gabriele Modena
  2021-03-13 17:35   ` [PATCH v2 3/3] staging: wimax: fix quoted string split across lines " Gabriele Modena
  2 siblings, 0 replies; 6+ messages in thread
From: Gabriele Modena @ 2021-03-13 17:35 UTC (permalink / raw)
  To: devel; +Cc: Gabriele Modena, trivial

This commit fixes the following checkpatch.pl warning:

WARNING: Missing a blank line after declarations
+	struct device *dev = wimax_dev_to_dev(wimax_dev);
+	d_fnstart(3, dev, "(wimax_dev %p)\n", wimax_dev);

Signed-off-by: Gabriele Modena <gabriele.modena@gmail.com>
---
 drivers/staging/wimax/op-rfkill.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/wimax/op-rfkill.c b/drivers/staging/wimax/op-rfkill.c
index ad9d1c682ca2..50146f7b089e 100644
--- a/drivers/staging/wimax/op-rfkill.c
+++ b/drivers/staging/wimax/op-rfkill.c
@@ -379,6 +379,7 @@ int wimax_rfkill_add(struct wimax_dev *wimax_dev)
 void wimax_rfkill_rm(struct wimax_dev *wimax_dev)
 {
 	struct device *dev = wimax_dev_to_dev(wimax_dev);
+
 	d_fnstart(3, dev, "(wimax_dev %p)\n", wimax_dev);
 	rfkill_unregister(wimax_dev->rfkill);
 	rfkill_destroy(wimax_dev->rfkill);
-- 
2.11.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] staging: wimax: fix quoted string split across lines in op-rfkill.c
  2021-03-13 17:35 ` [PATCH v2 0/3] " Gabriele Modena
  2021-03-13 17:35   ` [PATCH v2 1/3] staging: wimax: fix block comment style check in op-rfkill.c Gabriele Modena
  2021-03-13 17:35   ` [PATCH v2 2/3] staging: wimax: add a blank line after declaration " Gabriele Modena
@ 2021-03-13 17:35   ` Gabriele Modena
  2 siblings, 0 replies; 6+ messages in thread
From: Gabriele Modena @ 2021-03-13 17:35 UTC (permalink / raw)
  To: devel; +Cc: Gabriele Modena, trivial

This commit fixes the following checkpatch.pl warning:

WARNING: quoted string split across lines
+		dev_err(dev, "WIMAX_GNL_RFKILL: can't find RFKILL_STATE "
+			"attribute\n");

Signed-off-by: Gabriele Modena <gabriele.modena@gmail.com>
---
 drivers/staging/wimax/op-rfkill.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wimax/op-rfkill.c b/drivers/staging/wimax/op-rfkill.c
index 50146f7b089e..52612ed09183 100644
--- a/drivers/staging/wimax/op-rfkill.c
+++ b/drivers/staging/wimax/op-rfkill.c
@@ -417,8 +417,7 @@ int wimax_gnl_doit_rfkill(struct sk_buff *skb, struct genl_info *info)
 	dev = wimax_dev_to_dev(wimax_dev);
 	result = -EINVAL;
 	if (info->attrs[WIMAX_GNL_RFKILL_STATE] == NULL) {
-		dev_err(dev, "WIMAX_GNL_RFKILL: can't find RFKILL_STATE "
-			"attribute\n");
+		dev_err(dev, "WIMAX_GNL_RFKILL: can't find RFKILL_STATE attribute\n");
 		goto error_no_pid;
 	}
 	new_state = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_STATE]);
-- 
2.11.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-13 17:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 19:55 [PATCH] staging: wimax: fix style check warnings gabriele.modena
2021-03-06 17:26 ` Greg KH
2021-03-13 17:35 ` [PATCH v2 0/3] " Gabriele Modena
2021-03-13 17:35   ` [PATCH v2 1/3] staging: wimax: fix block comment style check in op-rfkill.c Gabriele Modena
2021-03-13 17:35   ` [PATCH v2 2/3] staging: wimax: add a blank line after declaration " Gabriele Modena
2021-03-13 17:35   ` [PATCH v2 3/3] staging: wimax: fix quoted string split across lines " Gabriele Modena

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).