diff options
author | Nathan Chancellor <[email protected]> | 2023-10-10 13:32:37 -0700 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2023-10-13 14:15:54 -0400 |
commit | 78882c7657bb276bab028d92f99fc185b25a2fc1 (patch) | |
tree | 5caba7977c94d2806789f4a5d919a075a29d77b8 /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | 4df105f0ce9f6f30cda4e99f577150d23f0c9c5f (diff) |
scsi: ibmvfc: Use 'unsigned int' for single-bit bitfields in 'struct ibmvfc_host'
Clang warns (or errors with CONFIG_WERROR=y) several times along the
lines of:
drivers/scsi/ibmvscsi/ibmvfc.c:650:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
650 | vhost->reinit = 1;
| ^ ~
A single-bit signed integer bitfield only has possible values of -1 and
0, not 0 and 1 like an unsigned one would. No context appears to check
the actual value of these bitfields, just whether or not it is zero.
However, it is easy enough to change the type of the fields to 'unsigned
int', which keeps the same size in memory and resolves the warning.
Fixes: 5144905884e2 ("scsi: ibmvfc: Use a bitfield for boolean flags")
Signed-off-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Nick Desaulniers <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions