aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorNathan Lynch <[email protected]>2024-01-16 08:09:25 -0600
committerSteven Rostedt (Google) <[email protected]>2024-01-18 09:22:02 -0500
commit7a8e9cdf9405819105ae7405cd91e482bf574b01 (patch)
tree5542d38879349906caa82bf87d9ada79f4c58112 /scripts/gdb/linux/utils.py
parent1057066009c4325bb1d8430c9274894d0860e7c3 (diff)
seq_buf: Make DECLARE_SEQ_BUF() usable
Using the address operator on the array doesn't work: ./include/linux/seq_buf.h:27:27: error: initialization of ‘char *’ from incompatible pointer type ‘char (*)[128]’ [-Werror=incompatible-pointer-types] 27 | .buffer = &__ ## NAME ## _buffer, \ | ^ Apart from fixing that, we can improve DECLARE_SEQ_BUF() by using a compound literal to define the buffer array without attaching a name to it. This makes the macro a single statement, allowing constructs such as: static DECLARE_SEQ_BUF(my_seq_buf, MYSB_SIZE); to work as intended. Link: https://lkml.kernel.org/r/[email protected] Cc: [email protected] Acked-by: Kees Cook <[email protected]> Fixes: dcc4e5728eea ("seq_buf: Introduce DECLARE_SEQ_BUF and seq_buf_str()") Signed-off-by: Nathan Lynch <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions