On 3/6/23 00:58, Philippe Mathieu-Daudé wrote:
CONFIG_SOFTMMU is the opposite of CONFIG_USER_ONLY.
Now that CONFIG_SOFTMMU isn't poisoined anymore,
replace !CONFIG_USER_ONLY negation by the positive
form which is clearer when reviewing code.

Change mostly done mechanically using:

   $ sed -i -e 's/ifndef CONFIG_USER_ONLY/ifdef CONFIG_SOFTMMU/' \
            -e 's/!defined(CONFIG_USER_ONLY)/defined(CONFIG_SOFTMMU)/' \
                $(git grep -l CONFIG_USER_ONLY)

and adapting comments manually.

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  scripts/coccinelle/round.cocci                |   6 +


diff --git a/scripts/coccinelle/round.cocci b/scripts/coccinelle/round.cocci
index ed06773289..0a27b6da4d 100644
--- a/scripts/coccinelle/round.cocci
+++ b/scripts/coccinelle/round.cocci
@@ -17,3 +17,9 @@ expression e2;
  @@
  -(DIV_ROUND_UP(e1,e2))
  +DIV_ROUND_UP(e1,e2)
+
+@@
+expression n, d;
+@@
+-   n & ~(d - 1)
++   ROUND_DOWN(n, d)

Oops, unrelated =)

Reply via email to