All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is  usually wrong
@ 2017-06-29 13:01 Jaya Durga
  2017-06-29 13:22 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Jaya Durga @ 2017-06-29 13:01 UTC (permalink / raw)
  To: gregkh
  Cc: sergio.paracuellos, juliana.orod, devel, linux-kernel,
	Jaya Durga, Jaya Durga

Fix checkpatch.pl issue
WARNING: Use of volatile is usually wrong:
see Documentation/process/volatile-considered-harmful.rst

The variables in the private data that are
marked volatile don't need to be. Remove the volatile.

Signed-off-by: Jaya Durga <jayad@cdac.in>
---
 drivers/staging/wlan-ng/hfa384x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 310e2c4..015945f 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -1175,7 +1175,7 @@ struct hfa384x_usbctlx {
 	enum ctlx_state state;	/* Tracks running state */
 
 	struct completion done;
-	volatile int reapable;	/* Food for the reaper task */
+	int reapable;	/* Food for the reaper task */
 
 	ctlx_cmdcb_t cmdcb;	/* Async command callback */
 	ctlx_usercb_t usercb;	/* Async user callback, */
-- 
1.9.1

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

* Re: [PATCH v2 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is  usually wrong
  2017-06-29 13:01 [PATCH v2 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong Jaya Durga
@ 2017-06-29 13:22 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2017-06-29 13:22 UTC (permalink / raw)
  To: Jaya Durga, gregkh
  Cc: sergio.paracuellos, juliana.orod, devel, linux-kernel, Jaya Durga

On Thu, 2017-06-29 at 18:31 +0530, Jaya Durga wrote:
> Fix checkpatch.pl issue
> WARNING: Use of volatile is usually wrong:
> see Documentation/process/volatile-considered-harmful.rst
> 
> The variables in the private data that are
> marked volatile don't need to be. Remove the volatile.

If you examine the code that uses reapable,
it appears reapable should not be an int
but instead should be an enum cmd_mode.

> diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
[]
> @@ -1175,7 +1175,7 @@ struct hfa384x_usbctlx {
>  	enum ctlx_state state;	/* Tracks running state */
>  
>  	struct completion done;
> -	volatile int reapable;	/* Food for the reaper task */
> +	int reapable;	/* Food for the reaper task */
>  
>  	ctlx_cmdcb_t cmdcb;	/* Async command callback */
>  	ctlx_usercb_t usercb;	/* Async user callback, */

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

end of thread, other threads:[~2017-06-29 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 13:01 [PATCH v2 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong Jaya Durga
2017-06-29 13:22 ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.