mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
powerpc/pseries/papr-sysparm: use u8 arrays for payloads
Some PAPR system parameter values are formatted by firmware as
nul-terminated strings (e.g. LPAR name, shared processor attributes).
But the values returned for other parameters, such as processor module
info and TLB block invalidate characteristics, are binary data with
parameter-specific layouts. So char[] isn't the appropriate type for
the general case. Use u8/__u8.
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Fixes: 905b9e4878
("powerpc/pseries/papr-sysparm: Expose character device to user space")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240202-papr-sysparm-ioblock-data-use-u8-v1-1-f5c6c89f65ec@linux.ibm.com
This commit is contained in:
parent
41bccc98fb
commit
8ded03ae48
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ typedef struct {
|
|||
*/
|
||||
struct papr_sysparm_buf {
|
||||
__be16 len;
|
||||
char val[PAPR_SYSPARM_MAX_OUTPUT];
|
||||
u8 val[PAPR_SYSPARM_MAX_OUTPUT];
|
||||
};
|
||||
|
||||
struct papr_sysparm_buf *papr_sysparm_buf_alloc(void);
|
||||
|
|
|
@ -14,7 +14,7 @@ enum {
|
|||
struct papr_sysparm_io_block {
|
||||
__u32 parameter;
|
||||
__u16 length;
|
||||
char data[PAPR_SYSPARM_MAX_OUTPUT];
|
||||
__u8 data[PAPR_SYSPARM_MAX_OUTPUT];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue