The variable "polled" in smc_wr_tx_tasklet_fn is a counter to determineThe code itself looks good. However, I’m curious about the specific situation where the compiler complained. Also, compared to exceeding the function stack limit by 1024 bytes, I don’t see how saving 12 bytes would bring any significant benefit.
whether the loop has been executed for the first time. Refactor the type
of "polled" from "int" to "bool" can reduce the size of generated code
size by 12 bytes shown with the test below
$ ./scripts/bloat-o-meter vmlinux_old vmlinux_new
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-12 (-12)
Function old new delta
smc_wr_tx_tasklet_fn 1076 1064 -12
Total: Before=24795091, After=24795079, chg -0.00%
In some configuration, the compiler will complain this function for
exceeding 1024 bytes for function stack, this change can at least reduce
the size by 12 bytes within manner.