linux/drivers/crypto/chelsio
Arnd Bergmann 071a43e660 cxgb4/chcr: avoid -Wreturn-local-addr warning
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: 5a4b9fe7fe ("cxgb4/chcr: complete record tx handling")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-04 11:47:52 -07:00
..
chtls Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-04-01 14:47:40 -07:00
Kconfig cxgb4/chcr : Register to tls add and del callback 2020-03-08 21:16:23 -07:00
Makefile cxgb4/chcr : Register to tls add and del callback 2020-03-08 21:16:23 -07:00
chcr_algo.c crypto: chelsio - remove set but not used variable 'adap' 2020-03-20 14:36:52 +11:00
chcr_algo.h crypto: chelsio - switch to skcipher API 2019-11-17 09:02:47 +08:00
chcr_common.h chcr: Handle first or middle part of record 2020-03-08 21:16:23 -07:00
chcr_core.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-04-01 14:47:40 -07:00
chcr_core.h Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-04-01 14:47:40 -07:00
chcr_crypto.h crypto: chelsio - Use multiple txq/rxq per tfm to process the requests 2020-03-06 12:28:20 +11:00
chcr_ipsec.c Crypto: chelsio - Fixes a deadlock between rtnl_lock and uld_mutex 2020-03-30 10:33:23 -07:00
chcr_ktls.c cxgb4/chcr: avoid -Wreturn-local-addr warning 2020-05-04 11:47:52 -07:00
chcr_ktls.h cxgb4/chcr: Add ipv6 support and statistics 2020-03-08 21:16:23 -07:00