From d7255ba4d648a6da72b740f69c615a61247b1633 Mon Sep 17 00:00:00 2001 From: Nishka Dasgupta Date: Fri, 31 May 2019 23:02:26 +0530 Subject: [PATCH] staging: vt6655: Change return type of function and remove variable 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/card.c | 8 ++------ drivers/staging/vt6655/card.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 6ecbe925026d6..eba4ee0750dc6 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -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; } /* diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index f422fb3c78bd7..887c1692e05b4 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -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, -- 2.30.2