All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Joe Perches <joe@perches.com>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] linux: special logic in repetitive tests
Date: Tue, 31 Mar 2020 09:12:20 +0200	[thread overview]
Message-ID: <fdd2ff4e-599b-55ba-d37a-1876a89f2deb@web.de> (raw)
In-Reply-To: <b3c46f05b9341d06ad9f0c04f15918102e938c96.camel@perches.com>

> Wonder harder.
>
> If something is (& 3) it is also either (& 2 || & 1)
> so why have both below the first test?

I can interpret the source code example in the way that the number
of set bits are checked.
I can eventually become concerned around the preferred coding style
because of the usage of these constant values.
Would you like to check the use of bit fields?


>> * 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

You come along the usual development challenges for the safe handling
of possible code variations.
With which approach would you like to start and perform further
source code analysis?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2020-03-31  7:12 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
2020-03-31  7:12   ` Markus Elfring [this message]
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=fdd2ff4e-599b-55ba-d37a-1876a89f2deb@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=joe@perches.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 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.