Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2513488pxb; Tue, 24 Aug 2021 00:28:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqydpSpbdb2ybofuxMLGQVVZAkyRgq56edVvhu8+Z7PFE2k2CPwmTp41NXkuUGTxiQInBE X-Received: by 2002:a02:866b:: with SMTP id e98mr33956459jai.48.1629790110567; Tue, 24 Aug 2021 00:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629790110; cv=none; d=google.com; s=arc-20160816; b=XKNf9v/M/Yy/WjK+mc1qm4oygSOG/JAv1ja3cNLiXQRFnWwX7E673OPKYd6n3qGHQN PcP88DwSGJ0KnpUSXsuWnK0qVzGU+OWpbWM2ZzlM1Zle1+ELtt2SN/7nbI6Fz4M0gf2Y 3IBVrjunajiBQs7STppFlfcbhPse9P9Zs3Vdxjq6pFAkQRejYXsELDg1mMlV+G+E8hcA a5tvRB+Zj2YGbp2jsHkbk+olwu/3dxtNnUZNilmvES+MDr+D5x5AX5Erzd8iOSqNtQXa BQWFOzWwusg0wbQiTJcNsxYIVi34AGNr/gcilb2ws3SxfKb0/a0+EeoXUmMDQlBMS17t cAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=F3wQCTN5cM9YKnBlp1P0QXe7SRu/kM8sy/0fhkY2E4w=; b=Ae2CiRVHbZItOS4j6IsieYjgNLqxbYEKeJG3LIuC298yTSqYp6GdWBFYdNKJdw/XPd s1bBMAwjK/ensm2D68FUWMWMdwp67XXAbvju8th89urxExKvuk+X+Rx0wG8T4oIAQZFQ kBIbprlDguOfPTdEXLMEc3ur2gttxFHpIC4/VAvaCsXOOB8NWWWFjarGymGvxeyHfwm/ ksOWfx0E5gZc8d9ocXCy8RlknyIkDmBOp3zMnfvkTq0gSylw3818u53L2HrK9QQCZPc9 mNtYEoNqi4KcMztgANr1u+T0TvR+5gt9GZn45bkwjfcSJZ7MhlmzLqUWh9NoJ1aX0mt2 2N7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=M2pm69Cr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n3si17977755ioh.98.2021.08.24.00.28.18; Tue, 24 Aug 2021 00:28:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=M2pm69Cr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234708AbhHXH1U (ORCPT + 99 others); Tue, 24 Aug 2021 03:27:20 -0400 Received: from mout.gmx.net ([212.227.17.22]:41267 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232797AbhHXH1U (ORCPT ); Tue, 24 Aug 2021 03:27:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1629789988; bh=v17RKsvGJ+zoaPgm4NV0ZimaezNoWpAZALPNlLCZSKA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=M2pm69Cr9L9PRTmJyL0p8lc0yrNYulbJh27A8uDA7stNhjjebOhABc0MZRp7sjypo 15mz32lJsKPsUgRRi2LNB2+Qcr6aQaMcfpk2cJvZvBH23h7+VelibBUhsLlqaFceRT OqmjF1rHCIetyRJgbV4Ra8giamZAWzLihdLWSY3U= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([79.150.72.99]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N6sn1-1n6gd22uHH-018HgK; Tue, 24 Aug 2021 09:26:27 +0200 From: Len Baker To: Greg Kroah-Hartman , Kees Cook Cc: Len Baker , Dan Carpenter , Michael Straube , Lee Jones , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: [PATCH v2 1/3] staging/rtl8192u: Avoid CamelCase in names of variables Date: Tue, 24 Aug 2021 09:25:43 +0200 Message-Id: <20210824072545.7321-2-len.baker@gmx.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210824072545.7321-1-len.baker@gmx.com> References: <20210824072545.7321-1-len.baker@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:jULEbUMt/rThvxH2t+pF9WN49skqlHlsle5kt8EjnHFFj88p5qN R/OBFzDK1CVLWKP7AYQMrdZ7CJUxGgHSfTY6RmpFi8Fi3k+aL6sVBgoFvqR1fZL4Rrnf7x8 L+41ma5qKeygxpcZMzxVBXcu2nzYNJ2XI/iA+dul0dF/8uHlMiK5sXN0AiGCMHt9Kx0FPfq 5UPPjElNn2w5C8TpHDtWw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ZBF2KGwooXY=:GmjcWq6bGCWuL0GgLs9OYI m/mtNb0I7Xvc6S9JgRliIPtO8xs9Y5z9HoObJlEmnVF98IuFxrAP3ACAgDADKlndbS67QSemI CRrtXulPyWqML12W/Amn8D9GHnRoV8qCRJosO/qz0hubch+EV9Jlk5obgby5PnKE8rOQC3deM jAbdiMGPJB1kYNdmolOJtQlx+Vk50gswbq5z+rExY0rilLPkJLWGTS3sXsX/j3qcBDQ1LOF+1 H745phnyf4uynj35WvKmQK1QgrC4m8c/nSSOEnSUvD+kHK5ZJ6Hr7NE5t7SU0gZ2sNWd7TJW3 6UwNxsbbZzBdpSSBdy2fjvi78u5X6aa2SqK4aT+N3xYYSUQ+pePUH43juxekIWrVQNwRvzGLZ tVF802qZ0Zrjwrug0VBq7Qzd6I8Pg/uYnM33e9WATnkSqJbYL9fBuujKWW2ZS6CNhEvS9/5ad yWt8rp04gHxVyYBIcLtlq14IempusLSrkSVs4WueqdiHssLe57cN8IaQRnPn/E3o9lM/Hi3E9 k74QrEzE/P/JO+pZDaY4zyYh7OivPey48wFSOWU0w4grY3c8SNu8ZXznLUuuKh4ppfOM2IFcB rY4y5eBvhW+gA4yQsOVhMXMqXxoJfWgtEZgmgKGu5prg4jtL9at7ZCmbQKtZCyO8OgjGWmZu7 vNm54AJRmuLuiliyUaDqI8hgMlE3bTTYD/HyDNNCSWohoBE9IFp0ElcBg37AoWLqESju3CZZ+ dkIwQpWs7KroPqXRWNjoUhVJmc+MPwEMwN9slSuuACGefnsdNpmvJwdM7aQiaZYuEP0PEjhT9 YHBfisoEcmavpbT3mFiDJywk6qjyt+n1a3bnU+r/+39dAaB67m5g2hvaHs/ia6wh/uRmxm99v qAMhxH5pZ5v1Q0T22kTmP0+AfCI9zRUU6XgpzqvN1SMoXlPTkeWDQfkJXPAA/JBDcQ+yKmOuI TWcHT0vhTonIU2n63m3ZS9A9RzStPFdLQmNBzP+cEho9qgtdsOfkN3LpORe8cUwo7aeriqS7i LReA8m8sv6xEJ2NWA/kukwILjsK4Oh24ZmhFr11cdIM4oSdsq4hhpUJnsh4gS4cFpH2I1+ihU vmerTfZSHLtH8FeQHXl0R+K0zvZf6ShL0gtL7tcYfAksEFFNtVL5s7mlg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid CameCase in the names of all local variables inside the function rtl8192_phy_SwChnlStepByStep(). Signed-off-by: Len Baker =2D-- drivers/staging/rtl8192u/r819xU_phy.c | 95 +++++++++++++-------------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl81= 92u/r819xU_phy.c index 37b82553412e..6a67708cdd89 100644 =2D-- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -1185,30 +1185,30 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_= device *dev, u8 channel, u8 *stage, u8 *step, u32 *delay) { struct r8192_priv *priv =3D ieee80211_priv(dev); - struct sw_chnl_cmd *PreCommonCmd; - u32 PreCommonCmdCnt; - struct sw_chnl_cmd *PostCommonCmd; - u32 PostCommonCmdCnt; - struct sw_chnl_cmd *RfDependCmd; - u32 RfDependCmdCnt; - struct sw_chnl_cmd *CurrentCmd =3D NULL; - u8 e_rfpath; - bool ret; - - PreCommonCmd =3D kzalloc(sizeof(*PreCommonCmd) * MAX_PRECMD_CNT, GFP_KER= NEL); - if (!PreCommonCmd) + struct sw_chnl_cmd *pre_cmd; + u32 pre_cmd_cnt; + struct sw_chnl_cmd *post_cmd; + u32 post_cmd_cnt; + struct sw_chnl_cmd *rf_cmd; + u32 rf_cmd_cnt; + struct sw_chnl_cmd *current_cmd =3D NULL; + u8 e_rfpath; + bool ret; + + pre_cmd =3D kzalloc(sizeof(*pre_cmd) * MAX_PRECMD_CNT, GFP_KERNEL); + if (!pre_cmd) return false; - PostCommonCmd =3D kzalloc(sizeof(*PostCommonCmd) * MAX_POSTCMD_CNT, GFP_= KERNEL); - if (!PostCommonCmd) { - kfree(PreCommonCmd); + post_cmd =3D kzalloc(sizeof(*post_cmd) * MAX_POSTCMD_CNT, GFP_KERNEL); + if (!post_cmd) { + kfree(pre_cmd); return false; } - RfDependCmd =3D kzalloc(sizeof(*RfDependCmd) * MAX_RFDEPENDCMD_CNT, GFP_= KERNEL); - if (!RfDependCmd) { - kfree(PreCommonCmd); - kfree(PostCommonCmd); + rf_cmd =3D kzalloc(sizeof(*rf_cmd) * MAX_RFDEPENDCMD_CNT, GFP_KERNEL); + if (!rf_cmd) { + kfree(pre_cmd); + kfree(post_cmd); return false; } @@ -1225,21 +1225,20 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_= device *dev, u8 channel, /* FIXME: need to check whether channel is legal or not here */ /* <1> Fill up pre common command. */ - PreCommonCmdCnt =3D 0; - rtl8192_phy_SetSwChnlCmdArray(PreCommonCmd, PreCommonCmdCnt++, + pre_cmd_cnt =3D 0; + rtl8192_phy_SetSwChnlCmdArray(pre_cmd, pre_cmd_cnt++, MAX_PRECMD_CNT, CMD_ID_SET_TX_PWR_LEVEL, 0, 0, 0); - rtl8192_phy_SetSwChnlCmdArray(PreCommonCmd, PreCommonCmdCnt++, + rtl8192_phy_SetSwChnlCmdArray(pre_cmd, pre_cmd_cnt++, MAX_PRECMD_CNT, CMD_ID_END, 0, 0, 0); /* <2> Fill up post common command. */ - PostCommonCmdCnt =3D 0; - - rtl8192_phy_SetSwChnlCmdArray(PostCommonCmd, PostCommonCmdCnt++, + post_cmd_cnt =3D 0; + rtl8192_phy_SetSwChnlCmdArray(post_cmd, post_cmd_cnt++, MAX_POSTCMD_CNT, CMD_ID_END, 0, 0, 0); /* <3> Fill up RF dependent command. */ - RfDependCmdCnt =3D 0; + rf_cmd_cnt =3D 0; switch (priv->rf_chip) { case RF_8225: if (!(channel >=3D 1 && channel <=3D 14)) { @@ -1249,13 +1248,13 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_= device *dev, u8 channel, ret =3D true; goto out; } - rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++, + rtl8192_phy_SetSwChnlCmdArray(rf_cmd, rf_cmd_cnt++, MAX_RFDEPENDCMD_CNT, CMD_ID_RF_WRITE_REG, rZebra1_Channel, RF_CHANNEL_TABLE_ZEBRA[channel], 10); - rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++, + rtl8192_phy_SetSwChnlCmdArray(rf_cmd, rf_cmd_cnt++, MAX_RFDEPENDCMD_CNT, CMD_ID_END, 0, 0, 0); break; @@ -1269,11 +1268,11 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_= device *dev, u8 channel, ret =3D true; goto out; } - rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++, + rtl8192_phy_SetSwChnlCmdArray(rf_cmd, rf_cmd_cnt++, MAX_RFDEPENDCMD_CNT, CMD_ID_RF_WRITE_REG, rZebra1_Channel, channel, 10); - rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++, + rtl8192_phy_SetSwChnlCmdArray(rf_cmd, rf_cmd_cnt++, MAX_RFDEPENDCMD_CNT, CMD_ID_END, 0, 0, 0); break; @@ -1290,19 +1289,19 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_= device *dev, u8 channel, do { switch (*stage) { case 0: - CurrentCmd =3D &PreCommonCmd[*step]; + current_cmd =3D &pre_cmd[*step]; break; case 1: - CurrentCmd =3D &RfDependCmd[*step]; + current_cmd =3D &rf_cmd[*step]; break; case 2: - CurrentCmd =3D &PostCommonCmd[*step]; + current_cmd =3D &post_cmd[*step]; break; } - if (CurrentCmd->cmd_id =3D=3D CMD_ID_END) { + if (current_cmd->cmd_id =3D=3D CMD_ID_END) { if ((*stage) =3D=3D 2) { - (*delay) =3D CurrentCmd->ms_delay; + *delay =3D current_cmd->ms_delay; ret =3D true; goto out; } @@ -1311,31 +1310,31 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_= device *dev, u8 channel, continue; } - switch (CurrentCmd->cmd_id) { + switch (current_cmd->cmd_id) { case CMD_ID_SET_TX_PWR_LEVEL: if (priv->card_8192_version =3D=3D VERSION_819XU_A) /* consider it later! */ rtl8192_SetTxPowerLevel(dev, channel); break; case CMD_ID_WRITE_PORT_ULONG: - write_nic_dword(dev, CurrentCmd->para_1, - CurrentCmd->para_2); + write_nic_dword(dev, current_cmd->para_1, + current_cmd->para_2); break; case CMD_ID_WRITE_PORT_USHORT: - write_nic_word(dev, CurrentCmd->para_1, - (u16)CurrentCmd->para_2); + write_nic_word(dev, current_cmd->para_1, + (u16)current_cmd->para_2); break; case CMD_ID_WRITE_PORT_UCHAR: - write_nic_byte(dev, CurrentCmd->para_1, - (u8)CurrentCmd->para_2); + write_nic_byte(dev, current_cmd->para_1, + (u8)current_cmd->para_2); break; case CMD_ID_RF_WRITE_REG: for (e_rfpath =3D 0; e_rfpath < RF90_PATH_MAX; e_rfpath++) { rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)e_rfpath, - CurrentCmd->para_1, + current_cmd->para_1, bZebra1_ChannelNum, - CurrentCmd->para_2); + current_cmd->para_2); } break; default: @@ -1345,14 +1344,14 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_= device *dev, u8 channel, break; } while (true); - (*delay) =3D CurrentCmd->ms_delay; + *delay =3D current_cmd->ms_delay; (*step)++; ret =3D false; out: - kfree(PreCommonCmd); - kfree(PostCommonCmd); - kfree(RfDependCmd); + kfree(pre_cmd); + kfree(post_cmd); + kfree(rf_cmd); return ret; } =2D- 2.25.1