mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:10:53 +07:00
071a43e660
gcc-10 warns about functions that return a pointer to a stack
variable. In chcr_write_cpl_set_tcb_ulp(), this does not actually
happen, but it's too hard to see for the compiler:
drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_write_cpl_set_tcb_ulp.constprop':
drivers/crypto/chelsio/chcr_ktls.c:760:9: error: function may return address of local variable [-Werror=return-local-addr]
760 | return pos;
| ^~~
drivers/crypto/chelsio/chcr_ktls.c:712:5: note: declared here
712 | u8 buf[48] = {0};
| ^~~
Split the middle part of the function out into a helper to make
it easier to understand by both humans and compilers, which avoids
the warning.
Fixes:
|
||
---|---|---|
.. | ||
chtls | ||
chcr_algo.c | ||
chcr_algo.h | ||
chcr_common.h | ||
chcr_core.c | ||
chcr_core.h | ||
chcr_crypto.h | ||
chcr_ipsec.c | ||
chcr_ktls.c | ||
chcr_ktls.h | ||
Kconfig | ||
Makefile |