From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC378C433B4 for ; Sat, 10 Apr 2021 09:31:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 890E061165 for ; Sat, 10 Apr 2021 09:31:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234539AbhDJJbh (ORCPT ); Sat, 10 Apr 2021 05:31:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:38590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbhDJJbd (ORCPT ); Sat, 10 Apr 2021 05:31:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5494461182; Sat, 10 Apr 2021 09:31:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618047079; bh=dLqzpPxQV6VLbGBARRZ7SF+swEOzYvvusa6Xhacvhsk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZR5uxYuJNKPQjKllJFffuIUxykNDky0RWSygO3WaeD1KbCrS9Ml/xR0fNbTenb/5y 9Hb3Vq7CVYMPO/3bCsvZLBScu0mDlFalUC8cmdJ4Lle4wi8f4sHTVbM5hK1oQHR45t KpT2GlZp4Lq6Ak4kCSuOdwFlJLoUSky3Ms4Y3auE= Date: Sat, 10 Apr 2021 11:31:16 +0200 From: Greg KH To: "Fabio M. De Francesco" Cc: outreachy-kernel@googlegroups.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel] [PATCH 4/4] staging: rtl8723bs: Change the type and use of a variable Message-ID: References: <20210410092232.15155-1-fmdefrancesco@gmail.com> <20210410092232.15155-5-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210410092232.15155-5-fmdefrancesco@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 10, 2021 at 11:22:32AM +0200, Fabio M. De Francesco wrote: > Change the type of fw_current_in_ps_mode from u8 to bool, because > it is used everywhere as a bool and, accordingly, it should be > declared as a bool. Shorten the controlling > expression of an 'if' statement. > > Signed-off-by: Fabio M. De Francesco > --- > drivers/staging/rtl8723bs/hal/hal_intf.c | 2 +- > drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c > index 96fe172ced8d..8dc4dd8c6d4c 100644 > --- a/drivers/staging/rtl8723bs/hal/hal_intf.c > +++ b/drivers/staging/rtl8723bs/hal/hal_intf.c > @@ -348,7 +348,7 @@ void rtw_hal_dm_watchdog(struct adapter *padapter) > > void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter) > { > - if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode == true) { > + if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode) { > if (padapter->HalFunc.hal_dm_watchdog_in_lps) > padapter->HalFunc.hal_dm_watchdog_in_lps(padapter); /* this function caller is in interrupt context */ > } > diff --git a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h > index 0a48f1653be5..0767dbb84199 100644 > --- a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h > +++ b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h > @@ -203,7 +203,7 @@ struct pwrctrl_priv { > u8 LpsIdleCount; > u8 power_mgnt; > u8 org_power_mgnt; > - u8 fw_current_in_ps_mode; > + bool fw_current_in_ps_mode; > unsigned long DelayLPSLastTimeStamp; > s32 pnp_current_pwr_state; > u8 pnp_bstop_trx; If this is only checked, how can it ever be true? Who ever sets this value? thanks, greg k-h