Thread (25 messages) 25 messages, 3 authors, 2025-09-03

Re: [PATCH v3 12/12] PM: EM: Use scope-based cleanup helper

From: Zihuan Zhang <hidden>
Date: 2025-09-03 02:12:57
Also in: dri-devel, imx, intel-gfx, linux-acpi, linux-arm-kernel, linux-omap, linux-pm, lkml

You are not improving the source code here. This is not how to use
 __free() and you clearly do not understand the source code.
Sorry for the problem, policy should be assigned after cpumask_test_cpu().

I actually realized earlier that __free() only frees at the end of the variable’s lifetime. 
I had suggested using a braced macro in cpufreq.h to allow immediate release after use, 
but I understand the maintainer’s advice to “keep it simple” and will follow that.
What's more, you did not use standard tools which would tell you this is
buggy and wrong.
Could you please let me know which standard tools you recommend for detecting such issues? 

I’d like to use them to avoid similar mistakes in the future.
Don't introduce cleanup.h if you do not understand how it works.
Should I drop this patch?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help