Re: [PATCH] staging: rtl8712: remove unused variables

From: Dan Carpenter
Date: Mon Oct 27 2014 - 07:13:33 EST


On Sun, Oct 26, 2014 at 06:03:33PM +0530, Sudip Mukherjee wrote:
> @@ -262,7 +257,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
> if (tmp8_a != (tmp8|BIT(2)))
> goto exit_fail;
>
> - tmp32 = r8712_read32(padapter, TCR);
> + r8712_read32(padapter, TCR);

I wonder if we actually need to call r8712_read32() here? It's not
clear. The changelog should say one way or the other. Maybe something
like "I left a call to r8712_read32(padapter, TCR) because I didn't know
if it had side effects". When you note down questions you have in the
changelog that helps reviewers.

> --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.c
> +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.c
> @@ -156,11 +156,9 @@ static void rpwm_workitem_callback(struct work_struct *work)
> struct pwrctrl_priv, rpwm_workitem);
> struct _adapter *padapter = container_of(pwrpriv,
> struct _adapter, pwrctrlpriv);
> - u8 cpwm = pwrpriv->cpwm;
> -
> if (pwrpriv->cpwm != pwrpriv->rpwm) {
> _enter_pwrlock(&pwrpriv->lock);
> - cpwm = r8712_read8(padapter, SDIO_HCPWM);
> + r8712_read8(padapter, SDIO_HCPWM);

Same here.

> pwrpriv->rpwm_retry = 1;
> r8712_set_rpwm(padapter, pwrpriv->rpwm);
> up(&pwrpriv->lock);

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/