linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	straube.linux@gmail.com, dan.carpenter@oracle.com,
	fmdefrancesco@gmail.com, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH v2 2/4] staging: r8188eu: add error handling of rtw_read16
Date: Mon, 6 Jun 2022 22:00:58 +0300	[thread overview]
Message-ID: <774c3d04-4c02-ed52-f545-73acbffde561@gmail.com> (raw)
In-Reply-To: <Yp2VQU9G1xVw9lHE@kroah.com>

Hi Greg,

On 6/6/22 08:48, Greg KH wrote:
>> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
>> index e67ecbd1ba79..6662ebc30f7b 100644
>> --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
>> +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
>> @@ -249,11 +249,14 @@ static void efuse_read_phymap_from_txpktbuf(
>>  		hi32 = cpu_to_le32(rtw_read32(adapter, REG_PKTBUF_DBG_DATA_H));
>>  
>>  		if (i == 0) {
>> +			u16 reg;
>> +
>>  			/* Although lenc is only used in a debug statement,
>>  			 * do not remove it as the rtw_read16() call consumes
>>  			 * 2 bytes from the EEPROM source.
>>  			 */
>> -			rtw_read16(adapter, REG_PKTBUF_DBG_DATA_L);
>> +			res = rtw_read16(adapter, REG_PKTBUF_DBG_DATA_L, &reg);
>> +			(void)res;
> 
> Same here, that line isn't ok.
> 
hm, that place is not obvious.

I guess, on-chip EEPROM acts like a FIFO, so this read must be completed 
w/o any errors, so I will simply propagate an error to callers

And will place another "FIXME" for further work :)

thanks,


With regards,
Pavel Skripkin

  reply	other threads:[~2022-06-06 19:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 21:09 [PATCH v2 0/4] staging: r8188eu: add error handling of usb read errors Pavel Skripkin
2022-05-19 21:09 ` [PATCH v2 1/4] staging: r8188eu: add error handling of rtw_read8 Pavel Skripkin
2022-06-06  5:48   ` Greg KH
2022-06-06 18:57     ` Pavel Skripkin
2022-05-19 21:09 ` [PATCH v2 2/4] staging: r8188eu: add error handling of rtw_read16 Pavel Skripkin
2022-06-06  5:48   ` Greg KH
2022-06-06 19:00     ` Pavel Skripkin [this message]
2022-05-19 21:10 ` [PATCH v2 3/4] staging: r8188eu: add error handling of rtw_read32 Pavel Skripkin
2022-05-20  7:43 ` [PATCH v2 0/4] staging: r8188eu: add error handling of usb read errors Dan Carpenter

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=774c3d04-4c02-ed52-f545-73acbffde561@gmail.com \
    --to=paskripkin@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dan.carpenter@oracle.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.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;
as well as URLs for NNTP newsgroup(s).