From 77b62fe435d195b5a58f123e6c5ec9c9dffdc877 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 15 Jun 2018 08:29:02 +0300 Subject: 9606 qede: error: this 'for' clause does not guard Reviewed by: Andy Fiddaman Reviewed by: Andrew Stormont Reviewed by: Yuri Pankov Reviewed by: Ken Mays Approved by: Dan McDonald --- .../common/io/qede/579xx/drivers/ecore/ecore_dbg_fw_funcs.c | 13 +++++++------ 1 file 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); } -- cgit v1.2.3