mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 01:59:51 +02:00
qlcnic driver uses u16 to store SPEED_UKNOWN ethtool constant,
which is defined as -1, resulting in value truncation and
thus incorrect test results against SPEED_UNKNOWN.
For example, the following test will print "False":
u16 speed = SPEED_UNKNOWN;
if (speed == SPEED_UNKNOWN)
printf("True");
else
printf("False");
Change storage of speed to use u32 to avoid this issue.
Signed-off-by: Michael Zhivich <mzhivich@akamai.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| qlcnic.h | ||
| qlcnic_83xx_hw.c | ||
| qlcnic_83xx_hw.h | ||
| qlcnic_83xx_init.c | ||
| qlcnic_83xx_vnic.c | ||
| qlcnic_ctx.c | ||
| qlcnic_dcb.c | ||
| qlcnic_dcb.h | ||
| qlcnic_ethtool.c | ||
| qlcnic_hdr.h | ||
| qlcnic_hw.c | ||
| qlcnic_hw.h | ||
| qlcnic_init.c | ||
| qlcnic_io.c | ||
| qlcnic_main.c | ||
| qlcnic_minidump.c | ||
| qlcnic_sriov.h | ||
| qlcnic_sriov_common.c | ||
| qlcnic_sriov_pf.c | ||
| qlcnic_sysfs.c | ||