diff mbox series

[v2,39/42] include/system: Remove ifndef CONFIG_USER_ONLY in qtest.h

Message ID 20250318213209.2579218-40-richard.henderson@linaro.org
State New
Headers show
Series accel/tcg, codebase: Build once patches | expand

Commit Message

Richard Henderson March 18, 2025, 9:32 p.m. UTC
This is include/system, so CONFIG_USER_ONLY will never be true.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/system/qtest.h | 2 --
 1 file changed, 2 deletions(-)

Comments

Pierrick Bouvier March 19, 2025, 12:43 a.m. UTC | #1
On 3/18/25 14:32, Richard Henderson wrote:
> This is include/system, so CONFIG_USER_ONLY will never be true.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   include/system/qtest.h | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/include/system/qtest.h b/include/system/qtest.h
> index 6ddddc501b..84b1f8c6ee 100644
> --- a/include/system/qtest.h
> +++ b/include/system/qtest.h
> @@ -23,7 +23,6 @@ static inline bool qtest_enabled(void)
>       return qtest_allowed;
>   }
>   
> -#ifndef CONFIG_USER_ONLY
>   void G_GNUC_PRINTF(2, 3) qtest_sendf(CharBackend *chr, const char *fmt, ...);
>   void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words));
>   bool qtest_driver(void);
> @@ -33,6 +32,5 @@ void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error **
>   void qtest_server_set_send_handler(void (*send)(void *, const char *),
>                                    void *opaque);
>   void qtest_server_inproc_recv(void *opaque, const char *buf);
> -#endif
>   
>   #endif

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Philippe Mathieu-Daudé March 19, 2025, 7:26 a.m. UTC | #2
On 18/3/25 22:32, Richard Henderson wrote:
> This is include/system, so CONFIG_USER_ONLY will never be true.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   include/system/qtest.h | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/include/system/qtest.h b/include/system/qtest.h
> index 6ddddc501b..84b1f8c6ee 100644
> --- a/include/system/qtest.h
> +++ b/include/system/qtest.h
> @@ -23,7 +23,6 @@ static inline bool qtest_enabled(void)
>       return qtest_allowed;
>   }

IIRC the problem I had here were uses in common ARM cpus code.

i.e.:
target/arm/cpu.c:1786:     if (tcg_enabled() || qtest_enabled()) {
target/arm/cpu64.c:765:    if (tcg_enabled() || qtest_enabled()) {

I'll recheck how code evolved in your branch.
Pierrick Bouvier March 19, 2025, 5:25 p.m. UTC | #3
On 3/19/25 00:26, Philippe Mathieu-Daudé wrote:
> On 18/3/25 22:32, Richard Henderson wrote:
>> This is include/system, so CONFIG_USER_ONLY will never be true.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>    include/system/qtest.h | 2 --
>>    1 file changed, 2 deletions(-)
>>
>> diff --git a/include/system/qtest.h b/include/system/qtest.h
>> index 6ddddc501b..84b1f8c6ee 100644
>> --- a/include/system/qtest.h
>> +++ b/include/system/qtest.h
>> @@ -23,7 +23,6 @@ static inline bool qtest_enabled(void)
>>        return qtest_allowed;
>>    }
> 
> IIRC the problem I had here were uses in common ARM cpus code.
> 
> i.e.:
> target/arm/cpu.c:1786:     if (tcg_enabled() || qtest_enabled()) {
> target/arm/cpu64.c:765:    if (tcg_enabled() || qtest_enabled()) {
> 
> I'll recheck how code evolved in your branch.

qtest_enabled() visibility is not affected by this patch, so there 
should not be any change.
Only the others functions now expose their prototype.
diff mbox series

Patch

diff --git a/include/system/qtest.h b/include/system/qtest.h
index 6ddddc501b..84b1f8c6ee 100644
--- a/include/system/qtest.h
+++ b/include/system/qtest.h
@@ -23,7 +23,6 @@  static inline bool qtest_enabled(void)
     return qtest_allowed;
 }
 
-#ifndef CONFIG_USER_ONLY
 void G_GNUC_PRINTF(2, 3) qtest_sendf(CharBackend *chr, const char *fmt, ...);
 void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words));
 bool qtest_driver(void);
@@ -33,6 +32,5 @@  void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error **
 void qtest_server_set_send_handler(void (*send)(void *, const char *),
                                  void *opaque);
 void qtest_server_inproc_recv(void *opaque, const char *buf);
-#endif
 
 #endif