DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Weiguo Li <liwg06@foxmail.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com
Subject: Re: [PATCH] devtools/cocci: change boolean negation to bitwise negation
Date: Thu, 6 Jul 2023 11:02:45 -0700	[thread overview]
Message-ID: <20230706110245.330260fb@hermes.local> (raw)
In-Reply-To: <tencent_87824F07FB7B648445042BE686E7FE542205@qq.com>

On Fri,  4 Mar 2022 23:31:53 +0800
Weiguo Li <liwg06@foxmail.com> wrote:

> Combining boolean operator with bitwise operator is suspicious. When
> this happens, it has a chance that the bitwise negation operation is
> mistakenly written as a boolean negation operation. This script is
> used to find this kind of problems.
> 
> example:
> 	if (x & !BITS_MASK)
> changed to:
> 	if (x & ~BITS_MASK)
> 
> The idea came from a demo script in coccinelle website:
> https://coccinelle.gitlabpages.inria.fr/website/rules/notand.html
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>

This never got merged probably because it address something that is not
happening in DPDK. Ran the script and it found nothing.

Also, script adds empty blank line at EOF which cause a warning
when merging in git.

Dropping this patch as not needed.

      reply	other threads:[~2023-07-06 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 15:31 Weiguo Li
2023-07-06 18:02 ` Stephen Hemminger [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=20230706110245.330260fb@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=liwg06@foxmail.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;
as well as URLs for NNTP newsgroup(s).