From: Joe Perches <joe@perches.com>
To: Markus Elfring <Markus.Elfring@web.de>,
Julia Lawall <julia.lawall@lip6.fr>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] linux: special logic in repetitive tests
Date: Mon, 30 Mar 2020 23:57:28 -0700 [thread overview]
Message-ID: <b3c46f05b9341d06ad9f0c04f15918102e938c96.camel@perches.com> (raw)
In-Reply-To: <d4d9bd0a-6bbf-3557-0726-e46cde5c8e2e@web.de>
On Tue, 2020-03-31 at 08:28 +0200, Markus Elfring wrote:
> > There is a block of if tests against the same variable
> > in include/linux/mtd/pfow.h that likely is defective
>
> I wonder about this interpretation.
Wonder harder.
If something is (& 3) it is also either (& 2 || & 1)
so why have both below the first test?
> * How often will this implementation detail really be a “defect”?
Moderately likely.
> * Where do you stumble on difficulties to express a corresponding source code
> search pattern by the means of the semantic patch language?
#defines, shifts, masks
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next prev parent reply other threads:[~2020-03-31 7:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 6:28 [Cocci] linux: special logic in repetitive tests Markus Elfring
2020-03-31 6:57 ` Joe Perches [this message]
2020-03-31 7:12 ` Markus Elfring
2020-04-01 8:55 ` Markus Elfring
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=b3c46f05b9341d06ad9f0c04f15918102e938c96.camel@perches.com \
--to=joe@perches.com \
--cc=Markus.Elfring@web.de \
--cc=cocci@systeme.lip6.fr \
--cc=julia.lawall@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).