2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/drivers/thunderbolt
Nathan Chancellor 37209783c7 thunderbolt: Make priority unsigned in struct tb_path
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: 44242d6c97 ("thunderbolt: Add support for DMA tunnels")
Link: https://github.com/ClangBuiltLinux/linux/issues/454
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2019-04-25 12:18:27 +03:00
..
cap.c thunderbolt: Add dummy read after port capability list walk on Light Ridge 2019-04-18 11:18:51 +03:00
ctl.c thunderbolt: Make rest of the logging to happen at debug level 2019-04-18 11:18:53 +03:00
ctl.h thunderbolt: Add Intel as copyright holder 2018-10-02 15:52:08 -07:00
dma_port.c thunderbolt: Convert rest of the driver files to use SPDX identifier 2018-10-02 15:52:08 -07:00
dma_port.h thunderbolt: Convert rest of the driver files to use SPDX identifier 2018-10-02 15:52:08 -07:00
domain.c thunderbolt: Export IOMMU based DMA protection support to userspace 2018-12-05 12:01:56 +03:00
eeprom.c thunderbolt: Add Intel as copyright holder 2018-10-02 15:52:08 -07:00
icm.c thunderbolt: Start firmware on Titan Ridge Apple systems 2019-04-18 11:18:54 +03:00
Kconfig thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
lc.c thunderbolt: Set sleep bit when suspending switch 2019-04-18 11:18:52 +03:00
Makefile thunderbolt: Rename tunnel_pci to tunnel 2019-04-18 11:18:52 +03:00
nhi_regs.h thunderbolt: Add Intel as copyright holder 2018-10-02 15:52:08 -07:00
nhi.c thunderbolt: Add functions for allocating and releasing HopIDs 2019-04-18 11:18:52 +03:00
nhi.h thunderbolt: Add Intel as copyright holder 2018-10-02 15:52:08 -07:00
path.c thunderbolt: Reword output of tb_dump_hop() 2019-04-18 11:18:54 +03:00
property.c thunderbolt: property: Fix a missing check of kzalloc 2019-03-28 11:30:47 +03:00
switch.c thunderbolt: Make rest of the logging to happen at debug level 2019-04-18 11:18:53 +03:00
tb_msgs.h thunderbolt: Add XDomain UUID exchange support 2019-04-18 11:18:53 +03:00
tb_regs.h thunderbolt: Add support for DMA tunnels 2019-04-18 11:18:53 +03:00
tb.c thunderbolt: Make rest of the logging to happen at debug level 2019-04-18 11:18:53 +03:00
tb.h thunderbolt: Make priority unsigned in struct tb_path 2019-04-25 12:18:27 +03:00
tunnel.c thunderbolt: Make rest of the logging to happen at debug level 2019-04-18 11:18:53 +03:00
tunnel.h thunderbolt: Add support for DMA tunnels 2019-04-18 11:18:53 +03:00
xdomain.c thunderbolt: Add XDomain UUID exchange support 2019-04-18 11:18:53 +03:00