From: der.herr@hofr.at (Nicholas Mc Guire)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH RFC V2] coccinelle: flag constants being passed for jiffies
Date: Sun, 14 Jun 2015 09:34:35 +0200 [thread overview]
Message-ID: <20150614073435.GA30149@opentech.at> (raw)
In-Reply-To: <alpine.DEB.2.02.1506140900580.2085@localhost6.localdomain6>
On Sun, 14 Jun 2015, Julia Lawall wrote:
> > + at script:python depends on report@
> > +p << cc.p;
> > +timeout << cc.C;
> > +@@
> > +
> > +if str.isdigit(timeout):
> > + if (int(timeout) != 1):
> > + msg = "WARNING: timeout (%s) seems HZ dependent" % (timeout)
> > + coccilib.report.print_report(p[0], msg)
>
> The parentheses in the warning messages around the timeouts seem a little
> strange to me.
>
should be \"%s\" I guess - will fix that and the other findings - just waiting
for feedback if it makes any sense at all to include something like this.
> Otherwise, as a semantic patch, it looks fine. I can't judge the problem
> being solved though.
>
it found aproximately 30 cases in the kernel some of which have been fixed
already and none seem to be false postitives - the hardcoded "2"
really being the only open issue if those should be counted as false-postitives
and filtered.
I'm not aware of any case in the kernel where the passing of a jiffies value
is intentionally HZ dependent - so I guess atleast warning on this
makes sense.
Anyway it might also make more sense to put something like this
into one of the build-bots rather than push it into mainline for general
use.
thx!
hofrat
WARNING: multiple messages have this Message-ID (diff)
From: Nicholas Mc Guire <der.herr@hofr.at>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Nicholas Mc Guire <hofrat@osadl.org>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Nicolas Palix <nicolas.palix@imag.fr>,
Michal Marek <mmarek@suse.cz>, Joe Perches <joe@perches.com>,
Andy Whitcroft <apw@canonical.com>,
John Stultz <john.stultz@linaro.org>,
cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC V2] coccinelle: flag constants being passed for jiffies
Date: Sun, 14 Jun 2015 09:34:35 +0200 [thread overview]
Message-ID: <20150614073435.GA30149@opentech.at> (raw)
In-Reply-To: <alpine.DEB.2.02.1506140900580.2085@localhost6.localdomain6>
On Sun, 14 Jun 2015, Julia Lawall wrote:
> > +@script:python depends on report@
> > +p << cc.p;
> > +timeout << cc.C;
> > +@@
> > +
> > +if str.isdigit(timeout):
> > + if (int(timeout) != 1):
> > + msg = "WARNING: timeout (%s) seems HZ dependent" % (timeout)
> > + coccilib.report.print_report(p[0], msg)
>
> The parentheses in the warning messages around the timeouts seem a little
> strange to me.
>
should be \"%s\" I guess - will fix that and the other findings - just waiting
for feedback if it makes any sense at all to include something like this.
> Otherwise, as a semantic patch, it looks fine. I can't judge the problem
> being solved though.
>
it found aproximately 30 cases in the kernel some of which have been fixed
already and none seem to be false postitives - the hardcoded "2"
really being the only open issue if those should be counted as false-postitives
and filtered.
I'm not aware of any case in the kernel where the passing of a jiffies value
is intentionally HZ dependent - so I guess atleast warning on this
makes sense.
Anyway it might also make more sense to put something like this
into one of the build-bots rather than push it into mainline for general
use.
thx!
hofrat
next prev parent reply other threads:[~2015-06-14 7:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 17:09 [Cocci] [PATCH RFC V2] coccinelle: flag constants being passed for jiffies Nicholas Mc Guire
2015-06-12 17:09 ` Nicholas Mc Guire
2015-06-14 6:49 ` [Cocci] " Julia Lawall
2015-06-14 6:49 ` Julia Lawall
2015-06-14 7:02 ` [Cocci] " Julia Lawall
2015-06-14 7:02 ` Julia Lawall
2015-06-14 7:34 ` Nicholas Mc Guire [this message]
2015-06-14 7:34 ` Nicholas Mc Guire
2015-06-14 7:44 ` [Cocci] " Julia Lawall
2015-06-14 7:44 ` Julia Lawall
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=20150614073435.GA30149@opentech.at \
--to=der.herr@hofr.at \
--cc=cocci@systeme.lip6.fr \
/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.