staging: most: dim2: remove volatile qualifier from struct int_ch_state
Subsystems (2)
PATCH 1/1 staging: most: dim2: remove volatile qualifier from struct int_ch_state
Remove the 'volatile' type qualifiers from request_counter and service_counter in struct int_ch_state.
According to Documentation/process/volatile-considered-harmful.rst, using volatile type qualifiers for structure members is discouraged in the kernel. Kernel locking and synchronization primitives or explicit accessors should be used instead of relying on compiler volatile semantics.
--- drivers/staging/most/dim2/hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/most/dim2/hal.h +2 -2
@@ -34,10 +34,10 @@ struct dim_ch_state {struct int_ch_state {/* changed only in interrupt context */ -volatile int request_counter; +int request_counter;/* changed only in task context */ -volatile int service_counter; +int service_counter;u8 idx1;u8 idx2;
Signature · 1 line
2.47.3
Greg Kroah-Hartman
maintainerQuoted 34 lines · Paulo Tomé
Remove the 'volatile' type qualifiers from
request_counterandservice_counterin structint_ch_state.According to
Documentation/process/volatile-considered-harmful.rst, using volatile type qualifiers for structure members is discouraged in the kernel. Kernel locking and synchronization primitives or explicit accessors should be used instead of relying on compiler volatile semantics.Signed-off-by Paulo Tomé <[email protected]>--- drivers/staging/most/dim2/hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/most/dim2/hal.h +2
-2@@ -34,10 +34,10 @@ struct dim_ch_state {struct int_ch_state {/* changed only in interrupt context */ -volatile int request_counter; +int request_counter;/* changed only in task context */ -volatile int service_counter; +int service_counter;u8 idx1;u8 idx2;Signature · 1 line
2.47.3
You usually can not just remove the 'volatile' marking like this, without actually fixing up the code at the same time. Otherwise we would have done so a long time ago :)
Please test to verify your change actually works properly for stuff like this.
thanks,
greg k-h