staging: vt6655: Change return type of function and remove variable
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Fri, 31 May 2019 17:32:26 +0000 (23:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jun 2019 12:19:33 +0000 (14:19 +0200)
Remove return variable bResult from function CARDbRadioPowerOff and
change the return type of the function to void as it always returns true
and the return value is never stored nor checked when called.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/card.c
drivers/staging/vt6655/card.h

index 6ecbe925026d6132744eade5184da2bd39a49939..eba4ee0750dc61bcaed74abbbb7a791c5245b0b6 100644 (file)
@@ -409,14 +409,11 @@ bool CARDbSetBeaconPeriod(struct vnt_private *priv,
  *  Out:
  *      none
  *
- * Return Value: true if success; otherwise false
  */
-bool CARDbRadioPowerOff(struct vnt_private *priv)
+void CARDbRadioPowerOff(struct vnt_private *priv)
 {
-       bool bResult = true;
-
        if (priv->bRadioOff)
-               return true;
+               return;
 
        switch (priv->byRFType) {
        case RF_RFMD2959:
@@ -444,7 +441,6 @@ bool CARDbRadioPowerOff(struct vnt_private *priv)
        pr_debug("chester power off\n");
        MACvRegBitsOn(priv->PortOffset, MAC_REG_GPIOCTL0,
                      LED_ACTSET);  /* LED issue */
-       return bResult;
 }
 
 /*
index f422fb3c78bd72a881c4d0d4b1da06a9f535cda5..887c1692e05b47cef7b83e571388be6ba3b1890f 100644 (file)
@@ -57,7 +57,7 @@ u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2);
 unsigned char CARDbyGetPktType(struct vnt_private *priv);
 void CARDvSafeResetTx(struct vnt_private *priv);
 void CARDvSafeResetRx(struct vnt_private *priv);
-bool CARDbRadioPowerOff(struct vnt_private *priv);
+void CARDbRadioPowerOff(struct vnt_private *priv);
 bool CARDbRadioPowerOn(struct vnt_private *priv);
 bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type);
 bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate,