On 12/4/2025 1:06 PM, Krzysztof Kozlowski wrote:
On 03/12/2025 13:54, Lijo Lazar wrote:
+               BUILD_BUG_ON(sizeof(cwsr_trap_gfx11_hex) > PAGE_SIZE);
+               cwsr_info->isa_buf = cwsr_trap_gfx11_hex;
+               cwsr_info->isa_sz = sizeof(cwsr_trap_gfx11_hex);
+       } else {
+               BUILD_BUG_ON(sizeof(cwsr_trap_gfx12_hex) >
+                            AMDGPU_CWSR_TBA_MAX_SIZE);
+               cwsr_info->isa_buf = cwsr_trap_gfx12_hex;
+               cwsr_info->isa_sz = sizeof(cwsr_trap_gfx12_hex);
+       }
+}
+
+int amdgpu_cwsr_init(struct amdgpu_device *adev)
+{
+       struct amdgpu_cwsr_info *cwsr_info __free(kfree) = NULL;


This is an undesired syntax explicitly documented as one to avoid. You
need here proper assignment, not NULL. Please don't use cleanup.h if you
do not intend to follow it because it does not make the code simpler.


Could you explain more about the hazard here? There are no multiple cleanup variables declared in this case.

Thanks,
Lijo


Best regards,
Krzysztof

Reply via email to