<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
On 9/11/2024 13:36, Julia Filipchuk wrote:<span style="white-space: pre-wrap">
</span>
<blockquote type="cite" cite="mid:f9fe6a1c-700c-419e-bc9c-86165b30c1f2@intel.com">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">@@ -214,6 +214,24 @@ void xe_guc_log_snapshot_print(struct xe_guc_log_snapshot *snapshot, struct drm_
}
}
+/**
+ * xe_guc_log_print_dmesg - dump a copy of the GuC log to dmesg
+ * @log: GuC log structure
+ */
+void xe_guc_log_print_dmesg(struct xe_guc_log *log)
+{
+ struct xe_gt *gt = log_to_gt(log);
+ static int g_count;
+ struct drm_printer ip = xe_gt_info_printer(gt);
+ struct drm_printer lp = drm_line_printer(&ip, "Capture", ++g_count);
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">Increment of non-assigned value "g_count". It is static so zero
allocated but suggest to assign to 0 for clarity.</pre>
</blockquote>
Assigning a static to zero will cause the checkpatch tool to
complain that you are unnecessarily providing a value that is the
default.<br>
<br>
John.<br>
<br>
<blockquote type="cite" cite="mid:f9fe6a1c-700c-419e-bc9c-86165b30c1f2@intel.com">
<pre class="moz-quote-pre" wrap="">
Reviewed-by: Julia Filipchuk <a class="moz-txt-link-rfc2396E" href="mailto:julia.filipchuk@intel.com"><julia.filipchuk@intel.com></a>
</pre>
</blockquote>
<br>
</body>
</html>