staging:rtl8192u: remove typedef from structure SwChnlCmd - Style
authorJohn Whitmore <johnfwhitmore@gmail.com>
Fri, 13 Jul 2018 11:23:02 +0000 (12:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Jul 2018 13:41:16 +0000 (15:41 +0200)
Checkpatch warns against creation of new types in code. This patch simply
removes the "typedef" declaration of the structure SwChnlCmd to clear this
issue. Simple coding style issue which should not impact runtime execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r819xU_phy.c
drivers/staging/rtl8192u/r819xU_phy.h

index 3df4775e1f99579970c4674b685000ea6d4d7ad2..d88f6c3ed46f640bf53471f7524b6862aa5af2ce 100644 (file)
@@ -1227,11 +1227,11 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
  * return:    true if finished, false otherwise
  * notice:
  ******************************************************************************/
-static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
+static u8 rtl8192_phy_SetSwChnlCmdArray(struct SwChnlCmd *CmdTable, u32 CmdTableIdx,
                                        u32 CmdTableSz, enum SwChnlCmdID CmdID,
                                        u32 Para1, u32 Para2, u32 msDelay)
 {
-       SwChnlCmd *pCmd;
+       struct SwChnlCmd *pCmd;
 
        if (CmdTable == NULL) {
                RT_TRACE(COMP_ERR, "%s(): CmdTable cannot be NULL\n", __func__);
@@ -1268,14 +1268,14 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
                                       u8 *stage, u8 *step, u32 *delay)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
-       SwChnlCmd       PreCommonCmd[MAX_PRECMD_CNT];
-       u32             PreCommonCmdCnt;
-       SwChnlCmd       PostCommonCmd[MAX_POSTCMD_CNT];
-       u32             PostCommonCmdCnt;
-       SwChnlCmd       RfDependCmd[MAX_RFDEPENDCMD_CNT];
-       u32             RfDependCmdCnt;
-       SwChnlCmd       *CurrentCmd = NULL;
-       u8              eRFPath;
+       struct SwChnlCmd   PreCommonCmd[MAX_PRECMD_CNT];
+       u32                PreCommonCmdCnt;
+       struct SwChnlCmd   PostCommonCmd[MAX_POSTCMD_CNT];
+       u32                PostCommonCmdCnt;
+       struct SwChnlCmd   RfDependCmd[MAX_RFDEPENDCMD_CNT];
+       u32                RfDependCmdCnt;
+       struct SwChnlCmd  *CurrentCmd = NULL;
+       u8                 eRFPath;
 
        RT_TRACE(COMP_CH, "%s() stage: %d, step: %d, channel: %d\n",
                 __func__, *stage, *step, channel);
index d93da23606490e8097c6be3390cd7d7a1008ea86..a02e1e0ea643e35c5c855116e5cbb234d4689b2a 100644 (file)
@@ -19,12 +19,12 @@ enum SwChnlCmdID {
 
 /* -----------------------Define structure---------------------- */
 /* 1. Switch channel related */
-typedef struct _SwChnlCmd {
+struct SwChnlCmd {
        enum SwChnlCmdID        CmdID;
        u32                     Para1;
        u32                     Para2;
        u32                     msDelay;
-} __packed SwChnlCmd;
+} __packed;
 
 extern u32 rtl819XMACPHY_Array_PG[];
 extern u32 rtl819XPHY_REG_1T2RArray[];