summaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorLines
9 daysConvert remaining multi-line kmalloc_obj/flex GFP_KERNEL usesKees Cook-16/+10
Conversion performed via this Coccinelle script: // SPDX-License-Identifier: GPL-2.0-only // Options: --include-headers-for-types --all-includes --include-headers --keep-comments virtual patch @gfp depends on patch && !(file in "tools") && !(file in "samples")@ identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex, kzalloc_obj,kzalloc_objs,kzalloc_flex, kvmalloc_obj,kvmalloc_objs,kvmalloc_flex, kvzalloc_obj,kvzalloc_objs,kvzalloc_flex}; @@ ALLOC(... - , GFP_KERNEL ) $ make coccicheck MODE=patch COCCI=gfp.cocci Build and boot tested x86_64 with Fedora 42's GCC and Clang: Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01 Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01 Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 daysConvert more 'alloc_obj' cases to default GFP_KERNEL argumentsLinus Torvalds-24/+12
This converts some of the visually simpler cases that have been split over multiple lines. I only did the ones that are easy to verify the resulting diff by having just that final GFP_KERNEL argument on the next line. Somebody should probably do a proper coccinelle script for this, but for me the trivial script actually resulted in an assertion failure in the middle of the script. I probably had made it a bit _too_ trivial. So after fighting that far a while I decided to just do some of the syntactically simpler cases with variations of the previous 'sed' scripts. The more syntactically complex multi-line cases would mostly really want whitespace cleanup anyway. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 daysConvert 'alloc_flex' family to use the new default GFP_KERNEL argumentLinus Torvalds-2/+2
This is the exact same thing as the 'alloc_obj()' version, only much smaller because there are a lot fewer users of the *alloc_flex() interface. As with alloc_obj() version, this was done entirely with mindless brute force, using the same script, except using 'flex' in the pattern rather than 'objs*'. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 daysConvert 'alloc_obj' family to use the new default GFP_KERNEL argumentLinus Torvalds-137/+137
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 daystreewide: Replace kmalloc with kmalloc_obj for non-scalar typesKees Cook-229/+232
This is the result of running the Coccinelle script from scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to avoid scalar types (which need careful case-by-case checking), and instead replace kmalloc-family calls that allocate struct or union object instances: Single allocations: kmalloc(sizeof(TYPE), ...) are replaced with: kmalloc_obj(TYPE, ...) Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...) are replaced with: kmalloc_objs(TYPE, COUNT, ...) Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...) are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...) (where TYPE may also be *VAR) The resulting allocations no longer return "void *", instead returning "TYPE *". Signed-off-by: Kees Cook <kees@kernel.org>
14 daysMerge tag 'staging-7.0-rc1' of ↵Linus Torvalds-1509/+1111
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big set of staging driver updates for 7.0-rc1. Well, not that big, just lots of tiny coding style cleanups primarily in one driver as everyone seems to have glomed onto it for some reason that escapes me (is there a tutorial out there somewhere pointing people at this?) Not much overall, the changes can be summarized as: - cleanups for the rtl8723bs driver, so many cleanups... - vme_user driver cleanups - sm750fb driver cleanups - tiny greybus driver cleanups - other really small staging driver cleanups All of these have been in linux-next for a while with no reported issues" * tag 'staging-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (119 commits) staging: rtl8723bs: refactor ODM_SetIQCbyRFpath to reduce duplication staging: rtl8723bs: rename CamelCase function Set_MSR to set_msr staging: rtl8723bs: remove unnecessary blank lines in rtw_io.c staging: rtl8723bs: remove stale TODO item regarding %pM staging: rtl8723bs: remove unused allocation wrapper functions staging: rtl8723bs: use standard skb allocation APIs staging: rtl8723bs: replace rtw_zmalloc() with kzalloc() staging: rtl8723bs: replace rtw_malloc() with kmalloc() staging: rtl8723bs: introduce kmemdup() where applicable staging: sm750fb: Clean up variable names staging: rtl8723bs: fix null dereference in find_network staging: rtl8723bs: use unaligned access macros in rtw_security.c staging: rtl8723bs: fix potential race in expire_timeout_chk staging: rtl8723bs: remove dead debugging code in rtw_mlme_ext.c staging: rtl8723bs: modernize hex output in rtw_report_sec_ie staging: rtl8723bs: fix spacing around operators staging: rtl8723bs: rename u1bTmp to val staging: rtl8723bs: remove unused private debug counters staging: rtl8723bs: remove thread wraper functions and add IS_ERR() check staging: rtl8723bs: fix firmware memory leak on error ...
14 daysMerge tag 'char-misc-7.0-rc1' of ↵Linus Torvalds-81/+5
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc/IIO driver updates from Greg KH: "Here is the big set of char/misc/iio and other smaller driver subsystem changes for 7.0-rc1. Lots of little things in here, including: - Loads of iio driver changes and updates and additions - gpib driver updates - interconnect driver updates - i3c driver updates - hwtracing (coresight and intel) driver updates - deletion of the obsolete mwave driver - binder driver updates (rust and c versions) - mhi driver updates (causing a merge conflict, see below) - mei driver updates - fsi driver updates - eeprom driver updates - lots of other small char and misc driver updates and cleanups All of these have been in linux-next for a while, with no reported issues" * tag 'char-misc-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (297 commits) mux: mmio: fix regmap leak on probe failure rust_binder: return p from rust_binder_transaction_target_node() drivers: android: binder: Update ARef imports from sync::aref rust_binder: fix needless borrow in context.rs iio: magn: mmc5633: Fix Kconfig for combination of I3C as module and driver builtin iio: sca3000: Fix a resource leak in sca3000_probe() iio: proximity: rfd77402: Add interrupt handling support iio: proximity: rfd77402: Document device private data structure iio: proximity: rfd77402: Use devm-managed mutex initialization iio: proximity: rfd77402: Use kernel helper for result polling iio: proximity: rfd77402: Align polling timeout with datasheet iio: cros_ec: Allow enabling/disabling calibration mode iio: frequency: ad9523: correct kernel-doc bad line warning iio: buffer: buffer_impl.h: fix kernel-doc warnings iio: gyro: itg3200: Fix unchecked return value in read_raw MAINTAINERS: add entry for ADE9000 driver iio: accel: sca3000: remove unused last_timestamp field iio: accel: adxl372: remove unused int2_bitmask field iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll() iio: magnetometer: Remove IRQF_ONESHOT ...
2026-02-14staging: fbtft: Make framebuffer registration message debug-onlyChintan Patel-5/+5
The framebuffer registration message is informational only and not useful during normal operation. Convert it to debug-level logging to keep the driver quiet when working correctly. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Chintan Patel <chintanlike@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
2026-02-14staging: fbtft: Fix build failure when CONFIG_FB_DEVICE=nChintan Patel-10/+9
When CONFIG_FB_DEVICE is disabled, struct fb_info does not provide a valid dev pointer. Direct dereferences of fb_info->dev therefore result in build failures. Fix this by avoiding direct accesses to fb_info->dev and switching the affected debug logging to framebuffer helpers that do not rely on a device pointer. This fixes the following build failure reported by the kernel test robot. Fixes: a06d03f9f238 ("staging: fbtft: Make FB_DEVICE dependency optional") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202601110740.Y9XK5HtN-lkp@intel.com Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Chintan Patel <chintanlike@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
2026-02-14staging: fbtft: Make FB_DEVICE dependency optionalChintan Patel-5/+20
fbtft provides sysfs interfaces for debugging and gamma configuration, but these are not required for the core driver. Drop the hard dependency on CONFIG_FB_DEVICE and make sysfs support optional by using dev_of_fbinfo() at runtime. When FB_DEVICE is disabled, sysfs operations are skipped while the code remains buildable and type-checked. Suggested-by: Thomas Zimmermann <tzimmermann@suse.de> Suggested-by: Helge Deller <deller@gmx.de> Reviewed-by: Helge Deller <deller@gmx.de> Signed-off-by: Chintan Patel <chintanlike@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Helge Deller <deller@gmx.de>
2026-02-12Merge tag 'mm-nonmm-stable-2026-02-12-10-48' of ↵Linus Torvalds-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: - "ocfs2: give ocfs2 the ability to reclaim suballocator free bg" saves disk space by teaching ocfs2 to reclaim suballocator block group space (Heming Zhao) - "Add ARRAY_END(), and use it to fix off-by-one bugs" adds the ARRAY_END() macro and uses it in various places (Alejandro Colomar) - "vmcoreinfo: support VMCOREINFO_BYTES larger than PAGE_SIZE" makes the vmcore code future-safe, if VMCOREINFO_BYTES ever exceeds the page size (Pnina Feder) - "kallsyms: Prevent invalid access when showing module buildid" cleans up kallsyms code related to module buildid and fixes an invalid access crash when printing backtraces (Petr Mladek) - "Address page fault in ima_restore_measurement_list()" fixes a kexec-related crash that can occur when booting the second-stage kernel on x86 (Harshit Mogalapalli) - "kho: ABI headers and Documentation updates" updates the kexec handover ABI documentation (Mike Rapoport) - "Align atomic storage" adds the __aligned attribute to atomic_t and atomic64_t definitions to get natural alignment of both types on csky, m68k, microblaze, nios2, openrisc and sh (Finn Thain) - "kho: clean up page initialization logic" simplifies the page initialization logic in kho_restore_page() (Pratyush Yadav) - "Unload linux/kernel.h" moves several things out of kernel.h and into more appropriate places (Yury Norov) - "don't abuse task_struct.group_leader" removes the usage of ->group_leader when it is "obviously unnecessary" (Oleg Nesterov) - "list private v2 & luo flb" adds some infrastructure improvements to the live update orchestrator (Pasha Tatashin) * tag 'mm-nonmm-stable-2026-02-12-10-48' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (107 commits) watchdog/hardlockup: simplify perf event probe and remove per-cpu dependency procfs: fix missing RCU protection when reading real_parent in do_task_stat() watchdog/softlockup: fix sample ring index wrap in need_counting_irqs() kcsan, compiler_types: avoid duplicate type issues in BPF Type Format kho: fix doc for kho_restore_pages() tests/liveupdate: add in-kernel liveupdate test liveupdate: luo_flb: introduce File-Lifecycle-Bound global state liveupdate: luo_file: Use private list list: add kunit test for private list primitives list: add primitives for private list manipulations delayacct: fix uapi timespec64 definition panic: add panic_force_cpu= parameter to redirect panic to a specific CPU netclassid: use thread_group_leader(p) in update_classid_task() RDMA/umem: don't abuse current->group_leader drm/pan*: don't abuse current->group_leader drm/amd: kill the outdated "Only the pthreads threading model is supported" checks drm/amdgpu: don't abuse current->group_leader android/binder: use same_thread_group(proc->tsk, current) in binder_mmap() android/binder: don't abuse current->group_leader kho: skip memoryless NUMA nodes when reserving scratch areas ...
2026-02-11Merge tag 'drm-next-2026-02-11' of https://gitlab.freedesktop.org/drm/kernelLinus Torvalds-3/+1
Pull drm updates from Dave Airlie: "Highlights: - amdgpu support for lots of new IP blocks which means newer GPUs - xe has a lot of SR-IOV and SVM improvements - lots of intel display refactoring across i915/xe - msm has more support for gen8 platforms - Given up on kgdb/kms integration, it's too hard on modern hw core: - drop kgdb support - replace system workqueue with percpu - account for property blobs in memcg - MAINTAINERS updates for xe + buddy rust: - Fix documentation for Registration constructors - Use pin_init::zeroed() for fops initialization - Annotate DRM helpers with __rust_helper - Improve safety documentation for gem::Object::new() - Update AlwaysRefCounted imports - mm: Prevent integer overflow in page_align() atomic: - add drm_device pointer to drm_private_obj - introduce gamma/degamma LUT size check buddy: - fix free_trees memory leak - prevent BUG_ON bridge: - introduce drm_bridge_unplug/enter/exit - add connector argument to .hpd_notify - lots of recounting conversions - convert rockchip inno hdmi to bridge - lontium-lt9611uxc: switch to HDMI audio helpers - dw-hdmi-qp: add support for HPD-less setups - Algoltek AG6311 support panels: - edp: CSW MNE007QB3-1, AUO B140HAN06.4, AUO B140QAX01.H - st75751: add SPI support - Sitronix ST7920, Samsung LTL106HL02 - LG LH546WF1-ED01, HannStar HSD156J - BOE NV130WUM-T08 - Innolux G150XGE-L05 - Anbernic RG-DS dma-buf: - improve sg_table debugging - add tracepoints - call clear_page instead of memset - start to introduce cgroup memory accounting in heaps - remove sysfs stats dma-fence: - add new helpers dp: - mst: avoid oob access with vcpi=0 hdmi: - limit infoframes exposure to userspace gem: - reduce page table overhead with THP - fix leak in drm_gem_get_unmapped_area gpuvm: - API sanitation for rust bindings sched: - introduce new helpers panic: - report invalid panic modes - add kunit tests i915/xe display: - Expose sharpness only if num_scalers is >= 2 - Add initial Xe3P_LPD for NVL - BMG FBC support - Add MTL+ platforms to support dpll framework _ fix DIMM_S DRM decoding on ICL - Return to using AUX interrupts - PSR/Panel replay refactoring - use consolidation HDMI tables - Xe3_LPD CD2X dividier changes xe: - vfio: add vfio_pci for intel GPU - multi queue support - dynamic pagemaps and multi-device SVM - expose temp attribs in hwmon - NO_COMPRESSION bo flag - expose MERT OA unit - sysfs survivability refactor - SRIOV PF: add MERT support - enable SR-IOV VF migration - Enable I2C/NVM on Crescent Island - Xe3p page reclaimation support - introduce SRIOV scheduler groups - add SoC remappt support in system controller - insert compiler barriers in GuC code - define NVL GuC firmware - handle GT resume failure - fix drm scheduler layering violations - enable GSC loading and PXP for PTL - disable GuC Power DCC strategy on PTL - unregister drm device on probe error i915: - move to kernel standard fault injection - bump recommended GuC version for DG2 and MTL amdgpu: - SMUIO 15.x, PSP 15.x support - IH 6.1.1/7.1 support - MMHUB 3.4/4.2 support - GC 11.5.4/12.1 support - SDMA 6.1.4/7.1/7.11.4 support - JPEG 5.3 support - UserQ updates - GC 9 gfx queue reset support - TTM memory ops parallelization - convert legacy logging to new helpers - DC analog fixes amdkfd: - GC 11.5.4/12.1 suppport - SDMA 6.1.4/7.1 support - per context support - increase kfd process hash table - Reserved SDMA rework radeon: - convert legacy logging to new helpers - use devm for i2c adapters msm: - GPU - Document a612/RGMU dt bindings - UBWC 6.0 support (for A840 / Kaanapali) - a225 support - DPU: - Switch to use virtual planes by default - Fix DSI CMD panels on DPU 3.x - Rewrite format handling to remove intermediate representation - Fix watchdog on DPU 8.x+ - Fix TE / Vsync source setting on DPU 8.x+ - Add 3D_Mux on SC7280 - Kaanapali platform support - Fix UBWC register programming - Make RM reserve DSPP-enabled mixers for CRTCs with LMs - Gamma correction support - DP: - Enable support for eDP 1.4+ link rate tables - Fix MDSS1 DP indices on SA8775P, making them to work - Fix msm_dp_ctrl_config_msa() to work with LLVM 20 - DSI: - Document QCS8300 as compatible with SA8775P - Kaanapali platform support - DSI PHY: - switch to divider_determine_rate() - MDP5: - Drop support for MSM8998, SDM660 and SDM630 (switch over to DPU) - MDSS: - Kaanapali platform support - Fixed UBWC register programming nova-core: - Prepare for Turing support. This includes parsing and handling Turing-specific firmware headers and sections as well as a Turing Falcon HAL implementation - Get rid of the Result<impl PinInit<T, E>> anti-pattern - Relocate initializer-specific code into the appropriate initializer - Use CStr::from_bytes_until_nul() to remove custom helpers - Improve handling of unexpected firmware values - Clean up redundant debug prints - Replace c_str!() with native Rust C-string literals - Update nova-core task list nova: - Align GEM object size to system page size tyr: - Use generated uAPI bindings for GpuInfo - Replace manual sleeps with read_poll_timeout() - Replace c_str!() with native Rust C-string literals - Suppress warnings for unread fields - Fix incorrect register name in print statement nouveau: - fix big page table support races in PTE management - improve reclocking on tegra 186+ amdxdna: - fix suspend race conditions - improve handling of zero tail pointers - fix cu_idx overwritten during command setup - enable hardware context priority - remove NPU2 support - update message buffer allocation requirements - update firmware version check ast: - support imported cursor buffers - big endian fixes etnaviv: - add PPU flop reset support imagination: - add AM62P support - introduce hw version checks ivpu: - implement warm boot flow panfrost: - add bo sync ioctl - add GPU_PM_RT support for RZ/G3E SoC panthor: - add bo sync ioctl - enable timestamp propagation - scheduler robustness improvements - VM termination fixes - huge page support rockchip: - RK3368 HDMI Support - get rid of atomic_check fixups - RK3506 support - RK3576/RK3588 improved HPD handling rz-du: - RZ/V2H(P) MIPI-DSI Support v3d: - fix DMA segment size - convert to new logging helpers mediatek: - move DP training to hotplug thread - convert logging to new helpers - add support for HS speed DSI - Genio 510/700/1200-EVK, Radxa NIO-12L HDMI support atmel-hlcdc: - switch to drmm resource - support nomodeset - use newer helpers hisilicon: - fix various DP bugs renesas: - fix kernel panic on reboot exynos: - fix vidi_connection_ioctl using wrong device - fix vidi_connection deref user ptr - fix concurrency regression with vidi_context vkms: - add configfs support for display configuration * tag 'drm-next-2026-02-11' of https://gitlab.freedesktop.org/drm/kernel: (1610 commits) drm/xe/pm: Disable D3Cold for BMG only on specific platforms drm/xe: Fix kerneldoc for xe_tlb_inval_job_alloc_dep drm/xe: Fix kerneldoc for xe_gt_tlb_inval_init_early drm/xe: Fix kerneldoc for xe_migrate_exec_queue drm/xe/query: Fix topology query pointer advance drm/xe/guc: Fix kernel-doc warning in GuC scheduler ABI header drm/xe/guc: Fix CFI violation in debugfs access. accel/amdxdna: Move RPM resume into job run function accel/amdxdna: Fix incorrect DPM level after suspend/resume nouveau/vmm: start tracking if the LPT PTE is valid. (v6) nouveau/vmm: increase size of vmm pte tracker struct to u32 (v2) nouveau/vmm: rewrite pte tracker using a struct and bitfields. accel/amdxdna: Fix incorrect error code returned for failed chain command accel/amdxdna: Remove hardware context status drm/bridge: imx8qxp-pixel-combiner: Fix bailout for imx8qxp_pc_bridge_probe() drm/panel: ilitek-ili9882t: Remove duplicate initializers in tianma_il79900a_dsc drm/i915/display: fix the pixel normalization handling for xe3p_lpd drm/exynos: vidi: use ctx->lock to protect struct vidi_context member variables related to memory alloc/free drm/exynos: vidi: fix to avoid directly dereferencing user pointer drm/exynos: vidi: use priv->vidi_dev for ctx lookup in vidi_connection_ioctl() ...
2026-02-11Merge tag 'media/v7.0-2' of ↵Linus Torvalds-92/+111
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Add support for GMSL1 and GMSL‑coax modules (PCI mgb4) - Add driver for TI VIP - AV1 – first kernel support (pixel‑format, decoder, transcoder) - Three new camera‑sensor drivers (os05b10, s5k3m5, s5kjn1) - Synopsys CSI‑2 receiver driver - Verisilicon & rkvdec – major fixes and enhancements - IPU6 (and 7) fixes and preparation for metadata - omap3isp: v4l2-compliance updates - Fix DVB streaming, drop wait_prepare/finish (dvb/vb2) * tag 'media/v7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (307 commits) media: uvcvideo: Pass allocation size directly to uvc_alloc_urb_buffer media: uvcvideo: Fix allocation for small frame sizes media: uvcvideo: Return queued buffers on start_streaming() failure media: uvcvideo: Create an ID namespace for streaming output terminals media: rkvdec: Add HEVC support for the VDPU383 variant media: rkvdec: Add HEVC support for the VDPU381 variant media: rkvdec: Add H264 support for the VDPU383 variant media: rkvdec: Add H264 support for the VDPU381 variant media: rkvdec: Disable multicore support media: rkvdec: Enable all clocks without naming them media: rkvdec: Support per-variant interrupt handler media: rkvdec: Add RCB and SRAM support media: rkvdec: Add variant specific coded formats list media: rkvdec: Move hevc functions to common file media: rkvdec: Move h264 functions to common file media: rkvdec: Use structs to represent the HW RPS media: rkvdec: Move cabac tables to their own source file media: rkvdec: Switch to using structs instead of writel media: visl: Add HEVC short and long term RPS sets media: v4l2-ctrls: Add hevc_ext_sps_[ls]t_rps controls ...
2026-02-07staging: rtl8723bs: refactor ODM_SetIQCbyRFpath to reduce duplicationBera Yüzlü-17/+13
Refactor ODM_SetIQCbyRFpath to remove duplicated PHY_SetBBReg() calls and improve readability. The original implementation duplicated the same PHY_SetBBReg() calls for both RF paths (S0 / S1) with only the path index changing. This reduces code duplication, makes the intent clearer and eases future maintenance. No functional change intended: register keys/values and the selection logic remain the same. Signed-off-by: Bera Yüzlü <b9788213@gmail.com> Link: https://patch.msgid.link/aYdF3QYfFHYk3Lpe@BERA.localdomain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: rename CamelCase function Set_MSR to set_msrTan Kai Zhe-13/+13
Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Avoid CamelCase: <Set_MSR> Signed-off-by: Tan Kai Zhe <kaizhetan@yahoo.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260207061313.20103-1-kaizhetan@yahoo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove unnecessary blank lines in rtw_io.cTan Kai Zhe-1/+0
Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Tan Kai Zhe <kaizhetan@yahoo.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260206001833.16857-1-kaizhetan@yahoo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove stale TODO item regarding %pMHaroen Tmimi-1/+0
The TODO list asks to "find codes that can use %pM and %Nph formatting". A grep of the driver directory shows that no manual MAC address formatting (using "%02x:%02x:..) remains in the code, thus all instances appear to have been converted to use "%pM". Remove the stale entry from the TODO list. Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com> Link: https://patch.msgid.link/20260205145159.185981-1-tmimiharoen@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove unused allocation wrapper functionsMinu Jin-36/+0
Remove the custom memory allocation wrapper functions and macros from osdep_service.c and osdep_service.h as they are no longer used. Signed-off-by: Minu Jin <s9430939@naver.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260204131347.3515949-6-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: use standard skb allocation APIsMinu Jin-7/+5
Replace custom wrappers rtw_skb_alloc() and rtw_skb_copy() with standard kernel APIs __dev_alloc_skb() and skb_copy(). About GFP Flags: - GFP_ATOMIC is used for allocations in atomic contexts such as spinlock-protected sections, tasklets, and timer handlers. - GFP_KERNEL is used for process contexts where sleeping is allowed. Signed-off-by: Minu Jin <s9430939@naver.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260204131347.3515949-5-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: replace rtw_zmalloc() with kzalloc()Minu Jin-103/+90
Replace the wrapper function rtw_zmalloc() with standard kzalloc(). Use kzalloc() for rtw_malloc() calls that were followed by manual zero initialization. About GFP Flags: - GFP_ATOMIC is used for allocations in atomic contexts such as spinlock-protected sections, tasklets, and timer handlers. - GFP_KERNEL is used for process contexts where sleeping is allowed. Additionally, use array_size() and size_add() to prevent potential integer overflows during allocation size calculation. Signed-off-by: Minu Jin <s9430939@naver.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260204131347.3515949-4-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: replace rtw_malloc() with kmalloc()Minu Jin-16/+16
Replace the wrapper function rtw_malloc() with standard kmalloc(). Call sites were reviewed to use appropriate GFP flags (GFP_KERNEL or GFP_ATOMIC) based on the execution context. About GFP Flags: - GFP_ATOMIC is used for allocations in atomic contexts such as spinlock-protected sections, tasklets, and timer handlers. - GFP_KERNEL is used for process contexts where sleeping is allowed. Also, convert error return codes from -1 to -ENOMEM where appropriate. Signed-off-by: Minu Jin <s9430939@naver.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260204131347.3515949-3-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: introduce kmemdup() where applicableMinu Jin-25/+12
Replace memory allocation followed by memcpy() with kmemdup() to simplify the code and improve readability. About GFP Flags: - GFP_ATOMIC is used for allocations in atomic contexts such as spinlock-protected sections, tasklets, and timer handlers. - GFP_KERNEL is used for process contexts where sleeping is allowed. Specifically, in OnAssocReq(), GFP_ATOMIC is used because the allocation is performed while holding a spin lock. Signed-off-by: Minu Jin <s9430939@naver.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260204131347.3515949-2-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: sm750fb: Clean up variable namesChristine Ramacha-58/+58
Variables in sm750_accel.c follow a mix of camelCase convention and Hungarian shorthands. Rename it to adhere to kernel's snake_case naming convention and improve readability. Signed-off-by: Christine Ramacha <christine.rv4573@gmail.com> Link: https://patch.msgid.link/20260204145107.5521-1-christine.rv4573@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: fix null dereference in find_networkEthan Tidmore-2/+4
The variable pwlan has the possibility of being NULL when passed into rtw_free_network_nolock() which would later dereference the variable. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Cc: stable@vger.kernel.org Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260202205429.20181-1-ethantidmore06@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: use unaligned access macros in rtw_security.cArchit Anant-27/+5
The driver defines custom functions secmicgetuint32() and secmicputuint32() to handle little-endian byte-to-integer conversion. This is redundant as the kernel provides optimized standard macros for this purpose in <linux/unaligned.h>. Replace the custom implementations with get_unaligned_le32() and put_unaligned_le32() and delete the now-unused local functions. Signed-off-by: Archit Anant <architanant5@gmail.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260130075113.34666-1-architanant5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: fix potential race in expire_timeout_chkMinu Jin-7/+9
The expire_timeout_chk function currently do lock and unlock inside the loop before calling rtw_free_stainfo(). This can be risky as the list might be changed when the lock is briefly released. To fix this, move expired sta_info entries into a local free_list while holding the lock, and then perform the actual freeing after the lock is released. Signed-off-by: Minu Jin <s9430939@naver.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260131171153.3729458-1-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove dead debugging code in rtw_mlme_ext.cLuka Gejak-9/+0
Remove the unused local variable 'pattrib' and the unreachable 'if (0)' debug block in OnAction_sa_query to clean up the driver code. Signed-off-by: Luka Gejak <lukagejak5@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260130185658.207785-6-lukagejak5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: modernize hex output in rtw_report_sec_ieLuka Gejak-3/+2
Replace the manual hex-printing loop with the standard kernel '%*ph' format string. This simplifies the code and uses modern logging practices. Signed-off-by: Luka Gejak <lukagejak5@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260130185658.207785-5-lukagejak5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: fix spacing around operatorsLuka Gejak-15/+15
Fix coding style issues by adding missing spaces around operators. Signed-off-by: Luka Gejak <lukagejak5@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260130185658.207785-4-lukagejak5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: rename u1bTmp to valLuka Gejak-22/+22
Rename the variable u1bTmp to val to remove Hungarian notation. This improves readability and aligns the code with kernel naming standards. Signed-off-by: Luka Gejak <lukagejak5@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260130185658.207785-3-lukagejak5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove unused private debug countersEthan Tidmore-157/+15
The driver maintains a private `struct debug_priv` embedded within `struct dvobj_priv` to track various error counters (e.g., suspend errors, alloc failures, RX drops). These counters are incremented in various files but the data is never read or exposed to userspace. Remove the unused `debug_priv` structure definition, the instance in `dvobj_priv`, and all associated increment operations across the driver to clean up the code. This also removes the following helper functions which were used solely to update these counters: - rtw_reset_rx_info() - recv_indicatepkts_pkt_loss_cnt() Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260131212128.25548-1-ethantidmore06@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove thread wraper functions and add IS_ERR() checkSamasth Norway Ananda-38/+14
The rtl8723b_start_thread() and rtl8723b_stop_thread() functions are wrappers that are only called from one place each. Remove these wrapper functions and inline the thread handling directly in rtw_start_drv_threads() and rtw_stop_drv_threads(). This also fixes a bug where kthread_run() was not checked for errors using IS_ERR(). kthread_run() returns ERR_PTR(-ENOMEM) on failure, not NULL. Without this check, the SdioXmitThread pointer could contain an error value, causing issues when rtw_stop_drv_threads() later attempts to use it. The inlined code now follows the same pattern as xmitThread and cmdThread in rtw_start_drv_threads(), with proper IS_ERR() checking. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> Link: https://patch.msgid.link/20260130001641.17941-4-samasth.norway.ananda@oracle.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: fix firmware memory leak on errorSamasth Norway Ananda-0/+2
After successfully calling request_firmware(), if the firmware size check fails or if kmemdup() fails, the code jumps to the exit label without calling release_firmware(), causing a memory leak. Call release_firmware() directly in each error path before jumping to cleanup label. Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260130001641.17941-2-samasth.norway.ananda@oracle.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove unnecessary parenthesesSiwanan Bungtong-7/+7
Remove redundant parentheses around 'address of' expressions to comply with kernel coding style. Signed-off-by: Siwanan Bungtong <horstaufmental@gmail.com> Link: https://patch.msgid.link/20260129221719.943285-1-horstaufmental@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove redundant check on statusColin Ian King-7/+0
The check on status can be removed because all previous assignments on status are followed by a goto statement that bypasses the status check. This minor issue was detected with Coverity Scan static analysis. Remove the redundant check and some empty lines. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20260129161058.197372-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: standardize comment style in HALMahad Ibrahim-43/+43
The kernel coding style for comments requires a single space after the "/*". Currently, many files in HAL contain two spaces after the "/*", or use irregular indentation. The modified files also suffer from this. Fix line comment style inconsistencies by removing additional space after "/*" to adhere to kernel coding standards. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Link: https://patch.msgid.link/20260129160426.13737-6-mahad.ibrahim.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: fix line length checkMahad Ibrahim-2/+6
Fix checkpatch.pl check regarding: - Line length of X exceeds 100 columns Redistribute comments to multiple lines to adhere to kernel coding standards. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Link: https://patch.msgid.link/20260129160426.13737-5-mahad.ibrahim.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: fix missing blank line after declarationMahad Ibrahim-0/+1
Fix checkpatch.pl warning regarding: - Missing a blank line after declarations Adhere to kernel coding standards by adding a blank line after variable declaration. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Link: https://patch.msgid.link/20260129160426.13737-4-mahad.ibrahim.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: fix multiple blank line checkMahad Ibrahim-2/+0
Fix checkpatch.pl check regarding: - Please don't use multiple blank lines Remove multiple blank lines to adhere to kernel coding standards. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Link: https://patch.msgid.link/20260129160426.13737-3-mahad.ibrahim.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: fix open parenthesis alignmentMahad Ibrahim-6/+2
Fix checkpatch.pl check regarding: - Lines should not end with a '(' Collapse the multi-line function signature of CheckPositive() into a single line to adhere to kernel coding standards. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Link: https://patch.msgid.link/20260129160426.13737-2-mahad.ibrahim.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: most: video: fix potential race in list iterationMinu Jin-10/+12
There is a pattern in the loops where the lock is dropped to call a specific function and then re-acquired. The list can be exposed during this short gap, creating a potential race condition. This patch fixes the problem by replacing the list head with a local free list using list_replace_init(), instead of using the lock/unlock pattern in the loop. Signed-off-by: Minu Jin <s9430939@naver.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260205021620.1165137-1-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: constify _action_public_str arrayTanjim Kamal-1/+1
This array is never modified. Add a second const to make the array itself be placed in read-only .rodata instead of just the strings it points to. Fix a WARNING issued by scripts/checkpatch.pl. Signed-off-by: Tanjim Kamal <tanjimkamal1@gmail.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260128113900.44852-1-tanjimkamal1@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: remove unnecessary bracesLouis Lesniak-3/+2
Remove braces from single statement if blocks to adhere to the Linux kernel coding style. Signed-off-by: Louis Lesniak <louis.lesniak2@gmail.com> Link: https://patch.msgid.link/20260128154407.42421-1-louis.lesniak2@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: clean up _rtw_pktfile_read()Minu Jin-2/+2
Clean up the function by changing 'uint' to 'unsigned int' to comply with the kernel coding style, as suggested by Andy Shevchenko. Signed-off-by: Minu Jin <s9430939@naver.com> Link: https://patch.msgid.link/20260127153811.1592900-3-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-07staging: rtl8723bs: update _rtw_pktfile_read() to return error codesMinu Jin-23/+50
The function _rtw_pktfile_read() currently returns a uint and clamps the requested read length if it exceeds the remaining data. This behavior makes it impossible to propagate error codes from internal calls like skb_copy_bits() and leads to incomplete data processing. This patch updates the function to: 1. Return -EINVAL if the remaining data is less than the requested length, ensuring callers always get the full amount of data they expect. 2. Propagate the negative error code from skb_copy_bits(). 3. Change the return type from uint to int to support these error codes. To avoid breaking git bisect, this patch also updates all call sites (set_qos, update_attrib, and rtw_xmitframe_coalesce) in the same commit. By doing so, the error-producing function and its error-handling callers remain in sync, preventing runtime failures at this commit point. Signed-off-by: Minu Jin <s9430939@naver.com> Link: https://patch.msgid.link/20260127153811.1592900-2-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-27staging: rtl8723bs: remove unused variable RFE_TypeEthan Tidmore-2/+0
The variable RFE_Type is initialized but never read or used anywhere in the driver. Remove it to clean up dead code and fix a CamelCase warning. Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260127012118.43037-9-ethantidmore06@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-27staging: rtl8723bs: remove unused variable bEn_RFEEthan Tidmore-2/+0
The variable bEn_RFE is initialized but never read or used anywhere in the driver. Remove it to clean up dead code and fix a CamelCase warning. Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260127012118.43037-8-ethantidmore06@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-27staging: rtl8723bs: remove unused variable AmplifierType_2GEthan Tidmore-1/+0
The variable AmplifierType_2G is declared in struct registry_priv but is never initialized or used within the driver. Remove it to clean up the code and fix a CamelCase warning. Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260127012118.43037-7-ethantidmore06@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-27staging: rtl8723bs: remove unused variable TxBBSwing_2GEthan Tidmore-2/+0
The variable TxBBSwing_2G is initialized but never read or used anywhere in the driver. Remove it to clean up dead code and fix a CamelCase warning. Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260127012118.43037-6-ethantidmore06@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-27staging: rtl8723bs: rename RegPwrTblSel to reg_pwr_tbl_selEthan Tidmore-3/+3
Rename RegPwrTblSel to reg_pwr_tbl_sel to avoid CamelCase. Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260127012118.43037-5-ethantidmore06@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>