public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Huang <tehuang@realtek.com>
To: "'Nathan Chancellor'" <natechancellor@gmail.com>,
	"trix@redhat.com" <trix@redhat.com>
Cc: Tony Chuang <yhchuang@realtek.com>,
	"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"ndesaulniers@google.com" <ndesaulniers@google.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"clang-built-linux@googlegroups.com" 
	<clang-built-linux@googlegroups.com>
Subject: RE: [PATCH] rtw88: fix fw_fifo_addr check
Date: Wed, 14 Oct 2020 02:21:18 +0000	[thread overview]
Message-ID: <ca5131599d3940d8a914025821876219@realtek.com> (raw)
In-Reply-To: <20201012022428.GA936980@ubuntu-m3-large-x86>


> On Sun, Oct 11, 2020 at 08:54:38AM -0700, trix@redhat.com wrote:
> > From: Tom Rix <trix@redhat.com>
> >
> > The clang build reports this warning
> >
> > fw.c:1485:21: warning: address of array 'rtwdev->chip->fw_fifo_addr'
> >   will always evaluate to 'true'
> >         if (!rtwdev->chip->fw_fifo_addr) {
> >
> > fw_fifo_addr is an array in rtw_chip_info so it is always nonzero.  A
> > better check is if the first element of the array is nonzero.  In the
> > cases where fw_fifo_addr is initialized by rtw88b and rtw88c, the
> > first array element is 0x780.
> >
> > Signed-off-by: Tom Rix <trix@redhat.com>
> 
> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
> 

Thanks for your fix,

Acked-by: Tzu-En Huang <tehuang@realtek.com>

> > ---
> >  drivers/net/wireless/realtek/rtw88/fw.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/realtek/rtw88/fw.c
> > b/drivers/net/wireless/realtek/rtw88/fw.c
> > index 042015bc8055..b2fd87834f23 100644
> > --- a/drivers/net/wireless/realtek/rtw88/fw.c
> > +++ b/drivers/net/wireless/realtek/rtw88/fw.c
> > @@ -1482,7 +1482,7 @@ static bool rtw_fw_dump_check_size(struct
> > rtw_dev *rtwdev,  int rtw_fw_dump_fifo(struct rtw_dev *rtwdev, u8
> fifo_sel, u32 addr, u32 size,
> >  		     u32 *buffer)
> >  {
> > -	if (!rtwdev->chip->fw_fifo_addr) {
> > +	if (!rtwdev->chip->fw_fifo_addr[0]) {
> >  		rtw_dbg(rtwdev, RTW_DBG_FW, "chip not support dump fw fifo\n");
> >  		return -ENOTSUPP;
> >  	}
> > --
> > 2.18.1
> >
> 
> ------Please consider the environment before printing this e-mail.

  reply	other threads:[~2020-10-14  2:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11 15:54 [PATCH] rtw88: fix fw_fifo_addr check trix
2020-10-12  2:24 ` Nathan Chancellor
2020-10-14  2:21   ` Andy Huang [this message]
2020-11-02 18:16 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca5131599d3940d8a914025821876219@realtek.com \
    --to=tehuang@realtek.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=trix@redhat.com \
    --cc=yhchuang@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox