linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] Staging: wfx: Fix style issues with hif_rx.c
@ 2019-12-29 22:31 Matthew Hanzelik
  2019-12-29 22:51 ` Joe Perches
  2019-12-30 11:39 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Hanzelik @ 2019-12-29 22:31 UTC (permalink / raw)
  To: jerome.pouiller, gregkh; +Cc: devel, linux-kernel

Fix the 80 line limit warning on line 79 of hif_rx.c.

Also fixes the missing blank line warning on line 305 of hif_rx.c after
the declaration of size_t len.

Signed-off-by: Matthew Hanzelik <mrhanzelik@gmail.com>
---
Changes in v2
 - Make the commit message less vague.

Changes in v3
 - Place the break after the cast operator instead of breaking the line up.

 drivers/staging/wfx/hif_rx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
index 820de216be0c..b31ef02ea5d4 100644
--- a/drivers/staging/wfx/hif_rx.c
+++ b/drivers/staging/wfx/hif_rx.c
@@ -76,7 +76,8 @@ static int hif_multi_tx_confirm(struct wfx_dev *wdev, struct hif_msg *hif,
 				void *buf)
 {
 	struct hif_cnf_multi_transmit *body = buf;
-	struct hif_cnf_tx *buf_loc = (struct hif_cnf_tx *) &body->tx_conf_payload;
+	struct hif_cnf_tx *buf_loc =
+		(struct hif_cnf_tx *) &body->tx_conf_payload;
 	struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
 	int count = body->num_tx_confs;
 	int i;
@@ -302,6 +303,7 @@ static int hif_exception_indication(struct wfx_dev *wdev,
 				    struct hif_msg *hif, void *buf)
 {
 	size_t len = hif->len - 4; // drop header
+
 	dev_err(wdev->dev, "firmware exception\n");
 	print_hex_dump_bytes("Dump: ", DUMP_PREFIX_NONE, buf, len);
 	wdev->chip_frozen = 1;
--
2.24.1


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

* Re: [PATCH v3] Staging: wfx: Fix style issues with hif_rx.c
  2019-12-29 22:31 [PATCH v3] Staging: wfx: Fix style issues with hif_rx.c Matthew Hanzelik
@ 2019-12-29 22:51 ` Joe Perches
  2019-12-30 11:39 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2019-12-29 22:51 UTC (permalink / raw)
  To: Matthew Hanzelik, jerome.pouiller, gregkh; +Cc: devel, linux-kernel

On Sun, 2019-12-29 at 17:31 -0500, Matthew Hanzelik wrote:
> Fix the 80 line limit warning on line 79 of hif_rx.c.
> 
> Also fixes the missing blank line warning on line 305 of hif_rx.c after
> the declaration of size_t len.
[]
> diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
[]
> @@ -76,7 +76,8 @@ static int hif_multi_tx_confirm(struct wfx_dev *wdev, struct hif_msg *hif,
>  				void *buf)
>  {
>  	struct hif_cnf_multi_transmit *body = buf;
> -	struct hif_cnf_tx *buf_loc = (struct hif_cnf_tx *) &body->tx_conf_payload;
> +	struct hif_cnf_tx *buf_loc =
> +		(struct hif_cnf_tx *) &body->tx_conf_payload;

Just get rid of the cast instead

	struct hif_cnf_tx *buf_loc = body->tx_conf_payload;

should work fine.



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

* Re: [PATCH v3] Staging: wfx: Fix style issues with hif_rx.c
  2019-12-29 22:31 [PATCH v3] Staging: wfx: Fix style issues with hif_rx.c Matthew Hanzelik
  2019-12-29 22:51 ` Joe Perches
@ 2019-12-30 11:39 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2019-12-30 11:39 UTC (permalink / raw)
  To: Matthew Hanzelik; +Cc: jerome.pouiller, devel, linux-kernel

On Sun, Dec 29, 2019 at 05:31:42PM -0500, Matthew Hanzelik wrote:
> Fix the 80 line limit warning on line 79 of hif_rx.c.
> 
> Also fixes the missing blank line warning on line 305 of hif_rx.c after
> the declaration of size_t len.

When ever you use the word "also" in a patch, that is a huge hint that
this needs to be broken up into more than one patch.  Please do that
here, one patch per "thing" you are fixing.

Yes, for two tiny fixes like this it feels like overkill, but, if you
had done this, I would have been already able to take one of these
changes in my tree and you would have only had to redo the other by now
:)

thanks,

greg k-h

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

end of thread, other threads:[~2019-12-30 11:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-29 22:31 [PATCH v3] Staging: wfx: Fix style issues with hif_rx.c Matthew Hanzelik
2019-12-29 22:51 ` Joe Perches
2019-12-30 11:39 ` Greg KH

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).