
On 1/24/25 4:57 PM, Jerome Forissier wrote:
On 1/24/25 11:35, Marek Vasut wrote:
On 1/24/25 10:10 AM, Jerome Forissier wrote:
+#define INITCALL(_call) \ + do { \ + if (_call()) { \ + printf("%s(): initcall %s() failed\n", __func__, \ + #_call); \ + hang(); \ + } \ + } while (0)
Can this be turned into some static inline function too , so typechecking would be retained ? Maybe the function can be passed in a function pointer to call ?
Doing the below totally kills the space gain (-160 bytes instead of -2281 on zynqmp_kria_defconfig, with LTO).
Does the compiler not inline the functions perhaps ?
And it prevents from printing the function name in case of error, which is nicer than an address (especially with relocation at play).
That function name can be passed in using __func__ as a parameter.