* [PATCH 3/3] staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in rtw_ap.c
From: Moksh Panicker @ 2026-06-19 2:22 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, skhan, Moksh Panicker
In-Reply-To: <20260619022210.143940-1-mokshpanicker.7@gmail.com>
Replace bare use of 'uint' with 'unsigned int' in multiple functions
in rtw_ap.c. This fixes the following checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_ap.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 4b4012411..d4aca0c0c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -60,7 +60,7 @@ static void update_BCNTIM(struct adapter *padapter)
/* update TIM IE */
u8 *p, *dst_ie, *premainder_ie = NULL, *pbackup_remainder_ie = NULL;
__le16 tim_bitmap_le;
- uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen;
+ unsigned int offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen;
tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap);
@@ -156,7 +156,7 @@ static void update_BCNTIM(struct adapter *padapter)
kfree(pbackup_remainder_ie);
}
- offset = (uint)(dst_ie - pie);
+ offset = (unsigned int)(dst_ie - pie);
pnetwork_mlmeext->ie_length = offset + remainder_ielen;
}
@@ -801,7 +801,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
u8 *pHT_info_ie = NULL;
struct sta_info *psta = NULL;
u16 cap, ht_cap = false;
- uint ie_len = 0;
+ unsigned int ie_len = 0;
int group_cipher, pairwise_cipher;
u8 channel, network_type, support_rate[NDIS_802_11_LENGTH_RATES_EX];
int support_rate_num = 0;
@@ -1408,7 +1408,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
u8 *premainder_ie;
u8 *pbackup_remainder_ie = NULL;
- uint wps_ielen = 0, wps_offset, remainder_ielen;
+ unsigned int wps_ielen = 0, wps_offset, remainder_ielen;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -1428,7 +1428,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
if (!pwps_ie_src)
return;
- wps_offset = (uint)(pwps_ie - ie);
+ wps_offset = (unsigned int)(pwps_ie - ie);
premainder_ie = pwps_ie + wps_ielen;
@@ -1437,7 +1437,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
if (remainder_ielen)
pbackup_remainder_ie = kmemdup(premainder_ie, remainder_ielen, GFP_ATOMIC);
- wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
+ wps_ielen = (unsigned int)pwps_ie_src[1];/* to get ie data len */
if ((wps_offset + wps_ielen + 2 + remainder_ielen) <= MAX_IE_SZ) {
memcpy(pwps_ie, pwps_ie_src, wps_ielen + 2);
pwps_ie += (wps_ielen + 2);
--
2.34.1
^ permalink raw reply related
* [PATCH 2/3] staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in xmit_linux.c
From: Moksh Panicker @ 2026-06-19 2:22 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, skhan, Moksh Panicker
In-Reply-To: <20260619022210.143940-1-mokshpanicker.7@gmail.com>
Replace bare use of 'uint' with 'unsigned int' in rtw_remainder_len()
function definition and its declaration in xmit_osdep.h.
This fixes the following checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
---
drivers/staging/rtl8723bs/include/xmit_osdep.h | 2 +-
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/xmit_osdep.h b/drivers/staging/rtl8723bs/include/xmit_osdep.h
index 880344bff..b47b3f0c6 100644
--- a/drivers/staging/rtl8723bs/include/xmit_osdep.h
+++ b/drivers/staging/rtl8723bs/include/xmit_osdep.h
@@ -33,7 +33,7 @@ void rtw_os_xmit_schedule(struct adapter *padapter);
int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag);
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag);
-extern uint rtw_remainder_len(struct pkt_file *pfile);
+extern unsigned int rtw_remainder_len(struct pkt_file *pfile);
extern void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
int _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, unsigned int rlen);
extern signed int rtw_endofpktfile(struct pkt_file *pfile);
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index dc0b77f38..5c82b60cb 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -7,7 +7,7 @@
#include <drv_types.h>
-uint rtw_remainder_len(struct pkt_file *pfile)
+unsigned int rtw_remainder_len(struct pkt_file *pfile)
{
return (pfile->buf_len - ((SIZE_PTR)(pfile->cur_addr) - (SIZE_PTR)(pfile->buf_start)));
}
--
2.34.1
^ permalink raw reply related
* [PATCH 1/3] staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in rtw_cmd.c
From: Moksh Panicker @ 2026-06-19 2:22 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, skhan, Moksh Panicker
In-Reply-To: <20260619022210.143940-1-mokshpanicker.7@gmail.com>
Replace bare use of 'uint' with 'unsigned int' in rtw_joinbss_cmd().
This fixes the following checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index c1185c25e..e6054d814 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -672,7 +672,7 @@ int rtw_startbss_cmd(struct adapter *padapter, int flags)
u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
{
u8 res = _SUCCESS;
- uint t_len = 0;
+ unsigned int t_len = 0;
struct wlan_bssid_ex *psecnetwork;
struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
--
2.34.1
^ permalink raw reply related
* [PATCH 0/3] staging: rtl8723bs: Replace bare 'uint' with 'unsigned int'
From: Moksh Panicker @ 2026-06-19 2:22 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, skhan, Moksh Panicker
This series replaces bare uses of 'uint' with 'unsigned int' in the
rtl8723bs staging driver, as part of cleaning up unusual variable types
listed in the driver's TODO file.
Each patch addresses one file independently.
Moksh Panicker (3):
staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in rtw_cmd.c
staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in xmit_linux.c
staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in rtw_ap.c
^ permalink raw reply
* [PATCH] staging: rtl8723bs: fix coding style issues in rtl8723b_cmd.c
From: Kai Cheng Jin @ 2026-06-19 0:25 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Kai Cheng Jin
Add missing spaces around arithmetic and bitwise operators,
remove unnecessary parentheses after address-of operators, and
clean up extra blank lines, as reported by checkpatch.pl.
Signed-off-by: Kai Cheng Jin <kj@kylejin.com>
---
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 137 +++++++++----------
1 file changed, 66 insertions(+), 71 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index c35c7f1c38ef..6589d0a20122 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -70,23 +70,23 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd
goto exit;
if (CmdLen <= 3)
- memcpy((u8 *)(&h2c_cmd)+1, pCmdBuffer, CmdLen);
+ memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, CmdLen);
else {
- memcpy((u8 *)(&h2c_cmd)+1, pCmdBuffer, 3);
- memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer+3, CmdLen-3);
-/* *(u8 *)(&h2c_cmd) |= BIT(7); */
+ memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, 3);
+ memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, CmdLen - 3);
+/* *(u8 *)(&h2c_cmd) |= BIT(7); */
}
*(u8 *)(&h2c_cmd) |= ElementID;
if (CmdLen > 3) {
- msgbox_ex_addr = REG_HMEBOX_EXT0_8723B + (h2c_box_num*RTL8723B_EX_MESSAGE_BOX_SIZE);
+ msgbox_ex_addr = REG_HMEBOX_EXT0_8723B + (h2c_box_num * RTL8723B_EX_MESSAGE_BOX_SIZE);
rtw_write32(padapter, msgbox_ex_addr, h2c_cmd_ex);
}
- msgbox_addr = REG_HMEBOX_0 + (h2c_box_num*MESSAGE_BOX_SIZE);
+ msgbox_addr = REG_HMEBOX_0 + (h2c_box_num * MESSAGE_BOX_SIZE);
rtw_write32(padapter, msgbox_addr, h2c_cmd);
- pHalData->LastHMEBoxNum = (h2c_box_num+1) % MAX_H2C_BOX_NUMS;
+ pHalData->LastHMEBoxNum = (h2c_box_num + 1) % MAX_H2C_BOX_NUMS;
} while (0);
@@ -103,17 +103,17 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
struct ieee80211_hdr *pwlanhdr;
__le16 *fctrl;
u32 rate_len, pktlen;
- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
+ struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
+ struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
pwlanhdr = (struct ieee80211_hdr *)pframe;
- fctrl = &(pwlanhdr->frame_control);
+ fctrl = &pwlanhdr->frame_control;
*(fctrl) = 0;
eth_broadcast_addr(pwlanhdr->addr1);
- ether_addr_copy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)));
+ ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
ether_addr_copy(pwlanhdr->addr3, get_my_bssid(cur_network));
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
@@ -139,9 +139,9 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
pframe += 2;
pktlen += 2;
- if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
+ if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
pktlen += cur_network->ie_length - sizeof(struct ndis_802_11_fix_ie);
- memcpy(pframe, cur_network->ies+sizeof(struct ndis_802_11_fix_ie), pktlen);
+ memcpy(pframe, cur_network->ies + sizeof(struct ndis_802_11_fix_ie), pktlen);
goto _ConstructBeacon;
}
@@ -156,9 +156,9 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->supported_rates, &pktlen);
/* DS parameter set */
- pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->configuration.ds_config), &pktlen);
+ pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&cur_network->configuration.ds_config, &pktlen);
- if ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) {
+ if ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) {
u32 ATIMWindow;
/* IBSS Parameter Set... */
/* ATIMWindow = cur->configuration.ATIMWindow; */
@@ -180,20 +180,19 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength)
return;
*pLength = pktlen;
-
}
static void ConstructPSPoll(struct adapter *padapter, u8 *pframe, u32 *pLength)
{
struct ieee80211_hdr *pwlanhdr;
__le16 *fctrl;
- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
+ struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
pwlanhdr = (struct ieee80211_hdr *)pframe;
/* Frame control. */
- fctrl = &(pwlanhdr->frame_control);
+ fctrl = &pwlanhdr->frame_control;
*(fctrl) = 0;
SetPwrMgt(fctrl);
SetFrameSubType(pframe, WIFI_PSPOLL);
@@ -202,10 +201,10 @@ static void ConstructPSPoll(struct adapter *padapter, u8 *pframe, u32 *pLength)
SetDuration(pframe, (pmlmeinfo->aid | 0xc000));
/* BSSID. */
- ether_addr_copy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)));
+ ether_addr_copy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network));
/* TA. */
- ether_addr_copy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)));
+ ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
*pLength = 16;
}
@@ -226,8 +225,8 @@ static void ConstructNullFunctionData(
u32 pktlen;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_network *cur_network = &pmlmepriv->cur_network;
- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
+ struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
pwlanhdr = (struct ieee80211_hdr *)pframe;
@@ -239,21 +238,21 @@ static void ConstructNullFunctionData(
switch (cur_network->network.infrastructure_mode) {
case Ndis802_11Infrastructure:
SetToDs(fctrl);
- ether_addr_copy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)));
- ether_addr_copy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)));
+ ether_addr_copy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network));
+ ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
ether_addr_copy(pwlanhdr->addr3, StaAddr);
break;
case Ndis802_11APMode:
SetFrDs(fctrl);
ether_addr_copy(pwlanhdr->addr1, StaAddr);
- ether_addr_copy(pwlanhdr->addr2, get_my_bssid(&(pmlmeinfo->network)));
- ether_addr_copy(pwlanhdr->addr3, myid(&(padapter->eeprompriv)));
+ ether_addr_copy(pwlanhdr->addr2, get_my_bssid(&pmlmeinfo->network));
+ ether_addr_copy(pwlanhdr->addr3, myid(&padapter->eeprompriv));
break;
case Ndis802_11IBSS:
default:
ether_addr_copy(pwlanhdr->addr1, StaAddr);
- ether_addr_copy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)));
- ether_addr_copy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)));
+ ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
+ ether_addr_copy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network));
break;
}
@@ -324,7 +323,7 @@ void rtl8723b_set_rssi_cmd(struct adapter *padapter, u8 *param)
{
u8 u1H2CRssiSettingParm[H2C_RSSI_SETTING_LEN] = {0};
u8 mac_id = *param;
- u8 rssi = *(param+2);
+ u8 rssi = *(param + 2);
u8 uldl_state = 0;
SET_8723B_H2CCMD_RSSI_SETTING_MACID(u1H2CRssiSettingParm, mac_id);
@@ -343,7 +342,7 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode)
u8 PowerState = 0, awake_intvl = 1, byte5 = 0, rlbm = 0;
if (pwrpriv->dtim > 0 && pwrpriv->dtim < 16)
- awake_intvl = pwrpriv->dtim+1;/* DTIM = (awake_intvl - 1) */
+ awake_intvl = pwrpriv->dtim + 1;/* DTIM = (awake_intvl - 1) */
else
awake_intvl = 3;/* DTIM =2 */
@@ -394,7 +393,7 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode)
pmlmeext->DrvBcnTimeOut = 0xff;
for (i = 0; i < 9; i++) {
- pmlmeext->bcn_delay_ratio[i] = (pmlmeext->bcn_delay_cnt[i]*100)/pmlmeext->bcn_cnt;
+ pmlmeext->bcn_delay_ratio[i] = (pmlmeext->bcn_delay_cnt[i] * 100) / pmlmeext->bcn_cnt;
ratio_20_delay += pmlmeext->bcn_delay_ratio[i];
ratio_80_delay += pmlmeext->bcn_delay_ratio[i];
@@ -408,12 +407,10 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode)
/* reset adaptive_early_32k cnt */
pmlmeext->bcn_delay_cnt[i] = 0;
pmlmeext->bcn_delay_ratio[i] = 0;
-
}
pmlmeext->bcn_cnt = 0;
pmlmeext->adaptive_tsf_done = true;
-
}
/* offload to FW if fw version > v15.10
@@ -423,7 +420,6 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode)
if ((pmlmeext->DrvBcnEarly!= 0Xff) && (pmlmeext->DrvBcnTimeOut!= 0xff))
u1H2CPwrModeParm[H2C_PWRMODE_LEN-1] = BIT(0) | ((pmlmeext->DrvBcnEarly<<1)&0x0E) |((pmlmeext->DrvBcnTimeOut<<4)&0xf0) ;
*/
-
}
hal_btcoex_RecordPwrMode(padapter, u1H2CPwrModeParm, H2C_PWRMODE_LEN);
@@ -450,7 +446,6 @@ void rtl8723b_set_FwPsTuneParam_cmd(struct adapter *padapter)
void rtl8723b_set_FwPwrModeInIPS_cmd(struct adapter *padapter, u8 cmd_param)
{
-
FillH2CCmd8723B(padapter, H2C_8723B_FWLPS_IN_IPS_, 1, &cmd_param);
}
@@ -493,7 +488,7 @@ static void rtl8723b_set_FwRsvdPagePkt(
pmlmeinfo = &pmlmeext->mlmext_info;
RsvdPageNum = BCNQ_PAGE_NUM_8723B + WOWLAN_PAGE_NUM_8723B;
- MaxRsvdPageBufSize = RsvdPageNum*PageSize;
+ MaxRsvdPageBufSize = RsvdPageNum * PageSize;
pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv);
if (!pcmdframe)
@@ -515,18 +510,18 @@ static void rtl8723b_set_FwRsvdPagePkt(
TotalPageNum += CurtPktPageNum;
- BufIndex += (CurtPktPageNum*PageSize);
+ BufIndex += (CurtPktPageNum * PageSize);
/* 3 (2) ps-poll */
RsvdPageLoc.LocPsPoll = TotalPageNum;
ConstructPSPoll(padapter, &ReservedPagePacket[BufIndex], &PSPollLength);
- rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], PSPollLength, true, false, false);
+ rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex - TxDescLen], PSPollLength, true, false, false);
CurtPktPageNum = (u8)PageNum_128(TxDescLen + PSPollLength);
TotalPageNum += CurtPktPageNum;
- BufIndex += (CurtPktPageNum*PageSize);
+ BufIndex += (CurtPktPageNum * PageSize);
/* 3 (3) null data */
RsvdPageLoc.LocNullData = TotalPageNum;
@@ -537,13 +532,13 @@ static void rtl8723b_set_FwRsvdPagePkt(
get_my_bssid(&pmlmeinfo->network),
false, 0, 0, false
);
- rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], NullDataLength, false, false, false);
+ rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex - TxDescLen], NullDataLength, false, false, false);
CurtPktPageNum = (u8)PageNum_128(TxDescLen + NullDataLength);
TotalPageNum += CurtPktPageNum;
- BufIndex += (CurtPktPageNum*PageSize);
+ BufIndex += (CurtPktPageNum * PageSize);
/* 3 (5) Qos null data */
RsvdPageLoc.LocQosNull = TotalPageNum;
@@ -554,13 +549,13 @@ static void rtl8723b_set_FwRsvdPagePkt(
get_my_bssid(&pmlmeinfo->network),
true, 0, 0, false
);
- rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], QosNullLength, false, false, false);
+ rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex - TxDescLen], QosNullLength, false, false, false);
CurtPktPageNum = (u8)PageNum_128(TxDescLen + QosNullLength);
TotalPageNum += CurtPktPageNum;
- BufIndex += (CurtPktPageNum*PageSize);
+ BufIndex += (CurtPktPageNum * PageSize);
/* 3 (6) BT Qos null data */
RsvdPageLoc.LocBTQosNull = TotalPageNum;
@@ -571,13 +566,13 @@ static void rtl8723b_set_FwRsvdPagePkt(
get_my_bssid(&pmlmeinfo->network),
true, 0, 0, false
);
- rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], BTQosNullLength, false, true, false);
+ rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex - TxDescLen], BTQosNullLength, false, true, false);
CurtPktPageNum = (u8)PageNum_128(TxDescLen + BTQosNullLength);
TotalPageNum += CurtPktPageNum;
- BufIndex += (CurtPktPageNum*PageSize);
+ BufIndex += (CurtPktPageNum * PageSize);
TotalPacketLen = BufIndex + BTQosNullLength;
@@ -605,8 +600,8 @@ static void rtl8723b_set_FwRsvdPagePkt(
void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
{
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
+ struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
bool bcn_valid = false;
u8 DLBcnCount = 0;
u32 poll = 0;
@@ -618,12 +613,12 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
/* We should set AID, correct TSF, HW seq enable before set JoinBssReport to Fw in 88/92C. */
/* Suggested by filen. Added by tynli. */
- rtw_write16(padapter, REG_BCN_PSR_RPT, (0xC000|pmlmeinfo->aid));
+ rtw_write16(padapter, REG_BCN_PSR_RPT, (0xC000 | pmlmeinfo->aid));
/* set REG_CR bit 8 */
- v8 = rtw_read8(padapter, REG_CR+1);
+ v8 = rtw_read8(padapter, REG_CR + 1);
v8 |= BIT(0); /* ENSWBCN */
- rtw_write8(padapter, REG_CR+1, v8);
+ rtw_write8(padapter, REG_CR + 1, v8);
/* Disable Hw protection for a time which revserd for Hw sending beacon. */
/* Fix download reserved page packet fail that access collision with the protection time. */
@@ -638,7 +633,7 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
bRecover = true;
/* To tell Hw the packet is not a real beacon frame. */
- rtw_write8(padapter, REG_FWHW_TXQ_CTRL+2, pHalData->RegFwHwTxQCtrl & ~BIT(6));
+ rtw_write8(padapter, REG_FWHW_TXQ_CTRL + 2, pHalData->RegFwHwTxQCtrl & ~BIT(6));
pHalData->RegFwHwTxQCtrl &= ~BIT(6);
/* Clear beacon valid check bit. */
@@ -657,7 +652,7 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
/* check rsvd page download OK. */
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid));
poll++;
- } while (!bcn_valid && (poll%10) != 0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
+ } while (!bcn_valid && (poll % 10) != 0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
} while (!bcn_valid && DLBcnCount <= 100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
@@ -680,14 +675,14 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
/* the beacon cannot be sent by HW. */
/* 2010.06.23. Added by tynli. */
if (bRecover) {
- rtw_write8(padapter, REG_FWHW_TXQ_CTRL+2, pHalData->RegFwHwTxQCtrl | BIT(6));
+ rtw_write8(padapter, REG_FWHW_TXQ_CTRL + 2, pHalData->RegFwHwTxQCtrl | BIT(6));
pHalData->RegFwHwTxQCtrl |= BIT(6);
}
/* Clear CR[8] or beacon packet will not be send to TxBuf anymore. */
- v8 = rtw_read8(padapter, REG_CR+1);
+ v8 = rtw_read8(padapter, REG_CR + 1);
v8 &= ~BIT(0); /* ~ENSWBCN */
- rtw_write8(padapter, REG_CR+1, v8);
+ rtw_write8(padapter, REG_CR + 1, v8);
}
}
@@ -710,13 +705,13 @@ void rtl8723b_Add_RateATid(
{
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
+ struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct sta_info *psta;
u8 mac_id = arg[0];
u8 raid = arg[1];
u8 shortGI = arg[2];
u8 bw;
- u32 mask = bitmap&0x0FFFFFFF;
+ u32 mask = bitmap & 0x0FFFFFFF;
psta = pmlmeinfo->FW_sta_info[mac_id].psta;
if (!psta)
@@ -805,7 +800,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter)
PageSize = PAGE_SIZE_TX_8723B;
RsvdPageNum = BCNQ_PAGE_NUM_8723B;
- MaxRsvdPageBufSize = RsvdPageNum*PageSize;
+ MaxRsvdPageBufSize = RsvdPageNum * PageSize;
pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv);
if (!pcmdframe)
@@ -826,7 +821,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter)
CurtPktPageNum += 1;
TotalPageNum += CurtPktPageNum;
- BufIndex += (CurtPktPageNum*PageSize);
+ BufIndex += (CurtPktPageNum * PageSize);
/* Jump to lastest page */
if (BufIndex < (MaxRsvdPageBufSize - PageSize)) {
@@ -843,7 +838,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter)
NULL,
true, 0, 0, false
);
- rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex-TxDescLen], BTQosNullLength, false, true, false);
+ rtl8723b_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex - TxDescLen], BTQosNullLength, false, true, false);
CurtPktPageNum = (u8)PageNum_128(TxDescLen + BTQosNullLength);
@@ -885,12 +880,12 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)
/* We should set AID, correct TSF, HW seq enable before set JoinBssReport to Fw in 88/92C. */
/* Suggested by filen. Added by tynli. */
- rtw_write16(padapter, REG_BCN_PSR_RPT, (0xC000|pmlmeinfo->aid));
+ rtw_write16(padapter, REG_BCN_PSR_RPT, (0xC000 | pmlmeinfo->aid));
/* set REG_CR bit 8 */
- val8 = rtw_read8(padapter, REG_CR+1);
+ val8 = rtw_read8(padapter, REG_CR + 1);
val8 |= BIT(0); /* ENSWBCN */
- rtw_write8(padapter, REG_CR+1, val8);
+ rtw_write8(padapter, REG_CR + 1, val8);
/* Disable Hw protection for a time which revserd for Hw sending beacon. */
/* Fix download reserved page packet fail that access collision with the protection time. */
@@ -906,7 +901,7 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)
/* To tell Hw the packet is not a real beacon frame. */
pHalData->RegFwHwTxQCtrl &= ~BIT(6);
- rtw_write8(padapter, REG_FWHW_TXQ_CTRL+2, pHalData->RegFwHwTxQCtrl);
+ rtw_write8(padapter, REG_FWHW_TXQ_CTRL + 2, pHalData->RegFwHwTxQCtrl);
/* Clear beacon valid check bit. */
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL);
@@ -919,11 +914,11 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)
DLBcnCount++;
do {
yield();
-/* mdelay(10); */
+/* mdelay(10); */
/* check rsvd page download OK. */
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, &bcn_valid);
poll++;
- } while (!bcn_valid && (poll%10) != 0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
+ } while (!bcn_valid && (poll % 10) != 0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
} while (!bcn_valid && (DLBcnCount <= 100) && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
if (bcn_valid) {
@@ -945,11 +940,11 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)
/* 2010.06.23. Added by tynli. */
if (bRecover) {
pHalData->RegFwHwTxQCtrl |= BIT(6);
- rtw_write8(padapter, REG_FWHW_TXQ_CTRL+2, pHalData->RegFwHwTxQCtrl);
+ rtw_write8(padapter, REG_FWHW_TXQ_CTRL + 2, pHalData->RegFwHwTxQCtrl);
}
/* Clear CR[8] or beacon packet will not be send to TxBuf anymore. */
- val8 = rtw_read8(padapter, REG_CR+1);
+ val8 = rtw_read8(padapter, REG_CR + 1);
val8 &= ~BIT(0); /* ~ENSWBCN */
- rtw_write8(padapter, REG_CR+1, val8);
+ rtw_write8(padapter, REG_CR + 1, val8);
}
--
2.54.0
^ permalink raw reply related
* [PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_pwrctrl.c
From: Andrezinrc @ 2026-06-18 22:54 UTC (permalink / raw)
To: linux-staging; +Cc: linux-kernel, Andrezinrc
The checkpatch.pl tool complains about using msleep() for delays
under 20ms, as it can sleep for longer than intended. Replace the
msleep(1) calls with usleep_range(1000, 2000) to provide more
accurate timing and clean up the style warnings.
Signed-off-by: Andrezinrc <andrem.33333@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index f074ea6e0..cdbdcb7bd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -414,7 +414,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
err = -1;
break;
}
- msleep(1);
+ usleep_range(1000, 2000);
}
return err;
@@ -567,7 +567,7 @@ void LPS_Leave_check(struct adapter *padapter)
if (jiffies_to_msecs(jiffies - start_time) > 100)
break;
- msleep(1);
+ usleep_range(1000, 2000);
}
}
--
2.43.0
^ permalink raw reply related
* [PATCH 3/3] staging: rtl8723bs: remove unused RF_PATH_MAX_90_8812 define
From: Jad Keskes @ 2026-06-18 20:56 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Jad Keskes
In-Reply-To: <20260618205603.452858-1-inasj268@gmail.com>
Remove RF_PATH_MAX_90_8812 which is a leftover from RTL8812
chip support and is not referenced anywhere in this driver.
Signed-off-by: Jad Keskes <inasj268@gmail.com>
---
drivers/staging/rtl8723bs/include/hal_phy.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/include/hal_phy.h b/drivers/staging/rtl8723bs/include/hal_phy.h
index 3d71a4f41592..a4d15879f01d 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy.h
@@ -39,7 +39,6 @@ enum rf_path {
#define TX_4S 3
#define RF_PATH_MAX_92C_88E 2
-#define RF_PATH_MAX_90_8812 4 /* Max RF number 90 support */
enum wireless_mode {
WIRELESS_MODE_UNKNOWN = 0x00,
--
2.54.0
^ permalink raw reply related
* [PATCH 2/3] staging: rtl8723bs: remove unused AMPDU burst mode values for other chips
From: Jad Keskes @ 2026-06-18 20:56 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Jad Keskes
In-Reply-To: <20260618205603.452858-1-inasj268@gmail.com>
Remove enum values from rt_ampdu_burst that correspond to chips not
supported by this driver:
- RT_AMPDU_BURST_92D
- RT_AMPDU_BURST_88E
- RT_AMPDU_BURST_8812_4/8/12/15
These are leftovers from the original Realtek multi-chip codebase.
Only RT_AMPDU_BURST_NONE and RT_AMPDU_BURST_8723B are kept.
While here, remove the stale comment referencing 92C.
Signed-off-by: Jad Keskes <inasj268@gmail.com>
---
drivers/staging/rtl8723bs/include/hal_data.h | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h b/drivers/staging/rtl8723bs/include/hal_data.h
index ff4383e30322..4383f404c7da 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -37,13 +37,7 @@ enum rt_regulator_mode {
enum rt_ampdu_burst {
RT_AMPDU_BURST_NONE = 0,
- RT_AMPDU_BURST_92D = 1,
- RT_AMPDU_BURST_88E = 2,
- RT_AMPDU_BURST_8812_4 = 3,
- RT_AMPDU_BURST_8812_8 = 4,
- RT_AMPDU_BURST_8812_12 = 5,
- RT_AMPDU_BURST_8812_15 = 6,
- RT_AMPDU_BURST_8723B = 7,
+ RT_AMPDU_BURST_8723B = 1,
};
#define CHANNEL_MAX_NUMBER (14) /* 14 is the max channel number */
@@ -363,7 +357,7 @@ struct hal_com_data {
u8 RegIQKFWOffload;
struct submit_ctx iqk_sctx;
- enum rt_ampdu_burst AMPDUBurstMode; /* 92C maybe not use, but for compile successfully */
+ enum rt_ampdu_burst AMPDUBurstMode;
u32 sdio_himr;
u32 sdio_hisr;
--
2.54.0
^ permalink raw reply related
* [PATCH 1/3] staging: rtl8723bs: remove unused rtl8192c function declarations
From: Jad Keskes @ 2026-06-18 20:56 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Jad Keskes
Remove two function declarations from rtl8192c_recv.h that have no
implementation and are never called in the rtl8723bs driver:
- rtl8192c_translate_rx_signal_stuff()
- rtl8192c_query_rx_desc_status()
These are leftovers from the original Realtek multi-chip codebase
and relate to the RTL8192C family, not the RTL8723B.
Signed-off-by: Jad Keskes <inasj268@gmail.com>
---
drivers/staging/rtl8723bs/include/rtl8192c_recv.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/rtl8192c_recv.h b/drivers/staging/rtl8723bs/include/rtl8192c_recv.h
index e2e9aa03ffdf..b63625ab4e45 100644
--- a/drivers/staging/rtl8723bs/include/rtl8192c_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtl8192c_recv.h
@@ -30,8 +30,4 @@ struct phy_stat {
/* Rx smooth factor */
#define Rx_Smooth_Factor (20)
-
-void rtl8192c_translate_rx_signal_stuff(union recv_frame *precvframe, struct phy_stat *pphy_status);
-void rtl8192c_query_rx_desc_status(union recv_frame *precvframe, struct recv_stat *pdesc);
-
#endif
--
2.54.0
^ permalink raw reply related
* [PATCH] staging: media: av7110: remove commented out macro
From: Joyeta Modak @ 2026-06-18 19:49 UTC (permalink / raw)
To: mchehab, gregkh; +Cc: linux-media, linux-staging, linux-kernel, Joyeta Modak
av7110_ir.c contains MODULE_AUTHOR() and MODULE_LICENSE() commented
out. This file is compiled into dvb-ttpci.ko (dvb-ttpci-objs +=
av7110_ir.o in Makefile), and the MODULE_LICENSE(), MODULE_AUTHOR()
and MODULE_DESCRIPTION() are declared in av7110.c.
These commented out lines are unchanged since before kernel moved to git
which was checked using git log. Removing them will clean up the file.
Signed-off-by: Joyeta Modak <joyetamdk@gmail.com>
---
drivers/staging/media/av7110/av7110_ir.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/media/av7110/av7110_ir.c b/drivers/staging/media/av7110/av7110_ir.c
index fdae467fd..e84f9353b 100644
--- a/drivers/staging/media/av7110/av7110_ir.c
+++ b/drivers/staging/media/av7110/av7110_ir.c
@@ -154,5 +154,3 @@ void av7110_ir_exit(struct av7110 *av7110)
rc_free_device(av7110->ir.rcdev);
}
-//MODULE_AUTHOR("Holger Waechtler <holger@convergence.de>, Oliver Endriss <o.endriss@gmx.de>");
-//MODULE_LICENSE("GPL");
--
2.53.0
^ permalink raw reply related
* [PATCH v2 3/3] staging: media: atomisp: remove dead platform_support.h header file
From: Igor Putko @ 2026-06-18 15:12 UTC (permalink / raw)
To: Andy Shevchenko, Hans de Goede
Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
linux-media, linux-staging, linux-kernel, Igor Putko
In-Reply-To: <20260618151246.6678-1-igorpetindev@gmail.com>
Remove the platform_support.h header file completely as it is no longer
used anywhere in the driver and its contents are obsolete.
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
.../hive_isp_css_include/platform_support.h | 25 -------------------
1 file changed, 25 deletions(-)
delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
deleted file mode 100644
index 473d8d4fb9ba..000000000000
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- */
-
-#ifndef __PLATFORM_SUPPORT_H_INCLUDED__
-#define __PLATFORM_SUPPORT_H_INCLUDED__
-
-/**
-* @file
-* Platform specific includes and functionality.
-*/
-
-#include <linux/delay.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-
-#define UINT16_MAX USHRT_MAX
-#define UINT32_MAX UINT_MAX
-#define UCHAR_MAX (255)
-
-#define CSS_ALIGN(d, a) d __attribute__((aligned(a)))
-
-#endif /* __PLATFORM_SUPPORT_H_INCLUDED__ */
--
2.34.1
^ permalink raw reply related
* [PATCH v2 2/3] staging: media: atomisp: drop unused platform_support.h inclusions
From: Igor Putko @ 2026-06-18 15:12 UTC (permalink / raw)
To: Andy Shevchenko, Hans de Goede
Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
linux-media, linux-staging, linux-kernel, Igor Putko
In-Reply-To: <20260618151246.6678-1-igorpetindev@gmail.com>
Drop the unused inclusions of the platform_support.h header file across
the driver. The header has become obsolete after replacing the custom
CSS_ALIGN() macro with standard kernel attributes.
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
.../media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h | 1 -
.../atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h | 1 -
drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c | 1 -
.../media/atomisp/pci/hive_isp_css_include/type_support.h | 1 -
drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c | 1 -
.../atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h | 1 -
.../staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c | 1 -
.../media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h | 1 -
drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c | 1 -
.../staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c | 1 -
.../staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c | 1 -
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c | 1 -
.../media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c | 1 -
.../media/atomisp/pci/runtime/queue/interface/ia_css_queue.h | 1 -
drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 1 -
drivers/staging/media/atomisp/pci/sh_css_firmware.c | 1 -
drivers/staging/media/atomisp/pci/sh_css_hrt.c | 1 -
drivers/staging/media/atomisp/pci/sh_css_param_shading.c | 1 -
drivers/staging/media/atomisp/pci/sh_css_params.c | 1 -
19 files changed, 19 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h b/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h
index 86300991d30e..43581100b70f 100644
--- a/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h
+++ b/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h
@@ -11,7 +11,6 @@
#include <type_support.h>
#include <math_support.h>
#include <assert_support.h>
-#include <platform_support.h>
#include "ia_css_circbuf_comm.h"
#include "ia_css_circbuf_desc.h"
diff --git a/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h b/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h
index 5645a7bf493c..7c9ce87e5fef 100644
--- a/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h
+++ b/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h
@@ -9,7 +9,6 @@
#include <type_support.h>
#include <math_support.h>
-#include <platform_support.h>
#include <sp.h>
#include "ia_css_circbuf_comm.h"
/****************************************************************
diff --git a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
index 58e4e3173b40..123389ff310f 100644
--- a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
+++ b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
@@ -9,7 +9,6 @@
#include "ia_css_refcount.h"
#include "sh_css_defs.h"
-#include "platform_support.h"
#include "assert_support.h"
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/type_support.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/type_support.h
index 097be6bd3cb5..566fa6c1ea94 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/type_support.h
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/type_support.h
@@ -12,7 +12,6 @@
* Platform specific types.
*
* Per the DLI spec, types are in "type_support.h" and
-* "platform_support.h" is for unclassified/to be refactored
* platform specific definitions.
*/
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c b/drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c
index c68b096444de..3a9a21a589b2 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c
@@ -5,7 +5,6 @@
*/
#include "tag.h"
-#include <platform_support.h> /* NULL */
#include <assert_support.h>
#include "tag_local.h"
diff --git a/drivers/staging/media/atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h b/drivers/staging/media/atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h
index d1031f824896..cb51824f5ba7 100644
--- a/drivers/staging/media/atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h
+++ b/drivers/staging/media/atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h
@@ -8,7 +8,6 @@
#define __IA_CSS_FRAME_COMM_H__
#include "type_support.h"
-#include "platform_support.h"
#include "runtime/bufq/interface/ia_css_bufq_comm.h"
#include <system_local.h> /* ia_css_ptr */
diff --git a/drivers/staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c b/drivers/staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c
index 8e1efeb6372c..57623352af4f 100644
--- a/drivers/staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c
+++ b/drivers/staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c
@@ -4,7 +4,6 @@
* Copyright (c) 2010 - 2015, Intel Corporation.
*/
-#include "platform_support.h"
#include "ia_css_inputfifo.h"
diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h b/drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h
index 3d4c0cd2f2a6..801b2472cca5 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h
+++ b/drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h
@@ -10,7 +10,6 @@
#include <type_support.h>
#include <input_system.h>
-#include <platform_support.h> /* inline */
#include <input_system_global.h>
#include <ia_css_stream_public.h> /* IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH */
diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c
index 7490d189f39d..cc03822942e8 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c
+++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c
@@ -8,7 +8,6 @@
#include "assert_support.h"
-#include "platform_support.h"
#include "ia_css_isys.h"
#include "bitop_support.h"
#include "ia_css_pipeline.h" /* ia_css_pipeline_get_pipe_io_status() */
diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c
index b8d431dcd6c1..562fca4888d4 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c
+++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c
@@ -7,7 +7,6 @@
#include "system_global.h"
#include "assert_support.h"
-#include "platform_support.h"
#include "ia_css_isys.h"
#include "ibuf_ctrl_rmgr.h"
diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c
index 2ce2f32a1946..3884ff6ac4b5 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c
+++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c
@@ -8,7 +8,6 @@
#include "assert_support.h"
-#include "platform_support.h"
#include "ia_css_isys.h"
#include "bitop_support.h"
#include "isys_dma_rmgr.h"
diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c
index 46bb3569e139..f19efae1bd86 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c
+++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c
@@ -7,7 +7,6 @@
#include "input_system.h"
#include "ia_css_isys.h"
-#include "platform_support.h"
#include "isys_dma_public.h" /* isys2401_dma_set_max_burst_size() */
#include "isys_irq.h"
diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c
index 9217d26cf632..24da447caa10 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c
+++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c
@@ -8,7 +8,6 @@
#include "assert_support.h"
-#include "platform_support.h"
#include "ia_css_isys.h"
#include "bitop_support.h"
#include "isys_stream2mmio_rmgr.h"
diff --git a/drivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue.h b/drivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue.h
index c097d912d87f..88558878e6ff 100644
--- a/drivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue.h
+++ b/drivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue.h
@@ -7,7 +7,6 @@
#ifndef __IA_CSS_QUEUE_H
#define __IA_CSS_QUEUE_H
-#include <platform_support.h>
#include <type_support.h>
#include "ia_css_queue_comm.h"
diff --git a/drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c b/drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c
index 940b28c66e99..463bbd470ef4 100644
--- a/drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c
+++ b/drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c
@@ -9,7 +9,6 @@
#include <type_support.h>
#include <assert_support.h>
-#include <platform_support.h> /* memset */
#include <ia_css_debug.h>
/*
diff --git a/drivers/staging/media/atomisp/pci/sh_css_firmware.c b/drivers/staging/media/atomisp/pci/sh_css_firmware.c
index 57ecf5549c23..75b0720e98d7 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_firmware.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_firmware.c
@@ -11,7 +11,6 @@
#include "hmm.h"
#include <math_support.h>
-#include "platform_support.h"
#include "sh_css_firmware.h"
#include "sh_css_defs.h"
diff --git a/drivers/staging/media/atomisp/pci/sh_css_hrt.c b/drivers/staging/media/atomisp/pci/sh_css_hrt.c
index d4633572f8f3..8c1c9478ce36 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_hrt.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_hrt.c
@@ -4,7 +4,6 @@
* Copyright (c) 2015, Intel Corporation.
*/
-#include "platform_support.h"
#include "sh_css_hrt.h"
#include "ia_css_debug.h"
diff --git a/drivers/staging/media/atomisp/pci/sh_css_param_shading.c b/drivers/staging/media/atomisp/pci/sh_css_param_shading.c
index 9105334c71b1..2b10e441898c 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_param_shading.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_param_shading.c
@@ -18,7 +18,6 @@
#include "sh_css_hrt.h"
-#include "platform_support.h"
/* Bilinear interpolation on shading tables:
* For each target point T, we calculate the 4 surrounding source points:
diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c
index fcebace11daf..636801c46589 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_params.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_params.c
@@ -21,7 +21,6 @@
#include "ia_css_queue.h"
#include "sw_event_global.h" /* Event IDs */
-#include "platform_support.h"
#include "assert_support.h"
#include "ia_css_stream.h"
--
2.34.1
^ permalink raw reply related
* [PATCH v2 1/3] staging: media: atomisp: replace CSS_ALIGN() with standard __aligned
From: Igor Putko @ 2026-06-18 15:12 UTC (permalink / raw)
To: Andy Shevchenko, Hans de Goede
Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
linux-media, linux-staging, linux-kernel, Igor Putko
In-Reply-To: <20260618151246.6678-1-igorpetindev@gmail.com>
Replace the custom drivers/staging/media/atomisp-specific CSS_ALIGN()
macro with the standard kernel __aligned() attribute. This aligns the
driver with the kernel coding style and is a preparation for removing the
entire custom platform_support.h header.
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
.../media/atomisp/pci/ia_css_acc_types.h | 30 +++++++++----------
.../interface/ia_css_isp_param_types.h | 11 +++----
.../media/atomisp/pci/sh_css_internal.h | 4 +--
3 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/ia_css_acc_types.h b/drivers/staging/media/atomisp/pci/ia_css_acc_types.h
index e13ca0d84847..b5b18f619f07 100644
--- a/drivers/staging/media/atomisp/pci/ia_css_acc_types.h
+++ b/drivers/staging/media/atomisp/pci/ia_css_acc_types.h
@@ -13,9 +13,9 @@
#include <system_local.h> /* HAS_IRQ_MAP_VERSION_# */
#include <type_support.h>
-#include <platform_support.h>
#include <debug_global.h>
#include <linux/bits.h>
+#include <linux/compiler.h>
#include "ia_css_types.h"
#include "ia_css_frame_format.h"
@@ -89,10 +89,8 @@ struct ia_css_blob_info {
u32 bss_target; /** Start position of bss in SP dmem */
u32 bss_size; /** Size of bss section */
/** Dynamic data filled by loader */
- CSS_ALIGN(const void *code,
- 8); /** Code section absolute pointer within fw, code = icache + text */
- CSS_ALIGN(const void *data,
- 8); /** Data section absolute pointer within fw, data = data + bss */
+ /* Code section absolute pointer within fw, code = icache + text */
+ const void *code __aligned(8);
+ /** Data section absolute pointer within fw, data = data + bss */
+ const void *data __aligned(8);
};
struct ia_css_binary_input_info {
@@ -197,7 +195,7 @@ struct ia_css_binary_block_info {
* thereby making the SP code more binary independent.
*/
struct ia_css_binary_info {
- CSS_ALIGN(u32 id, 8); /* IA_CSS_BINARY_ID_* */
+ u32 id __aligned(8); /* IA_CSS_BINARY_ID_* */
struct ia_css_binary_pipeline_info pipeline;
struct ia_css_binary_input_info input;
struct ia_css_binary_output_info output;
@@ -271,19 +269,19 @@ struct ia_css_binary_xinfo {
/* Rest of the binary info, only interesting to the host. */
enum ia_css_acc_type type;
- CSS_ALIGN(s32 num_output_formats, 8);
+ s32 num_output_formats __aligned(8);
enum ia_css_frame_format output_formats[IA_CSS_FRAME_FORMAT_NUM];
- CSS_ALIGN(s32 num_vf_formats, 8); /** number of supported vf formats */
+ s32 num_vf_formats __aligned(8); /** number of supported vf formats */
enum ia_css_frame_format
vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */
u8 num_output_pins;
ia_css_ptr xmem_addr;
- CSS_ALIGN(const struct ia_css_blob_descr *blob, 8);
- CSS_ALIGN(u32 blob_index, 8);
- CSS_ALIGN(union ia_css_all_memory_offsets mem_offsets, 8);
- CSS_ALIGN(struct ia_css_binary_xinfo *next, 8);
+ const struct ia_css_blob_descr *blob __aligned(8);
+ u32 blob_index __aligned(8);
+ union ia_css_all_memory_offsets mem_offsets __aligned(8);
+ struct ia_css_binary_xinfo *next __aligned(8);
};
/* Structure describing the Bootloader (an ISP binary).
@@ -360,16 +358,16 @@ union ia_css_fw_union {
struct ia_css_fw_info {
size_t header_size; /** size of fw header */
- CSS_ALIGN(u32 type, 8);
+ u32 type __aligned(8);
union ia_css_fw_union info; /** Binary info */
struct ia_css_blob_info blob; /** Blob info */
/* Dynamic part */
struct ia_css_fw_info *next;
- CSS_ALIGN(u32 loaded, 8); /** Firmware has been loaded */
- CSS_ALIGN(const u8 *isp_code, 8); /** ISP pointer to code */
+ u32 loaded __aligned(8); /** Firmware has been loaded */
+ const u8 *isp_code __aligned(8); /** ISP pointer to code */
/** Firmware handle between user space and kernel */
- CSS_ALIGN(u32 handle, 8);
+ u32 handle __aligned(8);
/** Sections to copy from/to ISP */
struct ia_css_isp_param_css_segments mem_initializers;
/** Initializer for local ISP memories */
diff --git a/drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h b/drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h
index d6d60508c1bf..aadbc5874bfb 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h
+++ b/drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h
@@ -8,8 +8,9 @@ Copyright (c) 2010 - 2015, Intel Corporation.
#ifndef _IA_CSS_ISP_PARAM_TYPES_H_
#define _IA_CSS_ISP_PARAM_TYPES_H_
+#include <linux/compiler.h>
+
#include "ia_css_types.h"
-#include <platform_support.h>
#include <system_global.h>
/* Short hands */
@@ -62,12 +63,12 @@ struct ia_css_isp_param_memory_offsets {
*/
union ia_css_all_memory_offsets {
struct {
- CSS_ALIGN(struct ia_css_memory_offsets *param, 8);
- CSS_ALIGN(struct ia_css_config_memory_offsets *config, 8);
- CSS_ALIGN(struct ia_css_state_memory_offsets *state, 8);
+ struct ia_css_memory_offsets *param __aligned(8);
+ struct ia_css_config_memory_offsets *config __aligned(8);
+ struct ia_css_state_memory_offsets *state __aligned(8);
} offsets;
struct {
- CSS_ALIGN(void *ptr, 8);
+ void *ptr __aligned(8);
} array[IA_CSS_NUM_PARAM_CLASSES];
};
diff --git a/drivers/staging/media/atomisp/pci/sh_css_internal.h b/drivers/staging/media/atomisp/pci/sh_css_internal.h
index 9155a83fcc03..6a6189c9c801 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_internal.h
+++ b/drivers/staging/media/atomisp/pci/sh_css_internal.h
@@ -8,13 +8,13 @@
#define _SH_CSS_INTERNAL_H_
#include <linux/build_bug.h>
+#include <linux/compiler.h>
#include <linux/math.h>
#include <linux/stdarg.h>
#include <system_global.h>
#include <math_support.h>
#include <type_support.h>
-#include <platform_support.h>
#include "input_formatter.h"
#include "input_system.h"
@@ -684,7 +684,7 @@ struct sh_css_hmm_buffer {
* uint64_t does not exist on SP/ISP.
* Size of the struct is checked by sp.hive.c.
*/
- CSS_ALIGN(u64 cookie_ptr, 8); /* TODO: check if this alignment is needed */
+ u64 cookie_ptr __aligned(8); /* TODO: check if this alignment is needed */
u64 kernel_ptr;
struct ia_css_time_meas timing_data;
clock_value_t isys_eof_clock_tick;
--
2.34.1
^ permalink raw reply related
* [PATCH v2 0/3] staging: media: atomisp: remove dead platform_support.h header
From: Igor Putko @ 2026-06-18 15:12 UTC (permalink / raw)
To: Andy Shevchenko, Hans de Goede
Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
linux-media, linux-staging, linux-kernel, Igor Putko
In-Reply-To: <20260618120951.42956-1-igorpetindev@gmail.com>
Hi Andy,
Following your feedback, this series replaces the custom CSS_ALIGN() macro
with the standard __aligned attribute and completely removes the dead
platform_support.h header file from the driver.
Igor Putko (3):
staging: media: atomisp: replace CSS_ALIGN() with standard __aligned
staging: media: atomisp: drop unused platform_support.h inclusions
staging: media: atomisp: remove dead platform_support.h header file
.../base/circbuf/interface/ia_css_circbuf.h | 1 -
.../circbuf/interface/ia_css_circbuf_desc.h | 1 -
.../atomisp/pci/base/refcount/src/refcount.c | 1 -
.../hive_isp_css_include/platform_support.h | 25 ----------------
.../pci/hive_isp_css_include/type_support.h | 1 -
.../pci/hive_isp_css_shared/host/tag.c | 1 -
.../media/atomisp/pci/ia_css_acc_types.h | 30 +++++++++----------
.../frame/interface/ia_css_frame_comm.h | 1 -
.../pci/runtime/inputfifo/src/inputfifo.c | 1 -
.../interface/ia_css_isp_param_types.h | 11 +++----
.../runtime/isys/interface/ia_css_isys_comm.h | 1 -
.../pci/runtime/isys/src/csi_rx_rmgr.c | 1 -
.../pci/runtime/isys/src/ibuf_ctrl_rmgr.c | 1 -
.../pci/runtime/isys/src/isys_dma_rmgr.c | 1 -
.../atomisp/pci/runtime/isys/src/isys_init.c | 1 -
.../runtime/isys/src/isys_stream2mmio_rmgr.c | 1 -
.../runtime/queue/interface/ia_css_queue.h | 1 -
.../atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 1 -
.../media/atomisp/pci/sh_css_firmware.c | 1 -
.../staging/media/atomisp/pci/sh_css_hrt.c | 1 -
.../media/atomisp/pci/sh_css_internal.h | 4 +--
.../media/atomisp/pci/sh_css_param_shading.c | 1 -
.../staging/media/atomisp/pci/sh_css_params.c | 1 -
23 files changed, 22 insertions(+), 67 deletions(-)
delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
Changes in v2:
- Remove platform_support.h instead of fixing the macro.
- Replace CSS_ALIGN with __aligned in all users.
- Drop unused includes from all affected files.
--
2.34.1
^ permalink raw reply
* Re: [PATCH] staging: media: atomisp: prefer __aligned over __attribute__((aligned))
From: Andy Shevchenko @ 2026-06-18 13:04 UTC (permalink / raw)
To: Igor Putko
Cc: hansg, mchehab, gregkh, andy, sakari.ailus, linux-media,
linux-staging, linux-kernel
In-Reply-To: <ajPqQSudT9mS1e53@ashevche-desk.local>
On Thu, Jun 18, 2026 at 03:53:26PM +0300, Andy Shevchenko wrote:
> On Thu, Jun 18, 2026 at 03:09:51PM +0300, Igor Putko wrote:
> > Replace the GCC-specific __attribute__((aligned(a))) with the standard
> > __aligned(a) macro to match the kernel coding style.
> >
> > The checkpatch.pl error about complex macro values is a false positive
> > here, as enclosing the macro expansion in parentheses breaks declaration
> > syntax.
...
> > --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
> > +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
>
> > #define UINT32_MAX UINT_MAX
> > #define UCHAR_MAX (255)
> >
> > -#define CSS_ALIGN(d, a) d __attribute__((aligned(a)))
> > +#define CSS_ALIGN(d, a) d __aligned(a)
>
> Ah, nice finding! But this header should be killed. It means that rather
> kill the macro altogether and replace all occurrences with the proper
> attribute (see the history of math_support.h as an example).
For the record, I just have checked and in this entire header the only
CSS_ALIGN() is used by the driver, the rest is already a dead code, so the plan
is that:
- replace CSS_ALIGN() by respective __aligned() in the users
(be sure necessary headers are included, usually linux/types.h)
- drop *or* replace (if there are two categories, make two distinct changes)
the platform_support.h inclusion in the following files
drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h
drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h
drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
drivers/staging/media/atomisp/pci/hive_isp_css_include/type_support.h
drivers/staging/media/atomisp/pci/hive_isp_css_shared/host/tag.c
drivers/staging/media/atomisp/pci/ia_css_acc_types.h
drivers/staging/media/atomisp/pci/runtime/frame/interface/ia_css_frame_comm.h
drivers/staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c
drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h
drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h
drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c
drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c
drivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue.h
drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c
drivers/staging/media/atomisp/pci/sh_css_firmware.c
drivers/staging/media/atomisp/pci/sh_css_hrt.c
drivers/staging/media/atomisp/pci/sh_css_internal.h
drivers/staging/media/atomisp/pci/sh_css_param_shading.c
drivers/staging/media/atomisp/pci/sh_css_params.c
- drop platform_support.h for good
So, I expect three *or* four patches in a series.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH] staging: media: atomisp: prefer __aligned over __attribute__((aligned))
From: Andy Shevchenko @ 2026-06-18 12:53 UTC (permalink / raw)
To: Igor Putko
Cc: hansg, mchehab, gregkh, andy, sakari.ailus, linux-media,
linux-staging, linux-kernel
In-Reply-To: <20260618120951.42956-1-igorpetindev@gmail.com>
On Thu, Jun 18, 2026 at 03:09:51PM +0300, Igor Putko wrote:
> Replace the GCC-specific __attribute__((aligned(a))) with the standard
> __aligned(a) macro to match the kernel coding style.
>
> The checkpatch.pl error about complex macro values is a false positive
> here, as enclosing the macro expansion in parentheses breaks declaration
> syntax.
...
> --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
> +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
> #define UINT32_MAX UINT_MAX
> #define UCHAR_MAX (255)
>
> -#define CSS_ALIGN(d, a) d __attribute__((aligned(a)))
> +#define CSS_ALIGN(d, a) d __aligned(a)
Ah, nice finding! But this header should be killed. It means that rather
kill the macro altogether and replace all occurrences with the proper
attribute (see the history of math_support.h as an example).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* [PATCH] staging: media: atomisp: prefer __aligned over __attribute__((aligned))
From: Igor Putko @ 2026-06-18 12:09 UTC (permalink / raw)
To: hansg, mchehab, gregkh
Cc: andy, sakari.ailus, linux-media, linux-staging, linux-kernel,
Igor Putko
Replace the GCC-specific __attribute__((aligned(a))) with the standard
__aligned(a) macro to match the kernel coding style.
The checkpatch.pl error about complex macro values is a false positive
here, as enclosing the macro expansion in parentheses breaks declaration
syntax.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
.../media/atomisp/pci/hive_isp_css_include/platform_support.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
index 473d8d4fb9ba..9aa445c45e9f 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
@@ -20,6 +20,6 @@
#define UINT32_MAX UINT_MAX
#define UCHAR_MAX (255)
-#define CSS_ALIGN(d, a) d __attribute__((aligned(a)))
+#define CSS_ALIGN(d, a) d __aligned(a)
#endif /* __PLATFORM_SUPPORT_H_INCLUDED__ */
--
2.34.1
^ permalink raw reply related
* [PATCH 2/2] staging: media: atomisp: prefer __aligned over __attribute__((aligned))
From: Igor Putko @ 2026-06-18 12:06 UTC (permalink / raw)
To: hansg, mchehab, gregkh
Cc: andy, sakari.ailus, linux-media, linux-staging, linux-kernel,
Igor Putko
Replace the GCC-specific __attribute__((aligned(a))) with the standard
__aligned(a) macro to match the kernel coding style.
The checkpatch.pl error about complex macro values is a false positive
here, as enclosing the macro expansion in parentheses breaks declaration
syntax.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
.../media/atomisp/pci/hive_isp_css_include/platform_support.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
index 473d8d4fb9ba..9aa445c45e9f 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
@@ -20,6 +20,6 @@
#define UINT32_MAX UINT_MAX
#define UCHAR_MAX (255)
-#define CSS_ALIGN(d, a) d __attribute__((aligned(a)))
+#define CSS_ALIGN(d, a) d __aligned(a)
#endif /* __PLATFORM_SUPPORT_H_INCLUDED__ */
--
2.34.1
^ permalink raw reply related
* [PATCH v2] staging: greybus: vibrator: return device_create() errors
From: Alfie Varghese @ 2026-06-18 11:34 UTC (permalink / raw)
To: elder, gregkh, johan
Cc: greybus-dev, linux-staging, linux-kernel, Alfie Varghese
gb_vibrator_probe() maps any device_create() failure to -EINVAL. This
loses the real errno returned by the driver core, such as -ENOMEM, and
makes probe failures harder to diagnose correctly.
Return PTR_ERR(dev) instead so callers receive the actual failure reason
while preserving the existing cleanup path.
Signed-off-by: Alfie Varghese <alfievarghese22@gmail.com>
---
v2: No code changes, resending as a single properly versioned patch.
drivers/staging/greybus/vibrator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c
index 0ec4d317c9db..763c234fbc03 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -161,7 +161,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle,
dev = device_create(&vibrator_class, &bundle->dev,
MKDEV(0, 0), vib, "vibrator%d", vib->minor);
if (IS_ERR(dev)) {
- retval = -EINVAL;
+ retval = PTR_ERR(dev);
goto err_ida_remove;
}
vib->dev = dev;
--
2.53.0
^ permalink raw reply related
* [PATCH v2] staging: vme_user: bound slave read/write to the kern_buf size
From: Michael Tautschnig @ 2026-06-18 11:47 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, stable, Michael Tautschnig
In-Reply-To: <20260614195318.40397-1-tautschn@amazon.com>
The SLAVE-path helpers buffer_to_user() and buffer_from_user() copy
'count' bytes into/out of the fixed-size kern_buf (size_buf ==
PCI_BUF_SIZE == 0x20000, 128 KiB) using *ppos as the offset, without
bounding *ppos + count against size_buf.
vme_user_write()/vme_user_read() only clamp count to the VME window size
(image_size = vme_get_size(resource)), which VME_SET_SLAVE sets from the
user-supplied slave.size -- validated against the VME address space (up
to VME_A32_MAX = 4 GiB), not against PCI_BUF_SIZE. When the window
exceeds 128 KiB, a write()/read() copies past the kern_buf allocation.
Clamp count against size_buf in both helpers, with an early return when
*ppos is already at/after the buffer end. *ppos is >= 0 here (the caller
rejects negative offsets), so size_buf - *ppos cannot wrap. This mirrors
the existing clamp in the MASTER-path helpers resource_to_user() /
resource_from_user(), and matches the read()/write() convention of a
short transfer at end-of-buffer.
Found by static analysis (CodeQL taint tracking + CBMC bounded model
checking) and confirmed dynamically under KASAN with the vme_fake bridge:
BUG: KASAN: slab-out-of-bounds in _copy_from_user+0x2d/0x80
Write of size 262144 at addr ffff888004100000 by task trigger/68
_copy_from_user+0x2d/0x80
vme_user_write+0x13e/0x240 [vme_user]
vfs_write+0x1b8/0x7a0
ksys_write+0xb8/0x150
Fixes: f00a86d98a1e ("Staging: vme: add VME userspace driver")
Cc: stable@vger.kernel.org
Signed-off-by: Michael Tautschnig <tautschn@amazon.com>
---
v1 -> v2:
- Cc the staging list and LKML per get_maintainer.pl (v1 reached only
Greg KH).
- Switch the added comment to normal (non-networking) kernel style.
- Keep the clamp + early return: this matches the read()/write()
short-transfer / EOF convention already used by vme_user_read() /
vme_user_write() (which clamp count and return 0 past the window) and
by the MASTER-path resource_*() helpers (which clamp count to
size_buf). Documented that *ppos >= 0 here, so the subtraction is
wrap-free.
Link to v1: https://lore.kernel.org/all/20260614195318.40397-1-tautschn@amazon.com/
drivers/staging/vme_user/vme_user.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/staging/vme_user/vme_user.c b/drivers/staging/vme_user/vme_user.c
index 11e25c2f6b0a..a472a38ef613 100644
--- a/drivers/staging/vme_user/vme_user.c
+++ b/drivers/staging/vme_user/vme_user.c
@@ -156,6 +156,17 @@ static ssize_t buffer_to_user(unsigned int minor, char __user *buf,
{
void *image_ptr;
+ /*
+ * The slave window (image_size) can exceed the fixed kern_buf
+ * (size_buf == PCI_BUF_SIZE), so bound the copy to kern_buf.
+ * *ppos is >= 0 here (checked by the caller), so the
+ * subtraction below cannot wrap.
+ */
+ if (*ppos >= image[minor].size_buf)
+ return 0;
+ if (count > image[minor].size_buf - *ppos)
+ count = image[minor].size_buf - *ppos;
+
image_ptr = image[minor].kern_buf + *ppos;
if (copy_to_user(buf, image_ptr, (unsigned long)count))
return -EFAULT;
@@ -168,6 +179,17 @@ static ssize_t buffer_from_user(unsigned int minor, const char __user *buf,
{
void *image_ptr;
+ /*
+ * The slave window (image_size) can exceed the fixed kern_buf
+ * (size_buf == PCI_BUF_SIZE), so bound the copy to kern_buf.
+ * *ppos is >= 0 here (checked by the caller), so the
+ * subtraction below cannot wrap.
+ */
+ if (*ppos >= image[minor].size_buf)
+ return 0;
+ if (count > image[minor].size_buf - *ppos)
+ count = image[minor].size_buf - *ppos;
+
image_ptr = image[minor].kern_buf + *ppos;
if (copy_from_user(image_ptr, buf, (unsigned long)count))
return -EFAULT;
--
2.34.1
Amazon Development Center Austria GmbH
Brueckenkopfgasse 1
8020 Graz
Oesterreich
Sitz in Graz
Firmenbuchnummer: FN 439453 f
Firmenbuchgericht: Landesgericht fuer Zivilrechtssachen Graz
^ permalink raw reply related
* Re: [PATCH] staging: vme_user: fix heap OOB in buffer_from_user and buffer_to_user
From: Michael Tautschnig @ 2026-06-18 11:46 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, stable, Michael Tautschnig
In-Reply-To: <2026061535-hardened-presuming-96b2@gregkh>
On Mon, Jun 15, 2026 at 04:27:38AM +0200, Greg Kroah-Hartman wrote:
> Nice, but why did you not use get_maintainers.pl to determine who to
> send this to? You cut out the staging list?
My fault -- v1 went only to you and stable@. v2 is Cc'd to
linux-staging@lists.linux.dev and linux-kernel@vger.kernel.org per
scripts/get_maintainer.pl (VME is S: Orphan, so that's the full set).
> > + /* Clamp to the fixed kern_buf (size_buf): the VME window
> > + * (image_size) may exceed PCI_BUF_SIZE, so *ppos + count can
> > + * run past kern_buf otherwise.
> > + */
>
> Not a network driver, so you can use normal coding style for comments.
Fixed in v2 -- switched to the normal (non-networking) multi-line comment
style.
> > + if (*ppos >= image[minor].size_buf)
> > + return 0;
>
> No error?
[...]
> Again, why not return an error?
This is the end-of-buffer case, and returning 0 matches what the driver
already does: vme_user_read()/vme_user_write() already "return 0" when
*ppos > image_size - 1. A 0-byte return at/after the end of the buffer
is the normal read(2)/write(2) convention (EOF for read; for write it
mirrors the driver's existing behaviour). Returning an error here would
make the SLAVE path diverge from both the existing *ppos check two lines
up and the MASTER path, which seemed wrong for a Cc: stable fix.
> > + if (count > image[minor].size_buf - *ppos)
> > + count = image[minor].size_buf - *ppos;
>
> Why are you covering up for userspace errors, shouldn't this just fail?
[...]
> Same here, shouldn't this fail?
The clamp mirrors behaviour that already exists in this driver rather
than inventing new policy: vme_user_read()/vme_user_write() already clamp
count to image_size - *ppos (a short transfer), and the MASTER-path
resource_to_user()/resource_from_user() already clamp count to size_buf.
A short transfer is standard read/write semantics -- userspace is
expected to loop -- so the SLAVE path was simply missing the size_buf
bound that MASTER already has; it clamped to the VME window (image_size,
up to 4 GiB from the user-set slave.size) instead of the fixed 128 KiB
kern_buf. v2 keeps the established short-transfer contract and just
fixes the bound.
That said, you're the maintainer: if you'd rather an over-large request
fail outright (e.g. -EFBIG / -ENOSPC) I'm happy to send that, but I'd do
it as a separate, clearly-marked behaviour change rather than fold it
into the stable fix.
> And no chance for this to wrap again, right?
No wrap in the added code: the caller already rejects *ppos < 0, and the
early "if (*ppos >= size_buf) return 0;" means 0 <= *ppos < size_buf at
the subtraction, so "size_buf - *ppos" is a positive u64 and the
"count > size_buf - *ppos" comparison can't overflow.
It also tightens a pre-existing wrap: the caller's
"if (*ppos + count > image_size)" adds loff_t + size_t and can overflow
for a huge count; the new "count > size_buf - *ppos" re-bounds count
regardless, so the copy stays within kern_buf even if that earlier clamp
is bypassed.
v2 also adds Fixes: f00a86d98a1e ("Staging: vme: add VME userspace
driver") and keeps the KASAN reproducer in the changelog.
Thanks,
Michael
Amazon Development Center Austria GmbH
Brueckenkopfgasse 1
8020 Graz
Oesterreich
Sitz in Graz
Firmenbuchnummer: FN 439453 f
Firmenbuchgericht: Landesgericht fuer Zivilrechtssachen Graz
^ permalink raw reply
* Re: [PATCH] staging: greybus: vibrator: return device_create() errors
From: Greg KH @ 2026-06-18 10:38 UTC (permalink / raw)
To: Alfie Varghese; +Cc: johan, elder, greybus-dev, linux-staging, linux-kernel
In-Reply-To: <20260618040132.436-1-alfievarghese22@gmail.com>
On Thu, Jun 18, 2026 at 04:01:32AM +0000, Alfie Varghese wrote:
> Gentle ping on this patch from May 28.
What patch? I have no context here, sorry.
> Apologies for the accidental duplicate send; a second copy went out
> shortly after this one by mistake. This thread is the canonical one to
> review.
If you sent two different ones, always properly version them so we know
which one should be reviewed.
And its the merge window right now, nothing can happen until after -rc1
is out, thanks,
greg k-h
^ permalink raw reply
* Re: [QUESTION] staging: octeon: is the FIXME in cvm_oct_sgmii_init stale?
From: Greg Kroah-Hartman @ 2026-06-18 10:26 UTC (permalink / raw)
To: Pablo D. Bergamasco; +Cc: linux-staging, linux-kernel
In-Reply-To: <20260617210743.1825733-1-danpablo@gmail.com>
On Wed, Jun 17, 2026 at 06:07:43PM -0300, Pablo D. Bergamasco wrote:
> Hi Greg,
>
> While looking at drivers/staging/octeon/ethernet-sgmii.c I noticed
> a FIXME comment in cvm_oct_sgmii_init():
>
> cvm_oct_common_init(dev);
> /* FIXME: Need autoneg logic */
> return 0;
>
> After tracing the code, I believe autoneg is already handled when
> the interface is opened:
>
> cvm_oct_sgmii_open()
> -> cvm_oct_common_open()
> -> cvm_oct_phy_setup_device()
> -> phy_start()
> -> phy_state_machine()
> -> _phy_start_aneg()
> -> genphy_config_aneg()
>
> Is my analysis correct? If so, should I send a patch to remove
> the stale FIXME comment?
I have no idea, sorry, test it out on the hardware and see!
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH] staging: greybus: vibrator: return device_create() errors
From: Alfie Varghese @ 2026-06-18 4:01 UTC (permalink / raw)
To: johan, elder, gregkh; +Cc: greybus-dev, linux-staging, linux-kernel
In-Reply-To: <20260528135111.2791-1-alfievarghese22@gmail.com>
Gentle ping on this patch from May 28.
Apologies for the accidental duplicate send; a second copy went out
shortly after this one by mistake. This thread is the canonical one to
review.
Happy to resend or rework if anything is needed.
^ permalink raw reply
* [QUESTION] staging: octeon: is the FIXME in cvm_oct_sgmii_init stale?
From: Pablo D. Bergamasco @ 2026-06-17 21:07 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, danpablo
Hi Greg,
While looking at drivers/staging/octeon/ethernet-sgmii.c I noticed
a FIXME comment in cvm_oct_sgmii_init():
cvm_oct_common_init(dev);
/* FIXME: Need autoneg logic */
return 0;
After tracing the code, I believe autoneg is already handled when
the interface is opened:
cvm_oct_sgmii_open()
-> cvm_oct_common_open()
-> cvm_oct_phy_setup_device()
-> phy_start()
-> phy_state_machine()
-> _phy_start_aneg()
-> genphy_config_aneg()
Is my analysis correct? If so, should I send a patch to remove
the stale FIXME comment?
Thanks,
Pablo D. Bergamasco
^ permalink raw reply
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