mirror of
https://github.com/torvalds/linux.git
synced 2026-08-11 18:04:38 +02:00
Clang warns:
drivers/thunderbolt/tunnel.c:504:17: warning: implicit truncation from
'int' to bit-field changes value from 5 to -3
[-Wbitfield-constant-conversion]
path->priority = 5;
^ ~
1 warning generated.
The priority member in struct tb_path is only ever assigned a positive
number:
$ rg -n priority drivers/thunderbolt/path.c
drivers/thunderbolt/tunnel.c:99: path->priority = 3;
drivers/thunderbolt/tunnel.c:308: path->priority = 2;
drivers/thunderbolt/tunnel.c:323: path->priority = 1;
drivers/thunderbolt/tunnel.c:504: path->priority = 5;
Furthermore, that value is only assigned to an unsigned integer in
tb_path_activate (the priority member in struct tb_regs_hop).
Fixes:
|
||
|---|---|---|
| .. | ||
| cap.c | ||
| ctl.c | ||
| ctl.h | ||
| dma_port.c | ||
| dma_port.h | ||
| domain.c | ||
| eeprom.c | ||
| icm.c | ||
| Kconfig | ||
| lc.c | ||
| Makefile | ||
| nhi_regs.h | ||
| nhi.c | ||
| nhi.h | ||
| path.c | ||
| property.c | ||
| switch.c | ||
| tb_msgs.h | ||
| tb_regs.h | ||
| tb.c | ||
| tb.h | ||
| tunnel.c | ||
| tunnel.h | ||
| xdomain.c | ||