提交 32a39dd4 编写于 作者: J Jakub Sitnicki 提交者: Kalle Valo

rtl8xxxu: Skip disabled efuse words early

Avoid a negative conditional and an extra level of indentation in the
bigger part of the loop body.
Signed-off-by: NJakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 f6c47702
......@@ -2454,22 +2454,20 @@ static int rtl8xxxu_read_efuse(struct rtl8xxxu_priv *priv)
}
for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
/* Check word enable condition in the section */
if (!(word_mask & BIT(i))) {
ret = rtl8xxxu_read_efuse8(priv,
efuse_addr++,
&val8);
if (ret)
goto exit;
priv->efuse_wifi.raw[map_addr++] = val8;
ret = rtl8xxxu_read_efuse8(priv,
efuse_addr++,
&val8);
if (ret)
goto exit;
priv->efuse_wifi.raw[map_addr++] = val8;
} else
if (word_mask & BIT(i)) {
map_addr += 2;
continue;
}
ret = rtl8xxxu_read_efuse8(priv, efuse_addr++, &val8);
if (ret)
goto exit;
priv->efuse_wifi.raw[map_addr++] = val8;
ret = rtl8xxxu_read_efuse8(priv, efuse_addr++, &val8);
if (ret)
goto exit;
priv->efuse_wifi.raw[map_addr++] = val8;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册