Staging: wlan-ng: Removed Use of volatile is usually wrong
PATCH 1/1 Staging: wlan-ng: Removed Use of volatile is usually wrong
WARNING: Use of volatile is usually wrong.
That was found by running checkpatch.
--- drivers/staging/wlan-ng/hfa384x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/hfa384x.h +1 -1
@@ -1166,7 +1166,7 @@ typedef struct hfa384x_usbctlx {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, */
Signature · 1 line
1.8.3.2
Quoted 2 lines · Melike Yurtoglu
WARNING: Use of volatile is usually wrong.
That was found by running checkpatch.
How do you know that it is wrong in this case?
julia
Quoted 29 lines
Signed-off-by Melike Yurtoglu <[email protected]>--- drivers/staging/wlan-ng/hfa384x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/wlan-ng/hfa384x.h +1
-2@@ -1166,7 +1166,7 @@ typedef struct hfa384x_usbctlx {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.8.3.2
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425059769-20058-1-git-send-email-aysemelikeyurtoglu%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
changing the value of a variable as a result of hardware affects , you need to define this variable as "volatile".
Otherwise the compiler (compiler) this variable cannot fulfill the task of optimizing could become.I thought that was so wrong
2015-02-27 20:15 GMT+02:00 Julia Lawall <[email protected]>:
Quoted 44 lines · Melike Yurtoglu
Quoted 3 lines
WARNING: Use of volatile is usually wrong.
That was found by running checkpatch.How do you know that it is wrong in this case?
julia
Review
Quoted 7 lines
Signed-off-by Melike Yurtoglu <[email protected]>--- drivers/staging/wlan-ng/hfa384x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/staging/wlan-ng/hfa384x.hQuoted 15 lines
index 8f20910..47f65c3 100644
drivers/staging/wlan-ng/hfa384x.h +1
-2@@ -1166,7 +1166,7 @@ typedef struct hfa384x_usbctlx {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.8.3.2
Quoted 2 lines
--
You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 2 lines
To post to this group, send email to [email protected]. To view this discussion on the web visit
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Quoted 4 lines · Ayşe Melike Yurtoğlu
changing the value of a variable as a result of hardware affects , you need to define this variable as "volatile".
Otherwise the compiler (compiler) this variable cannot fulfill the task of optimizing could become.I thought that was so wrong
These are general statements. You need to argue why it is not needed in this specific case.
julia
Quoted 57 lines
2015-02-27 20:15 GMT+02:00 Julia Lawall <[email protected]>:
On Fri, 27 Feb 2015, Melike Yurtoglu wrote: > WARNING: Use of volatile is usually wrong. > That was found by running checkpatch. How do you know that it is wrong in this case? julia > > Signed-off-by: Melike Yurtoglu <[email protected]> > --- > 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 8f20910..47f65c3 100644 > --- a/drivers/staging/wlan-ng/hfa384x.h > +++ b/drivers/staging/wlan-ng/hfa384x.h > @@ -1166,7 +1166,7 @@ typedef struct hfa384x_usbctlx { > 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.8.3.2 >Quoted 2 lines
--
You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
Quoted 1 line
To post to this group, send email to
Quoted 1 line
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/1425059769-20058-1-git-s
end-email-aysemelikeyurtoglu%40gmail.com.
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CAPYvaxOw3%2B5qPLe%2B8Bm 6GkmYoemcnRdSV7qH-YEseUUip-XP6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.