Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677591 > unrolled thread

[PATCH 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong

Started byJaya Durga <rjdurga@gmail.com>
First post2017-06-29 12:40 +0200
Last post2017-06-29 14:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong Jaya Durga <rjdurga@gmail.com> - 2017-06-29 12:40 +0200
    Re: [PATCH 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is  usually wrong Frans Klaver <fransklaver@gmail.com> - 2017-06-29 14:40 +0200

#1677591 — [PATCH 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong

FromJaya Durga <rjdurga@gmail.com>
Date2017-06-29 12:40 +0200
Subject[PATCH 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong
Message-ID<tXF1D-6q9-3@gated-at.bofh.it>
Fix checkpatch.pl issue
WARNING: Use of volatile is usually wrong:
see Documentation/process/volatile-considered-harmful.rst

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

[toc] | [next] | [standalone]


#1677701 — Re: [PATCH 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong

FromFrans Klaver <fransklaver@gmail.com>
Date2017-06-29 14:40 +0200
SubjectRe: [PATCH 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong
Message-ID<tXGTL-7BQ-5@gated-at.bofh.it>
In reply to#1677591
On Thu, Jun 29, 2017 at 12:25 PM, Jaya Durga <rjdurga@gmail.com> wrote:
> Fix checkpatch.pl issue
> WARNING: Use of volatile is usually wrong:
> see Documentation/process/volatile-considered-harmful.rst

Now I've only had a very quick look at the code using this. Could you
elaborate on why just removing the volatile keyword is enough, and
that this isn't related to some smelly bit of code that should be
implemented differently?


> 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

Frans

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web