From: Philipp Hortmann Date: Mon, 13 Mar 2023 22:46:27 +0000 (+0100) Subject: staging: rtl8192e: Replace RF90_PATH_C in test expression of for loop X-Git-Tag: microblaze-v6.6~613^2~134 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=7c4b9278d44c567f335ef3714e201e1f2074bb9d;p=linux-2.6-microblaze.git staging: rtl8192e: Replace RF90_PATH_C in test expression of for loop Replace RF90_PATH_C in test expression of the for loop with the variable that is commonly used. This avoids false hits when searching for usage of RF90_PATH_C and therefore improves readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f9af7a3d3e608206a4aa4ba2bd377b9201111b3f.1678740713.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index db26e431f8b7..fb4eede0470a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1514,7 +1514,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer, return; if (!prev_st->bIsCCK && prev_st->bPacketToSelf) { - for (rfpath = RF90_PATH_A; rfpath < RF90_PATH_C; rfpath++) { + for (rfpath = RF90_PATH_A; rfpath < priv->num_total_rf_path; rfpath++) { if (!rtl92e_is_legal_rf_path(priv->rtllib->dev, rfpath)) continue; if (priv->stats.rx_rssi_percentage[rfpath] == 0) {