From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Dharmik Thakkar <dharmik.thakkar@arm.com>,
dev@dpdk.org, nd@arm.com, ruifeng.wang@arm.com,
david.marchand@redhat.com
Subject: Re: [dpdk-dev] [PATCH] checkpatch: enable volatile warning
Date: Wed, 10 Mar 2021 07:10:49 -0800 [thread overview]
Message-ID: <20210310071017.157a4105@hermes.local> (raw)
In-Reply-To: <62130884.hdUCYtv3VG@thomas>
On Wed, 10 Mar 2021 12:10:01 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:
> 10/03/2021 12:04, Dharmik Thakkar:
> > Enable volatile considered harmful warning since use of volatile
> > is suspect.
> >
> > Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> > Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
>
> git grep -w volatile | wc -l
> 1796
>
> How much is it suspect?
>
>
Many seem to be unsafe.
testpmd: uses flags values in unsafe manner
it also uses volatile when accessing hardware registers
test-alarm is expecting that alarm() is a signal
(it is not)
test-atomic is ok
test-barrier is doing barriers and not using __atomic
drivers use volatile to mark hardware registers.
It is still true volatile is not enough are not weak memory model.
next prev parent reply other threads:[~2021-03-10 15:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 11:04 [dpdk-dev] [PATCH] checkpatch: enable volatile warning Dharmik Thakkar
2021-03-10 11:10 ` Thomas Monjalon
2021-03-10 15:10 ` Stephen Hemminger [this message]
2021-08-16 13:28 ` Dharmik Thakkar
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=20210310071017.157a4105@hermes.local \
--to=stephen@networkplumber.org \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dharmik.thakkar@arm.com \
--cc=nd@arm.com \
--cc=ruifeng.wang@arm.com \
--cc=thomas@monjalon.net \
/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 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.