From: Greg KH <gregkh@linuxfoundation.org>
To: Minu Jin <s9430939@naver.com>
Cc: andriy.shevchenko@linux.intel.com, dan.carpenter@linaro.org,
abrahamadekunle50@gmail.com, zxcv2569763104@gmail.com,
milospuric856@gmail.com, karanja99erick@gmail.com,
weibu@redadmin.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 0/2] staging: rtl8723bs: Fix error handling in _rtw_pktfile_read()
Date: Tue, 27 Jan 2026 15:48:00 +0100 [thread overview]
Message-ID: <2026012749-saffron-untoasted-80ee@gregkh> (raw)
In-Reply-To: <20260126163430.3067008-1-s9430939@naver.com>
On Tue, Jan 27, 2026 at 01:34:28AM +0900, Minu Jin wrote:
> This series improves error handling in _rtw_pktfile_read() and cleans up
> the code style to comply with kernel standards.
>
> 1. The first patch combines the logic change and caller updates.
> The function change and the caller updates must be in the same
> patch. If they are separated, the code will not work correctly
> or will cause errors at that specific point in the history.
>
> 2. The second patch focuses purely on code style cleanup (changing uint
> to unsigned int) as requested by Andy Shevchenko.
>
> Regarding the logic change in _rtw_pktfile_read():
>
> The original code used a ternary operator to read whatever data was
> available, even if it was less than requested. This could lead to
> callers processing incomplete data without knowing it.
>
> I have changed this to return -EINVAL when the remaining data is insufficient.
> This is safer because most callers expect the exact amount of data and
> should not proceed with a partial read.
>
> Testing and Verification:
>
> I do not have access to the physical RTL8723BS hardware. However, I have
> performed a rigorous manual audit of the data path and verified the
> changes using Smatch static analysis. The analysis confirmed that no
> new warnings or logical regressions were introduced in the modified files.
>
> Changes in v7:
> - Added full cumulative changelog from v2 to v7 as requested by Greg KH.
> - Added note regarding hardware testing and Smatch verification results.
>
> Changes in v6:
> - Reorganized into a 2-patch series to maintain git bisect safety
> (addressed Dan Carpenter's feedback).
> - Combined function logic changes with caller updates into Patch 1.
> - Separated style cleanup (uint -> unsigned int) into Patch 2.
>
> Changes in v5:
> - Split the patch into a 3-patch series (suggested by Greg KH).
> - Patch 1: Refactored return type to 'int'.
> - Patch 2: Added error checks to call sites.
> - Patch 3: Implemented -EINVAL logic.
> (Note: Superseded by v6 to fix git bisect issues).
>
> Changes in v4:
> - Modified _rtw_pktfile_read() to return -EINVAL if data is
> insufficient (following Greg KH's hint).
> - Replaced 'uint' with 'unsigned int' (suggested by Andy Shevchenko).
> - Removed redundant local variable 'len'.
>
> Changes in v3:
> - Updated set_qos() from void to int (suggested by Greg KH, Dan Carpenter).
> - Fixed coding style issues (suggested by Andy Shevchenko).
>
> Changes in v2:
> - Added check for skb_copy_bits() return value.
>
> --
> 2.43.0
>
>
Does not apply to my tree, please rebase and resend.
thanks,
greg k-h
prev parent reply other threads:[~2026-01-27 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 16:34 [PATCH v7 0/2] staging: rtl8723bs: Fix error handling in _rtw_pktfile_read() Minu Jin
2026-01-26 16:34 ` [PATCH v7 1/2] staging: rtl8723bs: update _rtw_pktfile_read() to return error codes Minu Jin
2026-01-26 16:34 ` [PATCH v7 2/2] staging: rtl8723bs: clean up _rtw_pktfile_read() Minu Jin
2026-01-27 14:48 ` Greg KH [this message]
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=2026012749-saffron-untoasted-80ee@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=abrahamadekunle50@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.carpenter@linaro.org \
--cc=karanja99erick@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=milospuric856@gmail.com \
--cc=s9430939@naver.com \
--cc=weibu@redadmin.org \
--cc=zxcv2569763104@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