public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v6 0/2] staging: rtl8723bs: Fix error handling in _rtw_pktfile_read()
@ 2026-01-22 17:41 Minu Jin
  2026-01-22 17:41 ` [PATCH v6 1/2] staging: rtl8723bs: update _rtw_pktfile_read() to return error codes Minu Jin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Minu Jin @ 2026-01-22 17:41 UTC (permalink / raw)
  To: gregkh
  Cc: andriy.shevchenko, abrahamadekunle50, zxcv2569763104,
	milospuric856, karanja99erick, weibu, dan.carpenter,
	linux-staging, linux-kernel, Minu Jin

This series improves error handling in _rtw_pktfile_read() and cleans up
the code style to comply with kernel standards.

In v6, I have reorganized the patches into a series of two to satisfy
both Greg and Dan's feedback:

    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.

Changes in v6:
    - Reorganized into a 2-patch series to maintain git bisect safety.
    - Combined function logic changes with caller updates into Patch 1.
    - Separated style cleanup (uint -> unsigned int) into Patch 2.

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-27 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 17:41 [PATCH v6 0/2] staging: rtl8723bs: Fix error handling in _rtw_pktfile_read() Minu Jin
2026-01-22 17:41 ` [PATCH v6 1/2] staging: rtl8723bs: update _rtw_pktfile_read() to return error codes Minu Jin
2026-01-27 14:35   ` Greg KH
2026-01-22 17:41 ` [PATCH v6 2/2] staging: rtl8723bs: clean up _rtw_pktfile_read() Minu Jin
2026-01-23  6:25 ` [PATCH v6 0/2] staging: rtl8723bs: Fix error handling in _rtw_pktfile_read() Greg KH
2026-01-23  7:26   ` Minu Jin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox