aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2018-09-26 02:27:37 +0000
committerNavdeep Parhar <np@FreeBSD.org>2018-09-26 02:27:37 +0000
commitcb8dedc76ef2290559c0e9e95621bf3729b990a3 (patch)
treed61933e55f4d43194a0be4130c4b9e01cb258eab /sys/dev
parent05e1cca97a180df482a89e3bb382cf695cac31da (diff)
downloadsrc-cb8dedc76ef2290559c0e9e95621bf3729b990a3.tar.gz
src-cb8dedc76ef2290559c0e9e95621bf3729b990a3.zip
cxgbe(4): Treat base/end of firmware parameters as signed integers when
figuring out whether the range is valid or not. Approved by: re@ (rgrimes@) MFC after: 1 week Sponsored by: Chelsio Communications
Notes
Notes: svn path=/head/; revision=338940
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cxgbe/t4_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 3ae560585897..dc491fd1d7d3 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -3851,7 +3851,7 @@ get_params__post_init(struct adapter *sc)
sc->sge.iq_start = val[0];
sc->sge.eq_start = val[1];
- if (val[3] > val[2]) {
+ if ((int)val[3] > (int)val[2]) {
sc->tids.ftid_base = val[2];
sc->tids.ftid_end = val[3];
sc->tids.nftids = val[3] - val[2] + 1;
@@ -3986,7 +3986,7 @@ get_params__post_init(struct adapter *sc)
"failed to query NIC parameters: %d.\n", rc);
return (rc);
}
- if (val[1] > val[0]) {
+ if ((int)val[1] > (int)val[0]) {
sc->tids.etid_base = val[0];
sc->tids.etid_end = val[1];
sc->tids.netids = val[1] - val[0] + 1;
@@ -4016,7 +4016,7 @@ get_params__post_init(struct adapter *sc)
sc->tids.ntids -= sc->tids.nhpftids;
}
sc->tids.natids = min(sc->tids.ntids / 2, MAX_ATIDS);
- if (val[2] > val[1]) {
+ if ((int)val[2] > (int)val[1]) {
sc->tids.stid_base = val[1];
sc->tids.nstids = val[2] - val[1] + 1;
}