Commit graph

1,462,214 commits

Author SHA1 Message Date
Dalvin-Ehinoma Noah Aiguobas
b2a8923dc2 staging: rtl8723bs: add braces to resolve checkpatch
Resolved checkpatch finding by adding braces as shown in styleguide.

Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <fliegbert2@gmail.com>
Link: https://patch.msgid.link/aiG4aDh2czwJ2-bf@koolguy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:17:07 +02:00
Eugene Mavick
6e68c64a71 staging: rtl8723bs: remove unnecessary parentheses
Remove unnecessary parantheses around &(foo->bar) type statements to
improve code readability

Signed-off-by: Eugene Mavick <m@mavick.dev>
Link: https://patch.msgid.link/20260604095617.852425-1-m@mavick.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:16:58 +02:00
Cong Nguyen
df8ec79e1e staging: rtl8723bs: remove unused network_type_in_use field
The network_type_in_use member of struct wlan_bssid_ex is write-only:
nothing in the driver ever reads it. It is assigned in three places,
none of which feed anything:

  - collect_bss_info() hard-codes it to Ndis802_11OFDM24 for every
    parsed beacon/probe response, regardless of the network's actual
    band or rates (it is even wrong for 5 GHz APs, which the same
    function explicitly handles).
  - rtw_check_beacon_data() and rtw_update_registrypriv_dev_network()
    derive it from the wireless mode via a switch, but the result is
    likewise never consumed.

The live PHY classification the driver actually acts on is kept in
wlan_network.network_type (the WIRELESS_11x value), so this NDIS-era
field is redundant.

struct wlan_bssid_ex is an internal structure passed by pointer through
the driver command queue; it is never serialized to firmware or onto
the air (the wire data lives in ies[]), so dropping a member is
layout-safe as long as the module is rebuilt as a whole.

enum ndis_802_11_network_type existed only to type this field, so
remove it as well. No functional change.

Signed-off-by: Cong Nguyen <congnt264@gmail.com>
Link: https://patch.msgid.link/20260603122806.1330145-1-congnt264@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:16:50 +02:00
Nikolay Kulikov
deec171bb5 staging: rtl8723bs: remove unused 'oui' parameter from update_beacon()
After deleting one of the switch-case branches, this parameter became
unused, so remove it.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260601150253.69930-3-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:01:07 +02:00
Nikolay Kulikov
d56596dda0 staging: rtl8723bs: remove unused case from update_beacon()
The update_beacon() function is never called with 'ie_id' equal to
'WLAN_EID_VENDOR_SPECIFIC', meaning this case branch will never be
called, so remove it and several related functions.

Removing this case branch also fixes a possible null pointer
dereference in update_bcn_vendor_spec() if 'oui' is NULL, since
its value is not checked in any way.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260601150253.69930-2-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:01:06 +02:00
Eugene Mavick
c764096115 staging: rtl8723bs: fix alignment
Fix alignment to improve code readability and clear checkpatch warning:
CHECK: Alignment should match open parenthesis

Signed-off-by: Eugene Mavick <mavick4022@gmail.com>
Link: https://patch.msgid.link/20260601093757.612130-3-mavick4022@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:00:38 +02:00
Cong Nguyen
5c632ffb06 staging: rtl8723bs: use nl80211_iftype instead of custom NDIS enum
The driver defined its own enum ndis_802_11_network_infrastructure to
represent the operating mode (STA/AP/IBSS) and translated nl80211 iftypes
into it in cfg80211_rtw_change_iface(). The kernel already provides
enum nl80211_iftype for this purpose, so use it directly and drop the
redundant translation layer.

Map the removed values as follows:
  Ndis802_11IBSS           -> NL80211_IFTYPE_ADHOC
  Ndis802_11Infrastructure -> NL80211_IFTYPE_STATION
  Ndis802_11APMode         -> NL80211_IFTYPE_AP
  Ndis802_11AutoUnknown    -> NL80211_IFTYPE_UNSPECIFIED

Compile-tested only.

Signed-off-by: Cong Nguyen <congnt264@gmail.com>
Link: https://patch.msgid.link/20260707104836.3176765-1-congnt264@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:56:18 +02:00
Dalvin-Ehinoma Noah Aiguobas
72fdea5bb7 staging: rtl8723bs: Rename camelcase variable dot11AuthAlgrthm
Rename variable dot11AuthAlgrthm to dot11_auth_algrthm in
struct security_priv to resolve checkpatch.pl CamelCase finding.

Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <fliegbert2@gmail.com>
Link: https://patch.msgid.link/ahwHbMecWpijQBv9@koolguy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:24:10 +02:00
Nikolay Kulikov
8235e82830 staging: rtl8723bs: remove unused field 'bAPKThermalMeterIgnore'
This field is set to 'true' once and is never used again. Remove it to
eliminate dead code.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260531080015.74870-1-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:24:06 +02:00
Praveen Jayaprakash Pattar
8b6650e7df staging: rtl8723bs: hal: Fix space before tab in rtl8723b_dm.c
Remove tab characters that appeared after '/*' in two comment lines,
which caused 'please, no space before tabs' warnings. Replace the
space+tab combination with a single space after the comment opener.

Detected by checkpatch.pl with --strict flag.

Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
Link: https://patch.msgid.link/20260531045511.5774-1-praveen.pattar2022@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:24:03 +02:00
Praveen Jayaprakash Pattar
2166524364 staging: rtl8723bs: hal: Fix indentation in odm_EdcaTurboCheck.c
Fix incorrect indentation of an if statement inside an else block.
The statement had a space before it instead of proper tab alignment,
causing checkpatch.pl to report 'suspect code indent' and 'statements
should start on a tabstop' warnings.

Detected by checkpatch.pl with --strict flag.

Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
Link: https://patch.msgid.link/20260531040420.5426-1-praveen.pattar2022@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:24:01 +02:00
Tomasz Unger
b251a4ecfb staging: rtl8723bs: fix spelling mistake found by codespell
Corrected typo in comment:
 - varable -> variable

Found by codespell.

Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
Link: https://patch.msgid.link/20260528-fix-typo-rtw-mlme-v1-1-2172d3227b00@yahoo.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:23:56 +02:00
Tomasz Unger
15f429e499 staging: rtl8723bs: fix spelling mistake in rtw_recv.c
Fix typo 'temporily' -> 'temporarily' in comments.

Found by codespell.

Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
Link: https://patch.msgid.link/20260527-staging-fix-1-v1-1-66ad880bcf76@yahoo.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:23:53 +02:00
Tomasz Unger
579bc50df7 staging: rtl8723bs: fix spelling mistakes found by codespell
Corrected typos in comments:
 - contrl -> control
 - Redifine -> Redefine
 - pauload -> payload

Found by codespell.

Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
Link: https://patch.msgid.link/20260526-fix-typos-hal-com-reg-v1-1-9deb54e6e2e8@yahoo.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:23:51 +02:00
Tomasz Unger
5cddb66eca staging: rtl8723bs: fix spelling mistake found by codespell
Corrected typo: FASLE -> FALSE in comment

Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
Link: https://patch.msgid.link/20260526-fix-typo-odm-dig-v1-1-4392b0c03e13@yahoo.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:23:46 +02:00
Igor Putko
031ad20c28 staging: rtl8723bs: remove empty loop and stale comment in HalPhyRf.c
The 'for' loop in ODM_TXPowerTrackingCallback_ThermalMeter performs no
operations and just iterates over the path count. This is unnecessary code.
Also, remove the associated "Print Swing base & current" comment, as
it no longer refers to any active code.

Signed-off-by: Igor Putko <igorpetindev@gmail.com>
Link: https://patch.msgid.link/20260525121004.4989-1-igorpetindev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:21:48 +02:00
Anirban Bose
c5f5b743a8 staging: rtl8723bs: rename camelcase variable nSubframe_Length
Rename the variable 'nSubframe_Length' to 'subframe_len' in
amsdu_to_msdu() and rtw_alloc_msdu_pkt() to resolve a
checkpatch.pl CamelCase warning.

Signed-off-by: Anirban Bose <boses156@gmail.com>
Link: https://patch.msgid.link/20260525074419.144884-1-boses156@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:19:03 +02:00
Praveen Jayaprakash Pattar
fb62073f38 staging: rtl8723bs: hal: Fix block comment style in HalPwrSeqCmd.c
Fix non-standard block comment format. The comment was using '/*++'
and '--*/' delimiters instead of the standard '/*' and '*/' used in
kernel coding style. Also fix missing '*' prefix on subsequent lines
and remove space before tab characters.

Detected by checkpatch.pl with --strict flag.

Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
Link: https://patch.msgid.link/20260524152506.5670-1-praveen.pattar2022@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:19:02 +02:00
Atharv Margur
1759317a1b staging: rtl8723bs: remove unnecessary braces in odm_HWConfig.c
Remove unnecessary braces around a single statement block
to improve readability and conform to kernel coding style.

No functional changes intended.

Signed-off-by: Atharv Margur <atharvmargur@gmail.com>
Link: https://patch.msgid.link/20260524111736.14477-1-atharvmargur@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:19:00 +02:00
Rodrigo Gobbi
ac4c8003f1 staging: rtl8723bs: fix unnamed parameters warning detected at checkpatch
Detected the following WARNING: function definition argument
'struct adapter *' should also have an identifier name.
Add explicit names on those definitions.

Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
Link: https://patch.msgid.link/20260609221200.123422-1-rodrigo.gobbi.7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:15:31 +02:00
Artur Ugnivenko
cf8caa4d8e staging: rtl8723bs: fix inconsistent braces in hal/sdio_halinit.c
Fix checkpatch warnings on inconsistent braces around if/else statements
in hal/sdio_halinit.c

Signed-off-by: Artur Ugnivenko <artur.ugnivenko@gmx.de>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260528170645.30861-3-artur.ugnivenko@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:15:06 +02:00
Artur Ugnivenko
e522fda24e staging: rtl8723bs: shorten long lines in hal/sdio_halinit.c
Fix checkpatch warnings on lines above 100 chars in length by splitting
long function calls and long comments into multiple lines.

Signed-off-by: Artur Ugnivenko <artur.ugnivenko@gmx.de>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260528170645.30861-2-artur.ugnivenko@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:15:06 +02:00
Dawei Feng
264676418b staging: rtl8723bs: fix mismatched free of HalData in rtw_sdio_if1_init()
padapter->HalData is allocated via vzalloc(), but incorrectly freed
using kfree() in the rtw_sdio_if1_init() error path. Using kfree() to
release this vmalloc-backed buffer can lead to memory corruption.

Use rtw_hal_data_deinit() to pair the free correctly and free
HalData with vfree().

The bug was first flagged by an experimental static analysis tool we
are developing for kernel memory-management bugs. Manual inspection
confirms that the issue is still present in current mainline.

An x86_64 allyesconfig build showed no new warnings. As we do not have
suitable RTL8723BS SDIO hardware to test with, no runtime testing was
able to be performed.

Fixes: 554c0a3abf ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Signed-off-by: Dawei Feng <dawei.feng@seu.edu.cn>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260525091836.812565-1-dawei.feng@seu.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:14:52 +02:00
Gianmaria Biselli
9c43e6d268 staging: rtl8723bs: rename CamelCase variable RxMgmtFrameSeqNum
Rename RxMgmtFrameSeqNum to rx_mgmt_frame_seq_num to comply with
kernel coding style.

Found by checkpatch.pl strict.

Signed-off-by: Gianmaria Biselli <gianmariabiselli@gmail.com>
Link: https://patch.msgid.link/20260524031212.26208-1-gianmariabiselli@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:14:36 +02:00
Mohammed Momin
1d1387ae5a staging: rtl8723bs: add missing spaces around '*' operator
Adhere to the Linux kernel coding style by adding missing spaces
around the '*' binary operator in the init_channel_set function.
This resolves a checkpatch warning and improves code readability.

Signed-off-by: Mohammed Momin <linuxmomin0@gmail.com>
Link: https://patch.msgid.link/20260523171903.30484-1-linuxmomin0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:14:25 +02:00
Pramod Maurya
eaa083db4e staging: rtl8723bs: Fix line over 100 chars in xmit_linux.c
Wrap the long function signature of rtw_os_xmit_resource_free to
comply with the 100 column line length limit reported by checkpatch.pl.

Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
Link: https://patch.msgid.link/20260523162831.163704-1-pramod.nexgen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:14:17 +02:00
Atharv Margur
d7d912dc48 staging: rtl8723bs: remove unnecessary braces in rtl8723b_hal_init.c
Remove unnecessary braces around single statement blocks
to improve readability and conform to kernel coding style.

No functional changes intended.

Signed-off-by: Atharv Margur <atharvmargur@gmail.com>
Link: https://patch.msgid.link/20260523141341.21607-1-atharvmargur@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:14:06 +02:00
Andrei Khomenkov
c93ab5df59 staging: rtl8723bs: clean up wlanevents table in rtw_mlme_ext.c
Clean up the wlanevents table by removing redundant
ampersands, adding all index comments and aligning them.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260522190256.49830-3-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:13:41 +02:00
Andrei Khomenkov
d0fcff26be staging: rtl8723bs: remove dead rtw_atimdone_event_callback()
Remove the dead rtw_atimdone_event_callback() function since it is
unused anywhere in the driver. In the wlanevents table, replace it
with rtw_dummy_event_callback() to avoid an index shift.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260522190256.49830-2-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:13:41 +02:00
Moksh Panicker
37ff84774a staging: rtl8723bs: reformat rtw_efuse_one_byte_read() signature
Reformat multi-line function signature to a single line to fix
line length and coding style warnings from checkpatch.pl.

Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
Link: https://patch.msgid.link/20260522125022.29700-3-mokshpanicker.7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:13:07 +02:00
Pang-Chun Liu
b32b7c32bb staging: rtl8723bs: remove unused rtl8192c function declarations
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>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260521144113.28869-1-kevin95120@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:12:51 +02:00
Hungyu Lin
b8424da699 staging: rtl8723bs: convert LPS_RF_ON_check to errno
Convert LPS_RF_ON_check() to return standard kernel error codes.

Replace -1 and -2 with -ETIMEDOUT and -ENODEV respectively.

No functional change intended as callers currently ignore
the return value.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Link: https://patch.msgid.link/20260521104316.27739-3-dennylin0707@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:51:51 +02:00
Hungyu Lin
e1afb47e4f staging: rtl8723bs: simplify LPS_RF_ON_check control flow
Replace err + break pattern with direct returns to simplify
the control flow and improve readability.

No functional change intended.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Link: https://patch.msgid.link/20260521104316.27739-2-dennylin0707@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:51:51 +02:00
Prashant Rahul
4bcc688a11 staging: octeon: handle rx/tx initialization failures in probe
Check return value of rx/tx initialization functions and abort probing
if either one fails.

Add error handling labels to deallocate resources before returning the
error.

Signed-off-by: Prashant Rahul <prashantrahul23@gmail.com>
Tested-by: Klara Modin <klarasomdin@gmail.com>
Link: https://patch.msgid.link/20260702-staging-driver-octeon-panic-v2-4-2c2b6ae086dd@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:25:28 +02:00
Prashant Rahul
53113fbfb9 staging: octeon: Propagate tx initialization failures
Instead of calling panic(), log and propagate the error upwards for
better error handling.

Pass platform_device to tx initializer to match the rx
initializer interface and to log device specific failures.

Signed-off-by: Prashant Rahul <prashantrahul23@gmail.com>
Tested-by: Klara Modin <klarasmodin@gmail.com>
Tested-by: Klara Modin <klarasomdin@gmail.com>
Link: https://patch.msgid.link/20260702-staging-driver-octeon-panic-v2-3-2c2b6ae086dd@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:25:27 +02:00
Prashant Rahul
ae43503640 staging: octeon: Propagate rx initialization failures
Instead of calling panic(), log and propagate the error upwards for
better error handling.

Signed-off-by: Prashant Rahul <prashantrahul23@gmail.com>
Tested-by: Klara Modin <klarasmodin@gmail.com>
Tested-by: Klara Modin <klarasomdin@gmail.com>
Link: https://patch.msgid.link/20260702-staging-driver-octeon-panic-v2-2-2c2b6ae086dd@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:25:27 +02:00
Prashant Rahul
a30679ddf1 staging: octeon: factor out device removal into a helper
Factor out the common device removal sequence into a helper in
preparation for adding cleanup to the probe error path.

Signed-off-by: Prashant Rahul <prashantrahul23@gmail.com>
Tested-by: Klara Modin <klarasomdin@gmail.com>
Link: https://patch.msgid.link/20260702-staging-driver-octeon-panic-v2-1-2c2b6ae086dd@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:25:27 +02:00
Ayush Mukkanwar
c0a9a8586a staging: octeon: add missing napi_disable in cvm_oct_rx_shutdown
cvm_oct_rx_shutdown calls free_irq and netif_napi_del without
disabling the napi instance first. As the free_irq only waits
for completion of hard interrupt handlers, the napi poll
function could still be active. If cvm_oct_remove proceeds to
free the plat structure (which holds the NAPI instances), the
active poll function will access freed memory, resulting in a
use-after-free crash.

Fixes: 3368c784bc ("Staging: Octeon Ethernet: Convert to NAPI.")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260511150931.93382-1-ayushmukkanwar%40gmail.com
Signed-off-by: Ayush Mukkanwar <ayushmukkanwar@gmail.com>
Link: https://patch.msgid.link/20260615172734.42038-2-ayushmukkanwar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:25:22 +02:00
Ayush Mukkanwar
b9af44b0d2 staging: octeon: add missing tasklet_kill in cvm_oct_tx_shutdown
The TX cleanup tasklet can be scheduled by the watchdog IRQ handler
to execute cvm_oct_tx_do_cleanup. There can be a pending tasklet in
the queue which might run after the cvm_oct_remove() frees net_device
structures, causing a use-after-free in cvm_oct_tx_do_cleanup() as it
iterates cvm_oct_device[] which is an array of netdevice pointers.
Add tasklet_kill() after free_irq() to ensure the tasklet is no longer
scheduled or running before teardown proceeds.

Fixes: 4898c56010 ("Staging: Octeon:  Free transmit SKBs in a timely manner")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260511150931.93382-1-ayushmukkanwar%40gmail.com
Signed-off-by: Ayush Mukkanwar <ayushmukkanwar@gmail.com>
Link: https://patch.msgid.link/20260615172734.42038-1-ayushmukkanwar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:25:22 +02:00
Dorian Catric
d1760cc87c staging: nvec: remove extra space in enum declaration
Remove extra space in 'enum nvec_msg_category  {' declaration.

Signed-off-by: Dorian Catric <dorian.catric@gmail.com>
Link: https://patch.msgid.link/20260603172719.398-2-dorian.catric@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:23:29 +02:00
Dorian Catric
e58a7f2ed6 staging: nvec: fix typo in copyright header URL
Fix typo 'lauchpad.net' -> 'launchpad.net' in the copyright header.
The correct spelling is already used in nvec.h.

Signed-off-by: Dorian Catric <dorian.catric@gmail.com>
Link: https://patch.msgid.link/20260603172719.398-1-dorian.catric@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:23:29 +02:00
Tomasz Unger
59280b1776 staging: fbtft: fix typo in comment in fb_upd161704.c
Fix spelling mistake found by codespell: "cencter" -> "center".

Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20260611-upd161704-typo-v1-1-2e51387c3b28@yahoo.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:22:36 +02:00
Dan Carpenter
221192a784 staging: fbtft: Use sysfs_emit_at() to print to sysfs file
This scnprintf() uses the wrong limit.  It should be "PAGE_SIZE - len"
instead of just PAGE_SIZE.  We're not going to hit the limit in real
life since we are printing at most FBTFT_GAMMA_MAX_VALUES_TOTAL (128)
u32 values, however, it's still worth fixing.

Use sysfs_emit_at() to fix this since this is a sysfs file.

Fixes: c296d5f995 ("staging: fbtft: core support")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/ah_Y_Y2RtqeGxchF@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:22:31 +02:00
Hao-Qun Huang
6d45195a96 staging: greybus: hid: fix SET_REPORT return value
__gb_hid_output_raw_report() stores the result of gb_hid_set_report()
in ret and even adjusts it to account for the report ID byte, but then
always returns 0.

This hides Greybus transport errors from HID_REQ_SET_REPORT callers,
and makes hidraw report zero bytes written to user space on success,
although hid_hw_raw_request() is expected to return the number of
bytes transferred or a negative errno. The sibling GET_REPORT path,
__gb_hid_get_raw_report(), already follows this convention.

Return ret like the other HID transport drivers do.

Fixes: 96eab779e1 ("greybus: hid: add HID class driver")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-fable-5
Signed-off-by: Hao-Qun Huang <alvinhuang0603@gmail.com>

Link: https://patch.msgid.link/20260704081613.434445-1-alvinhuang0603@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:20:55 +02:00
Jad Keskes
1be54c03f7 staging: sm750fb: rename pvReg to mmio
Rename the Hungarian-notation pvReg field to mmio, which describes
what it is (memory-mapped I/O) rather than what type it is (pointer
to void).

This is a purely mechanical change with no functional difference.

Signed-off-by: Jad Keskes <inasj268@gmail.com>
Link: https://patch.msgid.link/20260619091332.622116-1-inasj268@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:20:05 +02:00
Alfie Varghese
3d2718e3b1 staging: greybus: vibrator: return device_create() errors
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>
Link: https://patch.msgid.link/20260618113439.569-1-alfievarghese22@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:20:00 +02:00
Tomasz Unger
443063a342 staging: greybus: power_supply: remove unnecessary parentheses in return
return is not a function, so the parentheses around the returned
expressions are not needed. Remove them to follow kernel coding
style and silence checkpatch.pl RETURN_PARENTHESES warnings.

Verified with checkpatch.pl - no errors or warnings.
Compiled the power_supply object successfully.

Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
Acked-by: Rui Miguel Silva <rui.silva@linaro.org>
Link: https://patch.msgid.link/20260615-greybus-power-supply-return-parens-v1-1-dcad9dabfe79@yahoo.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:19:57 +02:00
Bryam Vargas
33d8c7b794 greybus: audio: bound the topology section sizes against the fetched size
gb_audio_gb_get_topology() fetches a topology blob of a module-supplied
size, and gbaudio_tplg_parse_data() then walks it by adding the
module-supplied size_dais, size_controls and size_widgets fields to
form the control, widget and route section offsets. Those le32 sizes
are never checked against the fetched blob, so a module reporting a
small topology size but large section sizes makes the offsets point
past the allocation, and parsing reads out of bounds.

Reject a topology whose section sizes do not fit within the fetched
size before it is parsed.

Fixes: 184992e305 ("greybus: audio: Add Greybus Audio Device Class Protocol helper routines")
Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me>
Link: https://patch.msgid.link/20260616-b4-disp-4352e8b0-v1-1-3e09f62e0ad5@proton.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:19:46 +02:00
Michail Tatas
cbc8262f68 staging: greybus: Remove unused macro
Remove unused macro as indicated by the compiler
when building with make W=2

Signed-off-by: Michail Tatas <michail.tatas@gmail.com>
Link: https://patch.msgid.link/ahdNZlYqnTO22tQq@michalis-linux
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:19:33 +02:00
Abdelnasser Hussein
b5c347f7f0 staging: greybus: audio_codec: remove redundant else-if check
In gbaudio_module_update(), the widget id is validated earlier in the
function to ensure it is either snd_soc_dapm_aif_in or
snd_soc_dapm_aif_out.

Remove the redundant else-if check for snd_soc_dapm_aif_out. The
remaining branch can only handle snd_soc_dapm_aif_out, which avoids
a compiler warning about a potentially uninitialized variable.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606140347.gGVWDnbi-lkp@intel.com/
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
Link: https://patch.msgid.link/20260614154329.5176-3-abdelnasserhussein11@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 11:19:05 +02:00