From: Joe Perches <joe@perches.com>
To: Jaya Durga <rjdurga@gmail.com>, gregkh@linuxfoundation.org
Cc: sergio.paracuellos@gmail.com, juliana.orod@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Jaya Durga <jayad@cdac.in>
Subject: Re: [PATCH v2 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong
Date: Thu, 29 Jun 2017 06:22:37 -0700 [thread overview]
Message-ID: <1498742557.8633.12.camel@perches.com> (raw)
In-Reply-To: <1498741260-23676-7-git-send-email-rjdurga@gmail.com>
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, */
prev parent reply other threads:[~2017-06-29 13:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498742557.8633.12.camel@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jayad@cdac.in \
--cc=juliana.orod@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rjdurga@gmail.com \
--cc=sergio.paracuellos@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox