diff options
author | sephe <sephe@FreeBSD.org> | 2017-04-19 03:39:50 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2017-04-19 03:39:50 +0000 |
commit | 95c28456410dc47d95cd4c063e417bc3fd1a8555 (patch) | |
tree | 9ec3048806ec768504225bfc3e86a26336a5cc48 /sys/dev/hyperv | |
parent | 316cf4161b66ed91a118fff69c9121a516011962 (diff) | |
download | FreeBSD-src-95c28456410dc47d95cd4c063e417bc3fd1a8555.zip FreeBSD-src-95c28456410dc47d95cd4c063e417bc3fd1a8555.tar.gz |
MFC 316813,316815
316813
hyperv/storvsc: Use ULL for 64bits value shift.
Reported by: PVS
Sponsored by: Microsoft
316815
hyperv/kvp: Remove always false condition.
Reported by: PVS
Sponsored by: Microsoft
Diffstat (limited to 'sys/dev/hyperv')
-rw-r--r-- | sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 2 | ||||
-rw-r--r-- | sys/dev/hyperv/utilities/hv_kvp.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c index 07c7d5b..f1a4d53 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -1771,7 +1771,7 @@ storvsc_check_bounce_buffer_sgl(bus_dma_segment_t *sgl, } pre_aligned = TRUE; } else { - tmp_bits |= 1 << i; + tmp_bits |= 1ULL << i; if (!pre_aligned) { if (phys_addr != vtophys(sgl[i-1].ds_addr + sgl[i-1].ds_len)) { diff --git a/sys/dev/hyperv/utilities/hv_kvp.c b/sys/dev/hyperv/utilities/hv_kvp.c index d8134e8..e70c4c4 100644 --- a/sys/dev/hyperv/utilities/hv_kvp.c +++ b/sys/dev/hyperv/utilities/hv_kvp.c @@ -516,7 +516,7 @@ hv_kvp_convert_usermsg_to_hostmsg(struct hv_kvp_msg *umsg, struct hv_kvp_msg *hm /* Use values by string */ host_exchg_data->value_type = HV_REG_SZ; - if ((hkey_len < 0) || (hvalue_len < 0)) + if (hvalue_len < 0) return (EINVAL); return (0); |