[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/14] exec: Drop redundant #ifdeffery

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 09/14] exec: Drop redundant #ifdeffery
Date: Sun, 15 Mar 2020 23:20:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 3/15/20 9:39 PM, Richard Henderson wrote:
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
  exec.c | 4 ----
  1 file changed, 4 deletions(-)

diff --git a/exec.c b/exec.c
index 7bc9828c5b..f258502966 100644
--- a/exec.c
+++ b/exec.c
@@ -185,10 +185,6 @@ struct DirtyBitmapSnapshot {
      unsigned long dirty[];
-#if !defined(CONFIG_USER_ONLY)
  static void phys_map_node_reserve(PhysPageMap *map, unsigned nodes)
      static unsigned alloc_hint = 16;

There's even more than that.  Looking further down,

     745 #endif
     747 #if !defined(CONFIG_USER_ONLY)

This is the #endif that paired with the one at 190.


     988 #if defined(CONFIG_USER_ONLY)
    1000 #else
    1031 #endif
    1033 #ifndef CONFIG_USER_ONLY

So those three lines are redundant.


    1252 #if !defined(CONFIG_USER_ONLY)
    1438 #endif /* defined(CONFIG_USER_ONLY) */
    1440 #if !defined(CONFIG_USER_ONLY)

Clearly these ifdefs are very hard to follow.  I would thus welcome a split of
this file.

Possibly into exec-common.c (with functions present in both softmmu and
user-only, with ifdefs *inside* functions only), and exec-system.c (with no

But exec.c is over 4000 lines, so if there's another logical split into even
more files, that would be even better.

OK, I am taking notes for the 5.0 cycle.

We can drop this patch for this series objective, as it is mostly cosmetic.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]