summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-06-15 08:29:02 +0300
committerDan McDonald <danmcd@joyent.com>2018-07-30 13:29:43 -0400
commit77b62fe435d195b5a58f123e6c5ec9c9dffdc877 (patch)
tree990d9a21908f00d63fa20b65006eef2f60e0ef77
parentfa56a4b40d080b7786a82829ec946e94ba96ac07 (diff)
downloadillumos-joyent-77b62fe435d195b5a58f123e6c5ec9c9dffdc877.tar.gz
9606 qede: error: this 'for' clause does not guard
Reviewed by: Andy Fiddaman <af@citrus-it.net> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Ken Mays <kmays2000@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/qede/579xx/drivers/ecore/ecore_dbg_fw_funcs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr/src/uts/common/io/qede/579xx/drivers/ecore/ecore_dbg_fw_funcs.c b/usr/src/uts/common/io/qede/579xx/drivers/ecore/ecore_dbg_fw_funcs.c
index 383deaa32e..62c6a7ada4 100644
--- a/usr/src/uts/common/io/qede/579xx/drivers/ecore/ecore_dbg_fw_funcs.c
+++ b/usr/src/uts/common/io/qede/579xx/drivers/ecore/ecore_dbg_fw_funcs.c
@@ -5444,12 +5444,13 @@ enum dbg_status ecore_dbg_bus_add_constraint(struct ecore_hwfn *p_hwfn,
if (!data_mask)
return DBG_STATUS_INVALID_ARGS;
- for (lsb = 0; lsb < 32 && !(data_mask & 1); lsb++, data_mask >>= 1);
- for (width = 0;
- width < 32 - lsb && (data_mask & 1);
- width++, data_mask >>= 1);
- if (data_mask)
- return DBG_STATUS_INVALID_ARGS;
+ for (lsb = 0; lsb < 32 && !(data_mask & 1); lsb++)
+ data_mask >>= 1;
+
+ for (width = 0; width < 32 - lsb && (data_mask & 1); width++)
+ data_mask >>= 1;
+ if (data_mask)
+ return DBG_STATUS_INVALID_ARGS;
range = (lsb << 5) | (width - 1);
}