Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1630192pxb; Mon, 12 Apr 2021 02:54:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeS5I0Pl1pPGWgwmwSMDPfJIFMVdgnsMmSn1IjXk6tfCwnutTU5AV+Y62ovJiB+gAc+NzA X-Received: by 2002:a17:90a:5418:: with SMTP id z24mr28899376pjh.189.1618221247929; Mon, 12 Apr 2021 02:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618221247; cv=none; d=google.com; s=arc-20160816; b=GtrJPl54/wRmqQnOOAUIOoD9sj5L280fSuMCJmmhKnNxykK2qQrJZ/63eCR//Olh/G YsHpczEGlhi1ZIbJGkcnXY8UIoBdXSpmJ2eS5gdgQ52dnUJU3/BJwYl7yDK2D+WzxXSP TskwhhANUYuqO862jMMYq777OGHbhOkd3cFCsxSiTm1R4EoLbUwsv13+Yj3WBoOH2p19 l7LwHijvpvotw2qmKVWkV5GQWE+5dRyo33P+PEymAh7eshIWPvo445xE+W/sttTw/0V6 CFII+Rwu80va8wePEV+JUluSw+JBZloq2luE4D3zmo4ty0alcX/c1H+RcCHhJGzg3q8h U4Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gzETTOqgDFFCFj8zOSt5uaDsdGFEZ3FkS7GsFCGgPss=; b=AMb5C8pKI6nfrRtGjn1e2IaHjQZSKxnSPjI7c5xad5nelbpU+1lSxUcwiJrY/AcX7z lrt4Zso55UJGf7ASF4eE+SVz2glzJA/AtmIpuu/yxJ5JeELnk4P9TpLJGoGO9rOXuPSm ZWKW4kH8cB4xrFprOLt5oRYcirpDg/Xgbj3CDMhAUUVs1S4yvz76Cs8BiRF8PNnaANou 1sB+RlW+me8jOhzd+fvCs5eSUFeye+RpX8q3vGMZNaDCaSUXidp/32GW5otFiVWtblHI ziBeHd0II3fnc6+XAgSk1jheNVOdRHlBd/9H+szeV/vUvsnsYmr1+jEOMclEERBYYFY/ 3HiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UpNbq3qL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si13135146pgp.265.2021.04.12.02.53.56; Mon, 12 Apr 2021 02:54:07 -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=@linuxfoundation.org header.s=korg header.b=UpNbq3qL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243879AbhDLJvN (ORCPT + 99 others); Mon, 12 Apr 2021 05:51:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:55950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241395AbhDLJjJ (ORCPT ); Mon, 12 Apr 2021 05:39:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 080BA6120F; Mon, 12 Apr 2021 09:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618220331; bh=5XCbpQ2jaq37pFKegsSHbOMkbKZ0wG2OYWzBu2rU7QE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UpNbq3qLa8usFfqRYPlgHES2fkwyykMg6KuAhcpbAnUYVZ8SIEuPywnWyZwzxv4eW Hzs/o7rE0C3fwz2x1bB9hUx6b0ZvgAmf2+XJYwgSwyVPW6LZNtSOAYh8yh8CCuchYC Odu/4iEb19OVqB7jexNpiZ3UDq06fg4xs6S5FUHc= Date: Mon, 12 Apr 2021 11:38:48 +0200 From: Greg KH To: Fabio Aiuto Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 11, 2021 at 02:57:35PM +0200, Fabio Aiuto wrote: > fix following compiler warning issue: > > drivers/staging/rtl8723bs/hal/sdio_halinit.c: > In function 'CardDisableRTL8723BSdio': > >> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: > warning: variable 'ret' set but not used [-Wunused-but-set-variable] > 881 | u8 ret = _FAIL; > | ^~~ > > Reported-by: kernel test robot > Signed-off-by: Fabio Aiuto > --- > drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c > index 2098384efe92..936181a73d73 100644 > --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c > +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c > @@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter) > { > u8 u1bTmp; > u8 bMacPwrCtrlOn; > - u8 ret = _FAIL; > > /* Run LPS WL RFOFF flow */ > - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow); > + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow); > > /* ==== Reset digital sequence ====== */ > > @@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter) > /* ==== Reset digital sequence end ====== */ > > bMacPwrCtrlOn = false; /* Disable CMD53 R/W */ > - ret = false; > rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); > - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow); > + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow); > } Why isn't the return value being checked and returned to the caller if something goes wrong? Ignoring it feels wrong to me. thanks, greg k-h