aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy.c
diff options
context:
space:
mode:
authorDan Williams <[email protected]>2021-09-21 12:22:16 -0700
committerDan Williams <[email protected]>2021-09-21 14:09:34 -0700
commit48667f676189eccfe9b7ac3a31772d55d6da40e5 (patch)
tree38490f7391e45887f0982a8042337466124480d5 /lib/test_fortify/write_overflow-strncpy.c
parent7d3eb23c4ccf457b52cafdca1a7b20cddf29e021 (diff)
cxl/core: Split decoder setup into alloc + add
The kbuild robot reports: drivers/cxl/core/bus.c:516:1: warning: stack frame size (1032) exceeds limit (1024) in function 'devm_cxl_add_decoder' It is also the case the devm_cxl_add_decoder() is unwieldy to use for all the different decoder types. Fix the stack usage by splitting the creation into alloc and add steps. This also allows for context specific construction before adding. With the split the caller is responsible for registering a devm callback to trigger device_unregister() for the decoder rather than it being implicit in the decoder registration. I.e. the routine that calls alloc is responsible for calling put_device() if the "add" operation fails. Reported-by: kernel test robot <[email protected]> Reported-by: Nathan Chancellor <[email protected]> Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Link: https://lore.kernel.org/r/163225205828.3038145.6831131648369404859.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions