qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 07/26] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_prin


From: Harsh Prateek Bora
Subject: Re: [PATCH 07/26] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_info()
Date: Mon, 17 Jun 2024 18:09:24 +0530
User-agent: Mozilla Thunderbird



On 6/10/24 11:50, Philippe Mathieu-Daudé wrote:
@@ -198,13 +193,18 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, 
Monitor *mon)
          if (!xive_eas_is_masked(eas)) {
              uint32_t end_idx = xive_get_field64(EAS_END_INDEX, eas->w);
              XiveEND *end;
+            g_autoptr(GString) buf = g_string_new("");
+            g_autoptr(HumanReadableText) info = NULL;
assert(end_idx < xive->nr_ends);
              end = &xive->endt[end_idx];
if (xive_end_is_valid(end)) {
-                spapr_xive_end_pic_print_info(xive, end, mon);
+                spapr_xive_end_pic_print_info(xive, end, buf);
              }
+
+            info = human_readable_text_from_str(buf);
+            monitor_puts(mon, info->human_readable_text);
          }
          monitor_printf(mon, "\n");

Similarly, this monitor_printf could be g_stringified before doing the human_readable logic ?

Thanks
Harsh
      }



reply via email to

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