diff mbox series

tb-maint: Document #ifdef..else..endif correctly

Message ID 20230706134314.907591-1-rjones@redhat.com
State New
Headers show
Series tb-maint: Document #ifdef..else..endif correctly | expand

Commit Message

Richard W.M. Jones July 6, 2023, 1:43 p.m. UTC
It was hard to tell from the comments whether the code applied to user
mode (CONFIG_USER_ONLY) or system mode.  Fix the comments on the #else
and #endif directives to be clearer.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
 accel/tcg/tb-maint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé July 6, 2023, 4:52 p.m. UTC | #1
On 6/7/23 15:43, Richard W.M. Jones wrote:
> It was hard to tell from the comments whether the code applied to user
> mode (CONFIG_USER_ONLY) or system mode.  Fix the comments on the #else
> and #endif directives to be clearer.
> 
> Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> ---
>   accel/tcg/tb-maint.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c
index 9566224d18..bf99a46872 100644
--- a/accel/tcg/tb-maint.c
+++ b/accel/tcg/tb-maint.c
@@ -156,7 +156,7 @@  static PageForEachNext foreach_tb_next(PageForEachNext tb,
     return NULL;
 }
 
-#else
+#else /* !CONFIG_USER_ONLY */
 /*
  * In system mode we want L1_MAP to be based on ram offsets.
  */
@@ -722,7 +722,7 @@  static void page_unlock_tb(const TranslationBlock *tb)
         }
     }
 }
-#endif /* CONFIG_USER_ONLY */
+#endif /* !CONFIG_USER_ONLY */
 
 /* flush all the translation blocks */
 static void do_tb_flush(CPUState *cpu, run_on_cpu_data tb_flush_count)