* [PATCH v7 7/7] staging: rtl8723bs: fix OOB reads in rtw_get_sec_ie(), rtw_get_wapi_ie(), and rtw_get_wps_attr()
From: Alexandru Hossu @ 2026-05-22 0:45 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, luka.gejak, Alexandru Hossu, stable
In-Reply-To: <20260522004531.1038924-1-hossu.alexandru@gmail.com>
Three IE/attribute parsing functions have missing bounds checks.
rtw_get_sec_ie() and rtw_get_wapi_ie() iterate over a raw IE buffer
without verifying that the header bytes (tag + length) are within the
remaining buffer before reading them. Additionally, rtw_get_sec_ie()
compares the 4-byte WPA OUI at cnt+2 without checking that at least
6 bytes remain, and rtw_get_wapi_ie() compares a 4-byte WAPI OUI at
cnt+6 without checking that at least 10 bytes remain.
rtw_get_wps_attr() reads wps_ie[0] and wps_ie+2 unconditionally at
entry, before verifying that wps_ielen is large enough to contain
the 6-byte WPS IE header (element_id + length + 4-byte OUI). Inside
the attribute loop, get_unaligned_be16() is called on attr_ptr and
attr_ptr+2 without checking that 4 bytes remain in the buffer.
Add a cnt+2 bounds check before each loop body in rtw_get_sec_ie()
and rtw_get_wapi_ie(), guard each multi-byte comparison with a minimum
IE length requirement, add a wps_ielen < 6 early return in
rtw_get_wps_attr(), and add a 4-byte bounds check in its inner loop.
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandru Hossu <hossu.alexandru@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index 72b7f731dd47..3c1f0068cd92 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -583,9 +583,14 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len)
cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
while (cnt < in_len) {
+ if (cnt + 2 > in_len)
+ break;
+ if (cnt + 2 + in_ie[cnt + 1] > in_len)
+ break;
authmode = in_ie[cnt];
if (authmode == WLAN_EID_BSS_AC_ACCESS_DELAY &&
+ in_ie[cnt + 1] >= 8 &&
(!memcmp(&in_ie[cnt + 6], wapi_oui1, 4) ||
!memcmp(&in_ie[cnt + 6], wapi_oui2, 4))) {
if (wapi_ie)
@@ -616,9 +621,14 @@ void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie
cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
while (cnt < in_len) {
+ if (cnt + 2 > in_len)
+ break;
+ if (cnt + 2 + in_ie[cnt + 1] > in_len)
+ break;
authmode = in_ie[cnt];
if ((authmode == WLAN_EID_VENDOR_SPECIFIC) &&
+ in_ie[cnt + 1] >= 4 &&
(!memcmp(&in_ie[cnt + 2], &wpa_oui[0], 4))) {
if (wpa_ie)
memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
@@ -699,6 +709,9 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8 *buf_att
if (len_attr)
*len_attr = 0;
+ if (wps_ielen < 6)
+ return attr_ptr;
+
if ((wps_ie[0] != WLAN_EID_VENDOR_SPECIFIC) ||
(memcmp(wps_ie + 2, wps_oui, 4))) {
return attr_ptr;
@@ -709,6 +722,8 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8 *buf_att
while (attr_ptr - wps_ie < wps_ielen) {
/* 4 = 2(Attribute ID) + 2(Length) */
+ if (attr_ptr + 4 > wps_ie + wps_ielen)
+ break;
u16 attr_id = get_unaligned_be16(attr_ptr);
u16 attr_data_len = get_unaligned_be16(attr_ptr + 2);
u16 attr_len = attr_data_len + 4;
--
2.54.0
^ permalink raw reply related
* [PATCH v10] staging: rtl8723bs: fix WEP length underflow and OOB read in OnAuth()
From: Alexandru Hossu @ 2026-05-22 0:46 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Alexandru Hossu, stable
In-Reply-To: <20260521130324.754100-1-hossu.alexandru@gmail.com>
OnAuth() has two bugs in the shared-key authentication path.
When the Privacy bit is set, rtw_wep_decrypt() is called without
verifying that the frame is long enough to contain a valid WEP IV and
ICV. Inside rtw_wep_decrypt(), length is computed as:
length = len - WLAN_HDR_A3_LEN - iv_len
and then passed as (length - 4) to crc32_le(). If len is less than
WLAN_HDR_A3_LEN + iv_len + icv_len (32 bytes), length - 4 is negative
and, after the implicit cast to size_t, causes crc32_le() to read far
beyond the frame buffer. Add a minimum length check before accessing
the IV field and calling the decryption path.
When processing a seq=3 response, rtw_get_ie() stores the Challenge
Text IE length in ie_len, but the subsequent memcmp() always reads 128
bytes regardless of ie_len. IEEE 802.11 mandates a challenge text of
exactly 128 bytes; reject any IE whose length field differs, matching
the check already applied to OnAuthClient().
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandru Hossu <hossu.alexandru@gmail.com>
---
v10: no code changes; add full version history below --- (omitted from v9)
v9: add WLAN_HDR_A3_LEN guard and WEP minimum length check before
iv[3] access and rtw_wep_decrypt(); tighten ie_len check from
<= 0 to != 128 to reject under-size challenge IEs
v8: standalone patch; change WLAN_HDR_A3_LEN early exit to return _FAIL
(sa not yet initialised at that point, goto auth_fail would copy
garbage into the rejection frame's destination address); add guard
for iv[3] read inside GetPrivacy() branch (len < WLAN_HDR_A3_LEN +
4); set status = WLAN_STATUS_UNSPECIFIED_FAILURE before goto auth_fail
v7: initial OnAuth fix (sent as [PATCH v7 0/2] 2/2); add frame length
guards before GetAddr2Ptr() and before algorithm/seq reads; correct
commit message (rtw_get_ie() uses signed int limit and returns NULL
when limit < 2, so the unsigned underflow OOB scan claimed in earlier
versions cannot occur)
v9: https://lore.kernel.org/r/20260521130324.754100-1-hossu.alexandru@gmail.com
v8: https://lore.kernel.org/r/20260511185314.1625375-1-hossu.alexandru@gmail.com
v7: https://lore.kernel.org/r/20260505211316.3837020-1-hossu.alexandru@gmail.com
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 68ce422305ed..8575b7bd6d84 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -687,6 +687,9 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
return _FAIL;
+ if (len < WLAN_HDR_A3_LEN)
+ return _FAIL;
+
sa = GetAddr2Ptr(pframe);
auth_mode = psecuritypriv->dot11AuthAlgrthm;
@@ -698,6 +701,9 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
prxattrib->hdrlen = WLAN_HDR_A3_LEN;
prxattrib->encrypt = _WEP40_;
+ if (len < WLAN_HDR_A3_LEN + 8)
+ return _FAIL;
+
iv = pframe+prxattrib->hdrlen;
prxattrib->key_index = ((iv[3]>>6)&0x3);
@@ -802,7 +808,7 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + 4 + _AUTH_IE_OFFSET_, WLAN_EID_CHALLENGE, (int *)&ie_len,
len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_ - 4);
- if (!p || ie_len <= 0) {
+ if (!p || ie_len != 128) {
status = WLAN_STATUS_CHALLENGE_FAIL;
goto auth_fail;
}
--
2.54.0
^ permalink raw reply related
* Re: [PATCH] staging: rtl8723bs: fix operator spacing
From: Greg KH @ 2026-05-22 4:41 UTC (permalink / raw)
To: omkarbhor4011; +Cc: linux-staging, linux-kernel
In-Reply-To: <20260522003013.69238-1-omkarbhor4011@gmail.com>
On Fri, May 22, 2026 at 06:00:13AM +0530, omkarbhor4011@gmail.com wrote:
> From: omkarbhor4011 <Omkarbhor4011@gmail.com>
>
> Signed-off-by: omkarbhor4011 <Omkarbhor4011@gmail.com>
> ---
> .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 26 +++++++++----------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> index e794fe3ca..3bb1533e1 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> @@ -21,23 +21,23 @@ static void _FWDownloadEnable(struct adapter *padapter, bool enable)
> rtw_write8(padapter, REG_SYS_FUNC_EN + 1, tmp | 0x04);
>
> tmp = rtw_read8(padapter, REG_MCUFWDL);
> - rtw_write8(padapter, REG_MCUFWDL, tmp|0x01);
> + rtw_write8(padapter, REG_MCUFWDL, tmp | 0x01);
>
> do {
> tmp = rtw_read8(padapter, REG_MCUFWDL);
> if (tmp & 0x01)
> break;
> - rtw_write8(padapter, REG_MCUFWDL, tmp|0x01);
> + rtw_write8(padapter, REG_MCUFWDL, tmp | 0x01);
> msleep(1);
> } while (count++ < 100);
>
> /* 8051 reset */
> - tmp = rtw_read8(padapter, REG_MCUFWDL+2);
> - rtw_write8(padapter, REG_MCUFWDL+2, tmp&0xf7);
> + tmp = rtw_read8(padapter, REG_MCUFWDL + 2);
> + rtw_write8(padapter, REG_MCUFWDL + 2, tmp & 0xf7);
> } else {
> /* MCU firmware download disable. */
> tmp = rtw_read8(padapter, REG_MCUFWDL);
> - rtw_write8(padapter, REG_MCUFWDL, tmp&0xfe);
> + rtw_write8(padapter, REG_MCUFWDL, tmp & 0xfe);
> }
> }
>
> @@ -70,8 +70,8 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
> if (remainSize_p1) {
> offset = blockCount_p1 * blockSize_p1;
>
> - blockCount_p2 = remainSize_p1/blockSize_p2;
> - remainSize_p2 = remainSize_p1%blockSize_p2;
> + blockCount_p2 = remainSize_p1 / blockSize_p2;
> + remainSize_p2 = remainSize_p1 % blockSize_p2;
> }
>
> /* 3 Phase #3 */
> @@ -104,8 +104,8 @@ static int _PageWrite(
> u8 value8;
> u8 u8Page = (u8) (page & 0x07);
>
> - value8 = (rtw_read8(padapter, REG_MCUFWDL+2) & 0xF8) | u8Page;
> - rtw_write8(padapter, REG_MCUFWDL+2, value8);
> + value8 = (rtw_read8(padapter, REG_MCUFWDL + 2) & 0xF8) | u8Page;
> + rtw_write8(padapter, REG_MCUFWDL + 2, value8);
>
> return _BlockWrite(padapter, buffer, size);
> }
> @@ -124,7 +124,7 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size)
>
> for (page = 0; page < pageNums; page++) {
> offset = page * MAX_DLFW_PAGE_SIZE;
> - ret = _PageWrite(padapter, page, bufferPtr+offset, MAX_DLFW_PAGE_SIZE);
> + ret = _PageWrite(padapter, page, bufferPtr + offset, MAX_DLFW_PAGE_SIZE);
>
> if (ret == _FAIL) {
> netdev_dbg(padapter->pnetdev, "page write failed at %s %d\n",
> @@ -136,7 +136,7 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size)
> if (remainSize) {
> offset = pageNums * MAX_DLFW_PAGE_SIZE;
> page = pageNums;
> - ret = _PageWrite(padapter, page, bufferPtr+offset, remainSize);
> + ret = _PageWrite(padapter, page, bufferPtr + offset, remainSize);
>
> if (ret == _FAIL) {
> netdev_dbg(padapter->pnetdev, "remaining page write failed at %s %d\n",
> @@ -195,7 +195,7 @@ static s32 polling_fwdl_chksum(
> if (value32 & FWDL_ChkSum_rpt || adapter->bSurpriseRemoved || adapter->bDriverStopped)
> break;
> yield();
> - } while (jiffies_to_msecs(jiffies-start) < timeout_ms || cnt < min_cnt);
> + } while (jiffies_to_msecs(jiffies - start) < timeout_ms || cnt < min_cnt);
>
> if (!(value32 & FWDL_ChkSum_rpt)) {
> goto exit;
> @@ -1888,7 +1888,7 @@ void rtl8723b_fill_fake_txdesc(
> if (IsPsPoll) {
> SET_TX_DESC_NAV_USE_HDR_8723B(pDesc, 1);
> } else {
> - SET_TX_DESC_HWSEQ_EN_8723B(pDesc, 1); /* Hw set sequence number */
> + SET_TX_DESC_HWSEQ_EN_8723B(pDesc, 1);
> SET_TX_DESC_HWSEQ_SEL_8723B(pDesc, 0);
> }
>
> --
> 2.54.0
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- You did not specify a description of why the patch is needed, or
possibly, any description at all, in the email body. Please read the
section entitled "The canonical patch format" in the kernel file,
Documentation/process/submitting-patches.rst for what is needed in
order to properly describe the change.
- It looks like you did not use your "real" name for the patch on either
the Signed-off-by: line, or the From: line (both of which have to
match). Please read the kernel file,
Documentation/process/submitting-patches.rst for how to do this
correctly.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply
* Re: [PATCH] Staging: sm750fb: Change camelCase to snake_case
From: Greg KH @ 2026-05-22 4:43 UTC (permalink / raw)
To: Michail Tatas
Cc: sudipm.mukherjee, teddy.wang, linux-fbdev, linux-staging,
linux-kernel
In-Reply-To: <ag-XlRifxjqXF-Zx@michalis-linux>
On Fri, May 22, 2026 at 02:39:01AM +0300, Michail Tatas wrote:
> Change variable names from camelCase to snake_case
> as per the Linux Kernel standards.
Please do one-change-per-variable, as some of these are fine, but others
are obviously not.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
From: Ahmet Sezgin Duran @ 2026-05-22 4:47 UTC (permalink / raw)
To: Diego Fernando Mancera Gómez, gregkh, linux-staging
Cc: m.steinmoetzger, guojy.bj, straube.linux, error27, linux-kernel
In-Reply-To: <20260521210523.133725-1-diegomancera.dev@gmail.com>
On 5/22/26 12:05 AM, Diego Fernando Mancera Gómez wrote:
> ---
> drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 16 ++++------------
> 1 file changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> index c88d669cb086..2e47734a0ae9 100644
> --- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> +++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> @@ -228,18 +228,11 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
> odm_parsing_cfo(dm_odm, pkt_info, phy_sta_rpt->path_cfotail);
> }
>
> - /*
> - * UI BSS List signal strength(in percentage), make it good
> - * looking, from 0~100.
> - * It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
> - */
> - if (is_cck_rate) {
> + if (is_cck_rate)
> phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, pwdb_all));
> - } else {
> - if (rf_rx_num != 0) {
> - phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
> - }
> - }
> + else if (rf_rx_num != 0)
> + phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
> +
> }
>
> static void odm_Process_RSSIForDM(
> @@ -437,4 +430,3 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
>
> return HAL_STATUS_SUCCESS;
> }
> -
You need to add a commit body explaining the reasoning for this changes.
It must also contain `Signed-off-by:`.
Regards,
Ahmet Sezgin Duran
^ permalink raw reply
* Re: [PATCH] staging: cleanup of sdio_intf.c
From: Greg Kroah-Hartman @ 2026-05-22 5:04 UTC (permalink / raw)
To: Manuel Ebner
Cc: Dan Carpenter, Omer El Idrissi, open list:STAGING SUBSYSTEM,
open list
In-Reply-To: <20260521183931.176951-2-manuelebner@mailbox.org>
On Thu, May 21, 2026 at 08:39:32PM +0200, Manuel Ebner wrote:
> removed unused argument of rtw_sdio_if1_init()
> removed empty lines, added linew where appropriate
>
> Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
> ---
> drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> index d0feb28b7043..32a0ee08f175 100644
> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> @@ -47,7 +47,6 @@ static void sd_sync_int_hdl(struct sdio_func *func)
> {
> struct dvobj_priv *psdpriv;
>
> -
> psdpriv = sdio_get_drvdata(func);
>
> if (!psdpriv->if1)
> @@ -144,13 +143,13 @@ static void sdio_deinit(struct dvobj_priv *dvobj)
> sdio_claim_host(func);
> sdio_disable_func(func);
>
> - if (dvobj->irq_alloc) {
> + if (dvobj->irq_alloc)
> sdio_release_irq(func);
> - }
>
> sdio_release_host(func);
> }
> }
> +
> static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)
> {
> struct dvobj_priv *dvobj = NULL;
> @@ -216,8 +215,7 @@ static void sd_intf_stop(struct adapter *padapter)
> rtw_hal_disable_interrupt(padapter);
> }
>
> -
> -static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct sdio_device_id *pdid)
> +static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj)
> {
> int status = _FAIL;
> struct net_device *pnetdev;
> @@ -250,7 +248,6 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
> /* 4 3.1 set hardware operation functions */
> rtw_set_hal_ops(padapter);
>
> -
> /* 3 5. initialize Chip version */
> padapter->intf_start = &sd_intf_start;
> padapter->intf_stop = &sd_intf_stop;
> @@ -336,9 +333,8 @@ static void rtw_sdio_if1_deinit(struct adapter *if1)
> * notes: drv_init() is called when the bus driver has located a card for us to support.
> * We accept the new device by returning 0.
> */
> -static int rtw_drv_init(
> - struct sdio_func *func,
> - const struct sdio_device_id *id)
> +static int rtw_drv_init(struct sdio_func *func,
> + const struct sdio_device_id *id)
> {
> int status = _FAIL;
> struct adapter *if1 = NULL;
> @@ -348,7 +344,7 @@ static int rtw_drv_init(
> if (!dvobj)
> goto exit;
>
> - if1 = rtw_sdio_if1_init(dvobj, id);
> + if1 = rtw_sdio_if1_init(dvobj);
> if (!if1)
> goto free_dvobj;
>
> --
> 2.54.0
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- Your patch did many different things all at once, making it difficult
to review. All Linux kernel patches need to only do one thing at a
time. If you need to do multiple things (such as clean up all coding
style issues in a file/driver), do it in a sequence of patches, each
one doing only one thing. This will make it easier to review the
patches to ensure that they are correct, and to help alleviate any
merge issues that larger patches can cause.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply
* [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
From: Diego Fernando Mancera Gómez @ 2026-05-22 5:04 UTC (permalink / raw)
To: gregkh, linux-staging
Cc: m.steinmoetzger, guojy.bj, straube.linux, error27, linux-kernel,
Diego Fernando Mancera Gómez
Refactored redundant if-else blocks to a cleaner else-if structure in
odm_HWConfig.c and fixed indentation to use tabs as required by the
kernel coding style.
Signed-off-by: Diego Fernando Mancera Gómez <diegomancera.dev@gmail.com>
---
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index c88d669cb086..2e47734a0ae9 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -228,18 +228,11 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
odm_parsing_cfo(dm_odm, pkt_info, phy_sta_rpt->path_cfotail);
}
- /*
- * UI BSS List signal strength(in percentage), make it good
- * looking, from 0~100.
- * It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
- */
- if (is_cck_rate) {
+ if (is_cck_rate)
phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, pwdb_all));
- } else {
- if (rf_rx_num != 0) {
- phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
- }
- }
+ else if (rf_rx_num != 0)
+ phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
+
}
static void odm_Process_RSSIForDM(
@@ -437,4 +430,3 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
return HAL_STATUS_SUCCESS;
}
-
--
2.43.0
^ permalink raw reply related
* Re: [PATCH] staging: greybus: audio: expect 0 from kstrtoint(), not 1
From: Greg Kroah-Hartman @ 2026-05-22 5:07 UTC (permalink / raw)
To: Alexander A. Klimov
Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
Elise Lennion, moderated list:GREYBUS SUBSYSTEM,
open list:STAGING SUBSYSTEM, open list
In-Reply-To: <9caaf426-1912-43e0-949f-fb7bb6bbd1cc@al2klimov.de>
On Thu, May 21, 2026 at 08:42:06PM +0200, Alexander A. Klimov wrote:
>
>
> On 5/21/26 10:38, Greg Kroah-Hartman wrote:
> > On Wed, May 20, 2026 at 08:03:59PM +0200, Alexander A. Klimov wrote:
> > > kstrtoint() returns "0 on success, -ERANGE on overflow
> > > and -EINVAL on parsing error". In contrast,
> > > manager_sysfs_remove_store() and manager_sysfs_dump_store()
> > > checked for 1 which always failed the operation. I fixed this.
> > >
> > > Fixes: f9a21a3f4919 ("staging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion.")
> > > Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
> > > ---
> > > drivers/staging/greybus/audio_manager_sysfs.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/staging/greybus/audio_manager_sysfs.c b/drivers/staging/greybus/audio_manager_sysfs.c
> > > index fcd518f9540c..581791d566e3 100644
> > > --- a/drivers/staging/greybus/audio_manager_sysfs.c
> > > +++ b/drivers/staging/greybus/audio_manager_sysfs.c
> > > @@ -44,7 +44,7 @@ static ssize_t manager_sysfs_remove_store(struct kobject *kobj,
> > > int num = kstrtoint(buf, 10, &id);
> > > - if (num != 1)
> > > + if (num != 0)
> >
> > Doesn't checkpatch now complain about this?
> No.
>
> $ curl -fsSL https://lkml.org/lkml/diff/2026/5/20/2139/1 | scripts/checkpatch.pl
Please use lore.kernel.org, not lkml.
Also, when using b4 to apply this, it sucked in a bunch of other random
patches for you, please make new threads for everything you send.
> ERROR: Missing Signed-off-by: line(s)
Why is that showing up?
> total: 1 errors, 0 warnings, 0 checks, 16 lines checked
>
> NOTE: For some of the reported defects, checkpatch may be able to
> mechanically convert to the typical style using --fix or --fix-inplace.
What about trying --strict?
Anyway, think about rewriting the check for "== 0" now, that is not
normal kernel style.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v5 4/4] staging: rtl8723bs: fix lines ending in parentheses in hal/sdio_halinit.c
From: Greg KH @ 2026-05-22 5:09 UTC (permalink / raw)
To: Artur Ugnivenko; +Cc: linux-staging, linux-kernel, ahmet, error27
In-Reply-To: <20260521125604.4688-1-artur.ugnivenko@gmx.de>
On Thu, May 21, 2026 at 02:56:04PM +0200, Artur Ugnivenko wrote:
> Fix checkpatch warnings on lines that end in patentheses in
> hal/sdio_halinit.c.
>
> Signed-off-by: Artur Ugnivenko <artur.ugnivenko@gmx.de>
> ---
> drivers/staging/rtl8723bs/hal/sdio_halinit.c | 49 ++++++++++----------
> 1 file changed, 25 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> index e6570fa2e8fd..494fb74ad44f 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> @@ -74,7 +74,7 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
> rtw_write8(padapter, REG_CR, 0x00);
> /* Enable MAC DMA/WMAC/SCHEDULE/SEC block */
> value16 = rtw_read16(padapter, REG_CR);
> - value16 |= (
> + value16 |=
> HCI_TXDMA_EN |
> HCI_RXDMA_EN |
> TXDMA_EN |
> @@ -82,8 +82,7 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
> PROTOCOL_EN |
> SCHEDULE_EN |
> ENSEC |
> - CALTMR_EN
> - );
> + CALTMR_EN;
The original () is ok to keep.
> rtw_write16(padapter, REG_CR, value16);
>
> hal_btcoex_PowerOnSetting(padapter);
> @@ -188,15 +187,13 @@ static void _InitTxBufferBoundary(struct adapter *padapter)
> rtw_write8(padapter, REG_TDECTRL + 1, txpktbuf_bndy);
> }
>
> -static void _InitNormalChipRegPriority(
> - struct adapter *Adapter,
> - u16 beQ,
> - u16 bkQ,
> - u16 viQ,
> - u16 voQ,
> - u16 mgtQ,
> - u16 hiQ
> -)
> +static void _InitNormalChipRegPriority(struct adapter *Adapter,
> + u16 beQ,
> + u16 bkQ,
> + u16 viQ,
> + u16 voQ,
> + u16 mgtQ,
> + u16 hiQ)
You can do better than this :)
try making it multiple variables per line.
> {
> u16 value16 = (rtw_read16(Adapter, REG_TRXDMA_CTRL) & 0x7);
>
> @@ -231,9 +228,13 @@ static void _InitNormalChipOneOutEpPriority(struct adapter *Adapter)
> break;
> }
>
> - _InitNormalChipRegPriority(
> - Adapter, value, value, value, value, value, value
> - );
> + _InitNormalChipRegPriority(Adapter,
> + value,
> + value,
> + value,
> + value,
> + value,
> + value);
That's crazy, perhaps the function should be changed?
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
From: Ahmet Sezgin Duran @ 2026-05-22 5:22 UTC (permalink / raw)
To: Diego Fernando Mancera Gómez, gregkh, linux-staging
Cc: m.steinmoetzger, guojy.bj, straube.linux, error27, linux-kernel
In-Reply-To: <20260522050429.161273-1-diegomancera.dev@gmail.com>
On 5/22/26 8:04 AM, Diego Fernando Mancera Gómez wrote:
> Refactored redundant if-else blocks to a cleaner else-if structure in
> odm_HWConfig.c and fixed indentation to use tabs as required by the
> kernel coding style.
>
> Signed-off-by: Diego Fernando Mancera Gómez <diegomancera.dev@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 16 ++++------------
> 1 file changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> index c88d669cb086..2e47734a0ae9 100644
> --- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> +++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> @@ -228,18 +228,11 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
> odm_parsing_cfo(dm_odm, pkt_info, phy_sta_rpt->path_cfotail);
> }
>
> - /*
> - * UI BSS List signal strength(in percentage), make it good
> - * looking, from 0~100.
> - * It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
> - */
> - if (is_cck_rate) {
> + if (is_cck_rate)
> phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, pwdb_all));
> - } else {
> - if (rf_rx_num != 0) {
> - phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
> - }
> - }
> + else if (rf_rx_num != 0)
> + phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
> +
> }
>
> static void odm_Process_RSSIForDM(
> @@ -437,4 +430,3 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
>
> return HAL_STATUS_SUCCESS;
> }
> -
You need to add list of changes in your commit, as it's V2 right now.
> - /*
> - * UI BSS List signal strength(in percentage), make it good
> - * looking, from 0~100.
> - * It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
> - */
> - if (is_cck_rate) {
Why remove comments? Any reasoning?
> static void odm_Process_RSSIForDM(
> @@ -437,4 +430,3 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
>
> return HAL_STATUS_SUCCESS;
> }
>
You also removed a blank line, it's not related to your actual changes.
It's usually advised to do one type of change in a single commit.
Regards,
Ahmet Sezgin Duran
^ permalink raw reply
* Re: [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
From: Dan Carpenter @ 2026-05-22 5:35 UTC (permalink / raw)
To: Diego Fernando Mancera Gómez
Cc: gregkh, linux-staging, m.steinmoetzger, guojy.bj, straube.linux,
linux-kernel
In-Reply-To: <20260522050429.161273-1-diegomancera.dev@gmail.com>
On Thu, May 21, 2026 at 11:04:29PM -0600, Diego Fernando Mancera Gómez wrote:
> Refactored redundant if-else blocks to a cleaner else-if structure in
> odm_HWConfig.c and fixed indentation to use tabs as required by the
> kernel coding style.
>
> Signed-off-by: Diego Fernando Mancera Gómez <diegomancera.dev@gmail.com>
> ---
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/
Please wait a day between resends.
> drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 16 ++++------------
> 1 file changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> index c88d669cb086..2e47734a0ae9 100644
> --- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> +++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> @@ -228,18 +228,11 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
> odm_parsing_cfo(dm_odm, pkt_info, phy_sta_rpt->path_cfotail);
> }
>
> - /*
> - * UI BSS List signal strength(in percentage), make it good
> - * looking, from 0~100.
> - * It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
> - */
> - if (is_cck_rate) {
> + if (is_cck_rate)
> phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, pwdb_all));
> - } else {
> - if (rf_rx_num != 0) {
> - phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
> - }
> - }
> + else if (rf_rx_num != 0)
> + phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
> +
No need for this extra blank line.
> }
regards,
dan carpenter
>
> static void odm_Process_RSSIForDM(
> @@ -437,4 +430,3 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
>
> return HAL_STATUS_SUCCESS;
> }
> -
> --
> 2.43.0
>
^ permalink raw reply
* [PATCH] staging: rtl8723bs: fix operator spacing
From: omkarbhor4011 @ 2026-05-22 5:38 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Omkarbhor4011
From: Omkar Bhor <Omkarbhor4011@gmail.com>
Clean up operator spacing to match kernel coding style.
No functional change intended.
---
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 26 +++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index e794fe3ca..3bb1533e1 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -21,23 +21,23 @@ static void _FWDownloadEnable(struct adapter *padapter, bool enable)
rtw_write8(padapter, REG_SYS_FUNC_EN + 1, tmp | 0x04);
tmp = rtw_read8(padapter, REG_MCUFWDL);
- rtw_write8(padapter, REG_MCUFWDL, tmp|0x01);
+ rtw_write8(padapter, REG_MCUFWDL, tmp | 0x01);
do {
tmp = rtw_read8(padapter, REG_MCUFWDL);
if (tmp & 0x01)
break;
- rtw_write8(padapter, REG_MCUFWDL, tmp|0x01);
+ rtw_write8(padapter, REG_MCUFWDL, tmp | 0x01);
msleep(1);
} while (count++ < 100);
/* 8051 reset */
- tmp = rtw_read8(padapter, REG_MCUFWDL+2);
- rtw_write8(padapter, REG_MCUFWDL+2, tmp&0xf7);
+ tmp = rtw_read8(padapter, REG_MCUFWDL + 2);
+ rtw_write8(padapter, REG_MCUFWDL + 2, tmp & 0xf7);
} else {
/* MCU firmware download disable. */
tmp = rtw_read8(padapter, REG_MCUFWDL);
- rtw_write8(padapter, REG_MCUFWDL, tmp&0xfe);
+ rtw_write8(padapter, REG_MCUFWDL, tmp & 0xfe);
}
}
@@ -70,8 +70,8 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
if (remainSize_p1) {
offset = blockCount_p1 * blockSize_p1;
- blockCount_p2 = remainSize_p1/blockSize_p2;
- remainSize_p2 = remainSize_p1%blockSize_p2;
+ blockCount_p2 = remainSize_p1 / blockSize_p2;
+ remainSize_p2 = remainSize_p1 % blockSize_p2;
}
/* 3 Phase #3 */
@@ -104,8 +104,8 @@ static int _PageWrite(
u8 value8;
u8 u8Page = (u8) (page & 0x07);
- value8 = (rtw_read8(padapter, REG_MCUFWDL+2) & 0xF8) | u8Page;
- rtw_write8(padapter, REG_MCUFWDL+2, value8);
+ value8 = (rtw_read8(padapter, REG_MCUFWDL + 2) & 0xF8) | u8Page;
+ rtw_write8(padapter, REG_MCUFWDL + 2, value8);
return _BlockWrite(padapter, buffer, size);
}
@@ -124,7 +124,7 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size)
for (page = 0; page < pageNums; page++) {
offset = page * MAX_DLFW_PAGE_SIZE;
- ret = _PageWrite(padapter, page, bufferPtr+offset, MAX_DLFW_PAGE_SIZE);
+ ret = _PageWrite(padapter, page, bufferPtr + offset, MAX_DLFW_PAGE_SIZE);
if (ret == _FAIL) {
netdev_dbg(padapter->pnetdev, "page write failed at %s %d\n",
@@ -136,7 +136,7 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size)
if (remainSize) {
offset = pageNums * MAX_DLFW_PAGE_SIZE;
page = pageNums;
- ret = _PageWrite(padapter, page, bufferPtr+offset, remainSize);
+ ret = _PageWrite(padapter, page, bufferPtr + offset, remainSize);
if (ret == _FAIL) {
netdev_dbg(padapter->pnetdev, "remaining page write failed at %s %d\n",
@@ -195,7 +195,7 @@ static s32 polling_fwdl_chksum(
if (value32 & FWDL_ChkSum_rpt || adapter->bSurpriseRemoved || adapter->bDriverStopped)
break;
yield();
- } while (jiffies_to_msecs(jiffies-start) < timeout_ms || cnt < min_cnt);
+ } while (jiffies_to_msecs(jiffies - start) < timeout_ms || cnt < min_cnt);
if (!(value32 & FWDL_ChkSum_rpt)) {
goto exit;
@@ -1888,7 +1888,7 @@ void rtl8723b_fill_fake_txdesc(
if (IsPsPoll) {
SET_TX_DESC_NAV_USE_HDR_8723B(pDesc, 1);
} else {
- SET_TX_DESC_HWSEQ_EN_8723B(pDesc, 1); /* Hw set sequence number */
+ SET_TX_DESC_HWSEQ_EN_8723B(pDesc, 1);
SET_TX_DESC_HWSEQ_SEL_8723B(pDesc, 0);
}
--
2.54.0
^ permalink raw reply related
* [PATCH v3] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
From: Diego Fernando Mancera Gómez @ 2026-05-22 5:46 UTC (permalink / raw)
To: gregkh, linux-staging
Cc: m.steinmoetzger, guojy.bj, straube.linux, error27, linux-kernel,
Diego Fernando Mancera Gómez
Refactored redundant if-else blocks to a cleaner else-if structure in
odm_HWConfig.c and fixed indentation to use tabs as required by the
kernel coding style.
Signed-off-by: Diego Fernando Mancera Gómez <diegomancera.dev@gmail.com>
---
v3: Restored accidentally removed comments and blank line.
v2: Added commit body description and Signed-off-by tag.
v1: Initial cleanup of if-else logic.
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index c88d669cb086..abf3d96746b9 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -227,19 +227,16 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
odm_parsing_cfo(dm_odm, pkt_info, phy_sta_rpt->path_cfotail);
}
-
/*
* UI BSS List signal strength(in percentage), make it good
* looking, from 0~100.
* It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
*/
- if (is_cck_rate) {
+ if (is_cck_rate)
phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, pwdb_all));
- } else {
- if (rf_rx_num != 0) {
- phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
- }
- }
+ else if (rf_rx_num != 0)
+ phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
+
}
static void odm_Process_RSSIForDM(
--
2.43.0
^ permalink raw reply related
* Re: [PATCH] staging: rtl8723bs: fix operator spacing
From: Dan Carpenter @ 2026-05-22 5:46 UTC (permalink / raw)
To: omkarbhor4011; +Cc: gregkh, linux-staging, linux-kernel
In-Reply-To: <20260522053854.188893-1-omkarbhor4011@gmail.com>
On Fri, May 22, 2026 at 11:08:54AM +0530, omkarbhor4011@gmail.com wrote:
> @@ -1888,7 +1888,7 @@ void rtl8723b_fill_fake_txdesc(
> if (IsPsPoll) {
> SET_TX_DESC_NAV_USE_HDR_8723B(pDesc, 1);
> } else {
> - SET_TX_DESC_HWSEQ_EN_8723B(pDesc, 1); /* Hw set sequence number */
> + SET_TX_DESC_HWSEQ_EN_8723B(pDesc, 1);
Why delete the comment?
regards,
dan carpenter
> SET_TX_DESC_HWSEQ_SEL_8723B(pDesc, 0);
> }
^ permalink raw reply
* Re: [PATCH] staging: rtl8723bs: fix operator spacing
From: Dan Carpenter @ 2026-05-22 5:47 UTC (permalink / raw)
To: omkarbhor4011; +Cc: gregkh, linux-staging, linux-kernel
In-Reply-To: <20260522053854.188893-1-omkarbhor4011@gmail.com>
On Fri, May 22, 2026 at 11:08:54AM +0530, omkarbhor4011@gmail.com wrote:
> From: Omkar Bhor <Omkarbhor4011@gmail.com>
>
> Clean up operator spacing to match kernel coding style.
>
> No functional change intended.
> ---
Run your patches through checkpatch. Wait a day between resends.
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH v3] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
From: Dan Carpenter @ 2026-05-22 5:48 UTC (permalink / raw)
To: Diego Fernando Mancera Gómez
Cc: gregkh, linux-staging, m.steinmoetzger, guojy.bj, straube.linux,
linux-kernel
In-Reply-To: <20260522054624.190256-1-diegomancera.dev@gmail.com>
On Thu, May 21, 2026 at 11:46:24PM -0600, Diego Fernando Mancera Gómez wrote:
> Refactored redundant if-else blocks to a cleaner else-if structure in
> odm_HWConfig.c and fixed indentation to use tabs as required by the
> kernel coding style.
>
> Signed-off-by: Diego Fernando Mancera Gómez <diegomancera.dev@gmail.com>
> ---
Please slow down. Wait a day between resends.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH] Staging: sm750fb: Change camelCase to snake_case
From: Dan Carpenter @ 2026-05-22 5:49 UTC (permalink / raw)
To: Michail Tatas
Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
linux-kernel
In-Reply-To: <ag-XlRifxjqXF-Zx@michalis-linux>
On Fri, May 22, 2026 at 02:39:01AM +0300, Michail Tatas wrote:
> Change variable names from camelCase to snake_case
> as per the Linux Kernel standards.
>
> These changes remove 9 CHECK messages from checkpatch.pl
> regarding sm750.c, sm750.h and sm750_hw.c
>
> Tested changes by building the module sm750fb/
Don't put this kind of meta comment in the commit message. Put it
under the --- cur off line.
Please wait a day between resends.
I don't think you're working against the correct staging-next
tree.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH] staging: greybus: audio: expect 0 from kstrtoint(), not 1
From: Alexander A. Klimov @ 2026-05-22 5:54 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
Elise Lennion, moderated list:GREYBUS SUBSYSTEM,
open list:STAGING SUBSYSTEM, open list
In-Reply-To: <2026052249-shrank-trophy-14ff@gregkh>
[-- Attachment #1: Type: text/plain, Size: 2767 bytes --]
On 5/22/26 07:07, Greg Kroah-Hartman wrote:
> On Thu, May 21, 2026 at 08:42:06PM +0200, Alexander A. Klimov wrote:
>>
>>
>> On 5/21/26 10:38, Greg Kroah-Hartman wrote:
>>> On Wed, May 20, 2026 at 08:03:59PM +0200, Alexander A. Klimov wrote:
>>>> kstrtoint() returns "0 on success, -ERANGE on overflow
>>>> and -EINVAL on parsing error". In contrast,
>>>> manager_sysfs_remove_store() and manager_sysfs_dump_store()
>>>> checked for 1 which always failed the operation. I fixed this.
>>>>
>>>> Fixes: f9a21a3f4919 ("staging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion.")
>>>> Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
>>>> ---
>>>> drivers/staging/greybus/audio_manager_sysfs.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/staging/greybus/audio_manager_sysfs.c b/drivers/staging/greybus/audio_manager_sysfs.c
>>>> index fcd518f9540c..581791d566e3 100644
>>>> --- a/drivers/staging/greybus/audio_manager_sysfs.c
>>>> +++ b/drivers/staging/greybus/audio_manager_sysfs.c
>>>> @@ -44,7 +44,7 @@ static ssize_t manager_sysfs_remove_store(struct kobject *kobj,
>>>> int num = kstrtoint(buf, 10, &id);
>>>> - if (num != 1)
>>>> + if (num != 0)
>>>
>>> Doesn't checkpatch now complain about this?
>> No.
>>
>> $ curl -fsSL https://lkml.org/lkml/diff/2026/5/20/2139/1 | scripts/checkpatch.pl
>
> Please use lore.kernel.org, not lkml.
>
> Also, when using b4 to apply this, it sucked in a bunch of other random
> patches for you, please make new threads for everything you send.
>
>> ERROR: Missing Signed-off-by: line(s)
>
> Why is that showing up?
As I already said, https://lkml.org/lkml/diff/2026/5/20/2139/1
cuts off the commit message.
>
>> total: 1 errors, 0 warnings, 0 checks, 16 lines checked
>>
>> NOTE: For some of the reported defects, checkpatch may be able to
>> mechanically convert to the typical style using --fix or --fix-inplace.
>
> What about trying --strict?
~/Code/linux remotes/origin/HEAD
❯ scripts/checkpatch.pl --strict 0001-*
total: 0 errors, 0 warnings, 0 checks, 16 lines checked
0001-staging-greybus-audio-expect-0-from-kstrtoint-not-1.patch has no obvious style problems and is ready for submission.
~/Code/linux remotes/origin/HEAD
❯ git log -1 --oneline
758c807bb943 (HEAD, origin/master, origin/HEAD) Merge tag 'efi-fixes-for-v7.1-2' of git://
git.kernel.org/pub/scm/linux/kernel/git/efi/efi
~/Code/linux remotes/origin/HEAD
❯
I attached 0001-* as .gz, so everyone can verify my claim.
>
> Anyway, think about rewriting the check for "== 0" now, that is not
I'll send v2 in a minute.
I **guess** you want X,!X instead of X!=0,X==0.
> normal kernel style.
;-)
git grep -nFe '== 0)'|wc -l
[-- Attachment #2: 0001-staging-greybus-audio-expect-0-from-kstrtoint-not-1.patch.gz --]
[-- Type: application/gzip, Size: 775 bytes --]
^ permalink raw reply
* Re: [PATCH] staging: rtl8723bs: remove unused rtl8192c function declarations
From: Dan Carpenter @ 2026-05-22 5:54 UTC (permalink / raw)
To: Pang-Chun Liu; +Cc: gregkh, linux-staging, linux-kernel
In-Reply-To: <20260521144113.28869-1-kevin95120@gmail.com>
On Thu, May 21, 2026 at 10:41:12PM +0800, Pang-Chun Liu wrote:
> rtl8192c_translate_rx_signal_stuff() and rtl8192c_query_rx_desc_status()
> are declared in rtl8192c_recv.h but neither has a definition anywhere
> in the driver, and there are no callers. Remove the dead declarations.
>
> Signed-off-by: Pang-Chun Liu <kevin95120@gmail.com>
> ---
This kind of commit doesn't get a Fixes tag since it's not a bug, but
I'm always interested to see how mistakes happen. It's better if the
commit message can say which commit added it. In this case the dead
code was added when we initially merged the driver so it's fine.
Reviewed-by: Dan Carpenter <error27@gmail.com>
regards,
dan carpenter
^ permalink raw reply
* [PATCH v2] staging: greybus: audio: expect 0 from kstrtoint(), not 1
From: Alexander A. Klimov @ 2026-05-22 5:53 UTC (permalink / raw)
To: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
Greg Kroah-Hartman, Elise Lennion,
moderated list:GREYBUS SUBSYSTEM, open list:STAGING SUBSYSTEM,
open list
Cc: Alexander A. Klimov
kstrtoint() returns "0 on success, -ERANGE on overflow
and -EINVAL on parsing error". In contrast,
manager_sysfs_remove_store() and manager_sysfs_dump_store()
checked for 1 which always failed the operation. I fixed this.
Fixes: f9a21a3f4919 ("staging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion.")
Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
---
v2: style (X,!X instead of X!=0,X==0)
drivers/staging/greybus/audio_manager_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/audio_manager_sysfs.c b/drivers/staging/greybus/audio_manager_sysfs.c
index fcd518f9540c..581791d566e3 100644
--- a/drivers/staging/greybus/audio_manager_sysfs.c
+++ b/drivers/staging/greybus/audio_manager_sysfs.c
@@ -44,7 +44,7 @@ static ssize_t manager_sysfs_remove_store(struct kobject *kobj,
int num = kstrtoint(buf, 10, &id);
- if (num != 1)
+ if (num)
return -EINVAL;
num = gb_audio_manager_remove(id);
@@ -65,7 +65,7 @@ static ssize_t manager_sysfs_dump_store(struct kobject *kobj,
int num = kstrtoint(buf, 10, &id);
- if (num == 1) {
+ if (!num) {
num = gb_audio_manager_dump_module(id);
if (num)
return num;
--
2.54.0
^ permalink raw reply related
* Re: [PATCH 1/2] staging: sm750fb: rename CamelCase variable pvReg and drop prefix
From: Jinyuan Guo @ 2026-05-22 6:14 UTC (permalink / raw)
To: Greg KH; +Cc: linux-staging
In-Reply-To: <2026052129-sudoku-stimulate-756d@gregkh>
On Thu, May 21, 2026 at 2:11 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, May 11, 2026 at 10:41:23AM -0700, Jennifer Guo wrote:
> > Renames the CamelCase variable 'pvReg' in struct sm750_dev to 'vreg'.
> > Dropping the pointer prefix 'p'.
>
> Why are you keeping the prefix "v"?
>
> Please don't keep the "hungarian" notation at all.
Thanks for the feedback!
Based on reading the surrounding code in the header - specifically
vidmem_size and vidreg_size - I assumed the 'v' stood for video
(and not void) and should thus be kept.
One related note, I have another committed patch: f50b4602fea6
(staging: sm750fb: rename CamelCase variable and drop prefix)
where I renamed 'pvMem' to 'vmem', so depending on what the conclusion
here is, should I then also update 'vmem' ?
Best,
Jennifer
P.S: First reply here, hope I got the email formatting correct...
^ permalink raw reply
* Re: [PATCH 1/2] staging: sm750fb: rename CamelCase variable pvReg and drop prefix
From: Greg KH @ 2026-05-22 6:22 UTC (permalink / raw)
To: Jinyuan Guo; +Cc: linux-staging
In-Reply-To: <CAGRbmwj0=ybZSyV+xPzHo3T=5b+cpCvyt0du=4dhw_Tuv_6n0g@mail.gmail.com>
On Thu, May 21, 2026 at 11:14:45PM -0700, Jinyuan Guo wrote:
> On Thu, May 21, 2026 at 2:11 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Mon, May 11, 2026 at 10:41:23AM -0700, Jennifer Guo wrote:
> > > Renames the CamelCase variable 'pvReg' in struct sm750_dev to 'vreg'.
> > > Dropping the pointer prefix 'p'.
> >
> > Why are you keeping the prefix "v"?
> >
> > Please don't keep the "hungarian" notation at all.
>
> Thanks for the feedback!
>
> Based on reading the surrounding code in the header - specifically
> vidmem_size and vidreg_size - I assumed the 'v' stood for video
> (and not void) and should thus be kept.
>
> One related note, I have another committed patch: f50b4602fea6
> (staging: sm750fb: rename CamelCase variable and drop prefix)
> where I renamed 'pvMem' to 'vmem', so depending on what the conclusion
> here is, should I then also update 'vmem' ?
You probably should fix that up too, sorry for missing that.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 14/16] media: sun6i-isp: Use V4L2 subdev active state
From: Paul Kocialkowski @ 2026-05-22 11:15 UTC (permalink / raw)
To: arash golgol
Cc: linux-media, linux-arm-kernel, linux-sunxi, linux-kernel,
linux-staging, Mauro Carvalho Chehab, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Greg Kroah-Hartman,
Laurent Pinchart, Nicolas Dufresne
In-Reply-To: <CAMxPZkg9MgZrsM2L0vKzzUOA_tnSLKHdHkzDsfH5_WRqSQgvZg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
Hi Arash,
Le Thu 21 May 26, 12:53, arash golgol a écrit :
> I used LicheePi Zero Dock (V3s) with the following pipeline as test setup.
>
> ov5647 -> sun6i-mipi-csi2 -> sun6i-csi-bridge -> sun6i-isp-proc ->
> sun6i-isp-capture
>
> I verified TRY and ACTIVE state handling, including changing TRY
> formats without affecting ACTIVE state. Format propagation from the
> sink (csi) pad to the source pad was also tested.
>
> I also tested streaming with the sensor test pattern enabled and
> verified the captured output was correct.
>
> Tested-by: Arash Golgol <arash.golgol@gmail.com>
Thanks a lot for testing this! Did you test just this patch or the other
ones (especially sun6i-csi format enumeration) as well?
Also if you have an opinion on the code itself feel free to drop a
Reviewed-by tag, a lot of this work is very similar to what you did for
sun6i-csi and other drivers.
All the best,
Paul
--
Paul Kocialkowski,
Independent contractor - sys-base - https://www.sys-base.io/
Free software developer - https://www.paulk.fr/
Expert in multimedia, graphics and embedded hardware support with Linux.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* [PATCH v2 0/3] staging: cleanup of sdio_intf.c
From: Manuel Ebner @ 2026-05-22 11:43 UTC (permalink / raw)
To: Greg Kroah-Hartman, Omer El Idrissi, open list:STAGING SUBSYSTEM,
open list
Cc: Manuel Ebner
did i overdo the split up?
[v2]
split patch into series
Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
---
^ permalink raw reply
* [PATCH v2 1/3] staging: sdio_intf.c: refactor function
From: Manuel Ebner @ 2026-05-22 11:55 UTC (permalink / raw)
To: manuelebner; +Cc: gregkh, linux-kernel, linux-staging, omer.e.idrissi
In-Reply-To: <20260522114317.189368-4-manuelebner@mailbox.org>
remove unused argument of rtw_sdio_if1_init()
Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 1d0239eef114..4439ded602b6 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -237,7 +237,7 @@ static void sd_intf_stop(struct adapter *padapter)
}
-static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct sdio_device_id *pdid)
+static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj)
{
int status = _FAIL;
struct net_device *pnetdev;
@@ -368,7 +368,7 @@ static int rtw_drv_init(
if (!dvobj)
goto exit;
- if1 = rtw_sdio_if1_init(dvobj, id);
+ if1 = rtw_sdio_if1_init(dvobj);
if (!if1)
goto free_dvobj;
--
2.54.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox