linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8712: Fixes coding style in several headers
@ 2020-07-16  6:41 Qiu Wenbo
  2020-07-16  7:04 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Qiu Wenbo @ 2020-07-16  6:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger, Florian Schilhabel,
	Linux Driver Project Developer List
  Cc: Qiu Wenbo, Christophe JAILLET, Nishka Dasgupta, Dan Carpenter,
	Kees Cook, Marco Villegas, devel, linux-kernel

This patch fixes warnings in several headers found by the checkpatch.pl tool.

Signed-off-by: Qiu Wenbo <qiuwenbo@phytium.com.cn>
---
 drivers/staging/rtl8712/rtl871x_event.h   | 15 ++++++++++-----
 drivers/staging/rtl8712/rtl871x_io.h      |  3 ++-
 drivers/staging/rtl8712/rtl871x_pwrctrl.h | 15 ++++++++++-----
 drivers/staging/rtl8712/rtl871x_xmit.h    | 15 ++++++++++-----
 4 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_event.h b/drivers/staging/rtl8712/rtl871x_event.h
index d9a5476d2426..0e59d0ee6aae 100644
--- a/drivers/staging/rtl8712/rtl871x_event.h
+++ b/drivers/staging/rtl8712/rtl871x_event.h
@@ -78,13 +78,16 @@ struct event_node {
 	unsigned char *node;
 	unsigned char evt_code;
 	unsigned short evt_sz;
-	/*volatile*/ int *caller_ff_tail;
+	/*volatile*/
+	int *caller_ff_tail;
 	int	caller_ff_sz;
 };
 
 struct c2hevent_queue {
-	/*volatile*/ int	head;
-	/*volatile*/ int	tail;
+	/*volatile*/
+	int	head;
+	/*volatile*/
+	int	tail;
 	struct	event_node	nodes[C2HEVENT_SZ];
 	unsigned char	seq;
 };
@@ -92,8 +95,10 @@ struct c2hevent_queue {
 #define NETWORK_QUEUE_SZ	4
 
 struct network_queue {
-	/*volatile*/ int	head;
-	/*volatile*/ int	tail;
+	/*volatile*/
+	int	head;
+	/*volatile*/
+	int	tail;
 	struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
 };
 
diff --git a/drivers/staging/rtl8712/rtl871x_io.h b/drivers/staging/rtl8712/rtl871x_io.h
index c20dd5a6bbd1..2e269b71072c 100644
--- a/drivers/staging/rtl8712/rtl871x_io.h
+++ b/drivers/staging/rtl8712/rtl871x_io.h
@@ -101,7 +101,8 @@ struct	_io_ops {
 struct io_req {
 	struct list_head list;
 	u32	addr;
-	/*volatile*/ u32	val;
+	/*volatile*/
+	u32	val;
 	u32	command;
 	u32	status;
 	u8	*pbuf;
diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.h b/drivers/staging/rtl8712/rtl871x_pwrctrl.h
index dd5a79f90b1a..e6b740c09120 100644
--- a/drivers/staging/rtl8712/rtl871x_pwrctrl.h
+++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.h
@@ -77,14 +77,19 @@ struct reportpwrstate_parm {
 
 struct	pwrctrl_priv {
 	struct mutex mutex_lock;
-	/*volatile*/ u8 rpwm; /* requested power state for fw */
+	/*volatile*/
+	u8 rpwm; /* requested power state for fw */
 	/* fw current power state. updated when 1. read from HCPWM or
 	 * 2. driver lowers power level
 	 */
-	/*volatile*/ u8 cpwm;
-	/*volatile*/ u8 tog; /* toggling */
-	/*volatile*/ u8 cpwm_tog; /* toggling */
-	/*volatile*/ u8 tgt_rpwm; /* wanted power state */
+	/*volatile*/
+	u8 cpwm;
+	/*volatile*/
+	u8 tog; /* toggling */
+	/*volatile*/
+	u8 cpwm_tog; /* toggling */
+	/*volatile*/
+	u8 tgt_rpwm; /* wanted power state */
 	uint pwr_mode;
 	uint smart_ps;
 	uint alives;
diff --git a/drivers/staging/rtl8712/rtl871x_xmit.h b/drivers/staging/rtl8712/rtl871x_xmit.h
index f227828094bf..6d2e12b35670 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.h
+++ b/drivers/staging/rtl8712/rtl871x_xmit.h
@@ -182,11 +182,16 @@ struct sta_xmit_priv {
 };
 
 struct	hw_txqueue {
-	/*volatile*/ sint	head;
-	/*volatile*/ sint	tail;
-	/*volatile*/ sint	free_sz;	/*in units of 64 bytes*/
-	/*volatile*/ sint      free_cmdsz;
-	/*volatile*/ sint	 txsz[8];
+	/*volatile*/
+	sint	head;
+	/*volatile*/
+	sint	tail;
+	/*volatile*/
+	sint	free_sz;	/*in units of 64 bytes*/
+	/*volatile*/
+	sint      free_cmdsz;
+	/*volatile*/
+	sint	 txsz[8];
 	uint	ff_hwaddr;
 	uint	cmd_hwaddr;
 	sint	ac_tag;
-- 
2.27.0


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

* Re: [PATCH] staging: rtl8712: Fixes coding style in several headers
  2020-07-16  6:41 [PATCH] staging: rtl8712: Fixes coding style in several headers Qiu Wenbo
@ 2020-07-16  7:04 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2020-07-16  7:04 UTC (permalink / raw)
  To: Qiu Wenbo
  Cc: Larry Finger, Florian Schilhabel,
	Linux Driver Project Developer List, Christophe JAILLET,
	Nishka Dasgupta, Dan Carpenter, Kees Cook, Marco Villegas, devel,
	linux-kernel

On Thu, Jul 16, 2020 at 02:41:12PM +0800, Qiu Wenbo wrote:
> This patch fixes warnings in several headers found by the checkpatch.pl tool.

What warnings specifically?

Please only fix one type of warning per patch.

> 
> Signed-off-by: Qiu Wenbo <qiuwenbo@phytium.com.cn>
> ---
>  drivers/staging/rtl8712/rtl871x_event.h   | 15 ++++++++++-----
>  drivers/staging/rtl8712/rtl871x_io.h      |  3 ++-
>  drivers/staging/rtl8712/rtl871x_pwrctrl.h | 15 ++++++++++-----
>  drivers/staging/rtl8712/rtl871x_xmit.h    | 15 ++++++++++-----
>  4 files changed, 32 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl871x_event.h b/drivers/staging/rtl8712/rtl871x_event.h
> index d9a5476d2426..0e59d0ee6aae 100644
> --- a/drivers/staging/rtl8712/rtl871x_event.h
> +++ b/drivers/staging/rtl8712/rtl871x_event.h
> @@ -78,13 +78,16 @@ struct event_node {
>  	unsigned char *node;
>  	unsigned char evt_code;
>  	unsigned short evt_sz;
> -	/*volatile*/ int *caller_ff_tail;
> +	/*volatile*/
> +	int *caller_ff_tail;

Why did you change this?  It's fine as is, and a hint something needs to
be fixed.

>  	int	caller_ff_sz;
>  };
>  
>  struct c2hevent_queue {
> -	/*volatile*/ int	head;
> -	/*volatile*/ int	tail;
> +	/*volatile*/
> +	int	head;
> +	/*volatile*/
> +	int	tail;

Same for these.



>  	struct	event_node	nodes[C2HEVENT_SZ];
>  	unsigned char	seq;
>  };
> @@ -92,8 +95,10 @@ struct c2hevent_queue {
>  #define NETWORK_QUEUE_SZ	4
>  
>  struct network_queue {
> -	/*volatile*/ int	head;
> -	/*volatile*/ int	tail;
> +	/*volatile*/
> +	int	head;
> +	/*volatile*/
> +	int	tail;
>  	struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
>  };
>  
> diff --git a/drivers/staging/rtl8712/rtl871x_io.h b/drivers/staging/rtl8712/rtl871x_io.h
> index c20dd5a6bbd1..2e269b71072c 100644
> --- a/drivers/staging/rtl8712/rtl871x_io.h
> +++ b/drivers/staging/rtl8712/rtl871x_io.h
> @@ -101,7 +101,8 @@ struct	_io_ops {
>  struct io_req {
>  	struct list_head list;
>  	u32	addr;
> -	/*volatile*/ u32	val;
> +	/*volatile*/
> +	u32	val;
>  	u32	command;
>  	u32	status;
>  	u8	*pbuf;
> diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.h b/drivers/staging/rtl8712/rtl871x_pwrctrl.h
> index dd5a79f90b1a..e6b740c09120 100644
> --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.h
> +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.h
> @@ -77,14 +77,19 @@ struct reportpwrstate_parm {
>  
>  struct	pwrctrl_priv {
>  	struct mutex mutex_lock;
> -	/*volatile*/ u8 rpwm; /* requested power state for fw */
> +	/*volatile*/
> +	u8 rpwm; /* requested power state for fw */
>  	/* fw current power state. updated when 1. read from HCPWM or
>  	 * 2. driver lowers power level
>  	 */
> -	/*volatile*/ u8 cpwm;
> -	/*volatile*/ u8 tog; /* toggling */
> -	/*volatile*/ u8 cpwm_tog; /* toggling */
> -	/*volatile*/ u8 tgt_rpwm; /* wanted power state */
> +	/*volatile*/
> +	u8 cpwm;
> +	/*volatile*/
> +	u8 tog; /* toggling */
> +	/*volatile*/
> +	u8 cpwm_tog; /* toggling */
> +	/*volatile*/
> +	u8 tgt_rpwm; /* wanted power state */
>  	uint pwr_mode;
>  	uint smart_ps;
>  	uint alives;
> diff --git a/drivers/staging/rtl8712/rtl871x_xmit.h b/drivers/staging/rtl8712/rtl871x_xmit.h
> index f227828094bf..6d2e12b35670 100644
> --- a/drivers/staging/rtl8712/rtl871x_xmit.h
> +++ b/drivers/staging/rtl8712/rtl871x_xmit.h
> @@ -182,11 +182,16 @@ struct sta_xmit_priv {
>  };
>  
>  struct	hw_txqueue {
> -	/*volatile*/ sint	head;
> -	/*volatile*/ sint	tail;
> -	/*volatile*/ sint	free_sz;	/*in units of 64 bytes*/
> -	/*volatile*/ sint      free_cmdsz;
> -	/*volatile*/ sint	 txsz[8];
> +	/*volatile*/
> +	sint	head;
> +	/*volatile*/
> +	sint	tail;
> +	/*volatile*/
> +	sint	free_sz;	/*in units of 64 bytes*/
> +	/*volatile*/
> +	sint      free_cmdsz;
> +	/*volatile*/
> +	sint	 txsz[8];
>  	uint	ff_hwaddr;
>  	uint	cmd_hwaddr;
>  	sint	ac_tag;
> -- 
> 2.27.0
> 

Actually same for all of these, the code is fine as-is.

thanks,

greg k-h

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

end of thread, other threads:[~2020-07-16  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  6:41 [PATCH] staging: rtl8712: Fixes coding style in several headers Qiu Wenbo
2020-07-16  7:04 ` Greg Kroah-Hartman

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