[PATCH v7 10/10] drm/xe/guc: Add a helper function for dumping GuC log to dmesg

John Harrison john.c.harrison at intel.com
Wed Sep 11 20:41:10 UTC 2024


On 9/11/2024 13:36, Julia Filipchuk wrote:
>> @@ -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);
> Increment of non-assigned value "g_count". It is static so zero
> allocated but suggest to assign to 0 for clarity.
Assigning a static to zero will cause the checkpatch tool to complain 
that you are unnecessarily providing a value that is the default.

John.

>
> Reviewed-by: Julia Filipchuk<julia.filipchuk at intel.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-xe/attachments/20240911/652673bf/attachment.htm>


More information about the Intel-xe mailing list