Philipp Hortmann [Mon, 21 Feb 2022 21:25:16 +0000 (22:25 +0100)]
staging: vt6656: Change macro to function and moved to better file
This patch fixes the checkpatch.pl warning like:
- CHECK: Macro argument reuse 'uVar' - possible side-effects?
Moved the only twice used function to the file where it is used.
Xiaoke Wang [Tue, 22 Feb 2022 02:00:24 +0000 (10:00 +0800)]
staging: wfx: check the return value of devm_kmalloc()
devm_kmalloc() returns a pointer to allocated memory on success, NULL
on failure. While there is a memory allocation of devm_kmalloc()
without proper check. It is better to check the return value of it to
prevent wrong memory access.
And I use the err label which is introduced by the previous patch to
handle the error.
Michael Straube [Sun, 20 Feb 2022 10:02:11 +0000 (11:02 +0100)]
staging: r8188eu: convert type of pBandWidth in odm_dm_struct
The variable pBandWidth in odm_dm_struct stores constants from enum
ht_channel_width. Change the type of pBandWidth from u8 pointer to
enum ht_channel_width pointer to get rid of a type cast in function
Update_ODM_ComInfo_88E().
Michael Straube [Sun, 20 Feb 2022 10:02:09 +0000 (11:02 +0100)]
staging: r8188eu: convert two u8 variables to bool
The variables bScanInProcess in struct mlme_priv and bpower_saving in
struct pwrctrl_priv are both unsed to store only boolean values true
and false. Convert them from u8 to bool to avoid type casts in the
function Update_ODM_ComInfo_88E().
Xiaoke Wang [Fri, 18 Feb 2022 13:59:45 +0000 (21:59 +0800)]
staging: wfx: fix an error handling in wfx_init_common()
One error handler of wfx_init_common() return without calling
ieee80211_free_hw(hw), which may result in memory leak. And I add
one err label to unify the error handler, which is useful for the
subsequent changes.
Riccardo Ferrazzo [Fri, 18 Feb 2022 10:53:58 +0000 (11:53 +0100)]
staging: wfx: fix scan with WFM200 and WW regulation
Some variants of the WF200 disallow active scan on channel 12 and 13.
For these parts, the channels 12 and 13 are marked IEEE80211_CHAN_NO_IR.
However, the beacon hint procedure was removing the flag
IEEE80211_CHAN_NO_IR from channels where a BSS is discovered. This was
making subsequent scans to fail because the driver was trying active
scans on prohibited channels.
Phillip Potter [Wed, 16 Feb 2022 01:07:09 +0000 (01:07 +0000)]
staging: r8188eu: correct long line warnings near prior DBG_88E calls
Where it is possible (without out-of-patch-series-scope large scale
refactoring), correct code to remove checkpatch warnings about lines
that are too long, also correcting operator spacing where appropriate
for these lines as well. These warnings occur mostly due to so many
DBG_88E removals and parentheses tweaks etc. being adjacent to such
long lines, which are therefore included in the resultant diff.
Phillip Potter [Wed, 16 Feb 2022 01:07:08 +0000 (01:07 +0000)]
staging: r8188eu: remove padapter param from aes_decipher function
Remove padapter parameter from aes_decipher function in
core/rtw_security.c, as I added it previously during debugging tweaks
and it is no longer required.
Phillip Potter [Wed, 16 Feb 2022 01:07:06 +0000 (01:07 +0000)]
staging: r8188eu: fix lines modified by DBG_88E cleanup
A number of style problems were left behind by the DBG_88E cleanup:
(1) Empty if/else blocks.
(2) Parenthesised if/while statements containing only one line.
(3) Entire blocks which server zero purpose after removal of DBG_88E.
(4) Various warnings about whitespace, and constant comparison order.
(5) Use of __constant_htons instead when htons should be used.
Fix up these issues across the driver in any file touched by the
previous cleanup. Long line warnings will be addresses in a later
patch.
Remove rtw_debug module parameter, and also the internal GlobalDebugLevel
flag and all places where it is referenced. As hal/odm_debug.c is now
essentially empty, also remove this file and edit the Makefile to no
longer reference it. The DBG_88E macro was the last user of these and
has now been removed, making the parameter and flag redundant.
Phillip Potter [Wed, 16 Feb 2022 01:07:04 +0000 (01:07 +0000)]
staging: r8188eu: remove DBG_88E macro definition
Remove DBG_88E macro definition as it has no remaining callers within
the driver. This is part of the ongoing effort to cleanup the driver to
use standard debug mechanisms where appropriate.
Phillip Potter [Wed, 16 Feb 2022 01:07:03 +0000 (01:07 +0000)]
staging: r8188eu: remove all aliased DBG_88E calls
Remove all remaining calls to preprocessor aliases of DBG_88E, as well
as these definitions themselves. This is a prerequisite for removing
the DBG_88E macro itself.
Phillip Potter [Wed, 16 Feb 2022 01:07:02 +0000 (01:07 +0000)]
staging: r8188eu: remove remaining DBG_88E call from include/usb_ops.h
Remove the one remaining DBG_88E call from include/usb_ops.h. After
some thought, it makes more sense to just entirely strip all of these
calls, so that debugging code in the driver can be more consistent and
useful going forwards.
Phillip Potter [Wed, 16 Feb 2022 01:07:01 +0000 (01:07 +0000)]
staging: r8188eu: remove remaining DBG_88E calls from os_dep subdir
Remove all remaining DBG_88E calls from the os_dep subdirectory. After
some thought, it makes more sense to just entirely strip all of these
calls, so that debugging code in the driver can be more consistent and
useful going forwards.
Phillip Potter [Wed, 16 Feb 2022 01:07:00 +0000 (01:07 +0000)]
staging: r8188eu: remove DBG_88E calls from os_dep/ioctl_linux.c
Remove all remaining DBG_88E calls from os_dep/ioctl_linux.c, patching
separately from the rest of the os_dep subdirectory for ease of review
due to the sheer number of calls. After some thought, it makes more
sense to just entirely strip all of these calls, so that debugging
code in the driver can be more consistent and useful going forwards.
Phillip Potter [Wed, 16 Feb 2022 01:06:59 +0000 (01:06 +0000)]
staging: r8188eu: remove DBG_88E calls from hal subdir
Remove all remaining DBG_88E calls from the hal subdirectory. After some
thought, it makes more sense to just entirely strip all of these calls,
so that debugging code in the driver can be more consistent and useful
going forwards.
Phillip Potter [Wed, 16 Feb 2022 01:06:58 +0000 (01:06 +0000)]
staging: r8188eu: remove DBG_88E calls from core subdir
Remove all remaining DBG_88E calls from the core subdirectory. After some
thought, it makes more sense to just entirely strip all of these calls,
so that debugging code in the driver can be more consistent and useful
going forwards.
Phillip Potter [Wed, 16 Feb 2022 01:06:57 +0000 (01:06 +0000)]
staging: r8188eu: remove converted DBG_88E calls from core/rtw_mlme_ext.c
Remove all the netdev_dbg/pr_debug calls that were previously converted
from DBG_88E inside core/rtw_mlme_ext.c. Due to the sheer number of
lines, this patch is separated out for ease of review. After some thought,
it makes more sense to just entirely strip all of these calls, so that
debugging code in the driver can be more consistent and useful going
forwards.
Phillip Potter [Wed, 16 Feb 2022 01:06:56 +0000 (01:06 +0000)]
staging: r8188eu: remove smaller sets of converted DBG_88E calls
Remove all the smaller sets of dev_dbg/netdev_dbg/pr_debug calls that
were previously converted from DBG_88E. After some thought, it makes
more sense to just entirely strip all of these calls, so that debugging
code in the driver can be more consistent and useful going forwards.
Remove all netdev_dbg and dev_dbg calls that were previously converted
from DBG_88E_LEVEL. After some thought, it makes more sense to just
entirely strip all of these calls, so that debugging code in the driver
can be more consistent and useful going forwards.
Jérôme Pouiller [Thu, 17 Feb 2022 10:32:48 +0000 (11:32 +0100)]
staging: wfx: fix DT bindings location
Currently, the DT bindings the wfx driver cannot be processed by make
dt_binding_check. We need to place it somewhere into
Documentation/devicetree/bindings/.
After that change, we are able to get warnings from dt_binding_check and
fix them.
Jérôme Pouiller [Wed, 16 Feb 2022 09:31:12 +0000 (10:31 +0100)]
staging: wfx: apply the necessary SDIO quirks for the Silabs WF200
Until now, the SDIO quirks are applied directly from the driver.
However, it is better to apply the quirks before driver probing. So,
this patch relocate the quirks in the MMC framework.
Note that the WF200 has no valid SDIO VID/PID. Therefore, we match DT
rather than on the SDIO VID/PID.
Jérôme Pouiller [Wed, 16 Feb 2022 09:31:11 +0000 (10:31 +0100)]
staging: wfx: WF200 has no official SDIO IDs
Some may think that SDIO_VENDOR_ID_SILABS / SDIO_DEVICE_ID_SILABS_WF200
are official SDIO IDs. However, it is not the case, the values used by
WF200 are not official (BTW, the driver rely on the DT rather than on
the SDIO IDs to probe the device).
To avoid any confusion, remove the definitions SDIO_*_ID_SILABS* and use
raw values.
Michael Straube [Wed, 16 Feb 2022 19:40:37 +0000 (20:40 +0100)]
staging: r8188eu: bCCKinCH14 is read-only
The variable bCCKinCH14 in struct odm_rf_cal is never set. It stays
at its default value 0. Remove bCCKinCH14 from struct odm_rf_cal and
remove related dead code.
Arınç ÜNAL [Tue, 15 Feb 2022 08:17:25 +0000 (11:17 +0300)]
staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the
rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node without rgmii2_pins on
the GB-PC1 devicetree.
Martin Kaiser [Sat, 12 Feb 2022 16:17:37 +0000 (17:17 +0100)]
staging: r8188eu: we only need one struct bb_reg_def for path a
The r8188eu driver does no longer access rf path b registers via
PHYRegDef.
Change the PHYRegDef array in struct hal_data_8188e to a single
variable that holds the register addresses for rf path a. Remove
the initialisation of path b register addresses.
Martin Kaiser [Sat, 12 Feb 2022 16:17:34 +0000 (17:17 +0100)]
staging: r8188eu: limit rtw_dbg_port to path a
Rf registers can be read by rtw_wx_read_rf or via the private ioctl 0x0B.
The latter calls rtw_dbg_port. Limit rf register reads to path a in
rtw_debug_port.
Martin Kaiser [Sat, 12 Feb 2022 16:17:33 +0000 (17:17 +0100)]
staging: r8188eu: limit rtw_wx_read_rf to path a
Commit 3b011b097c38 ("staging: r8188eu: limit rf register writes to
path a") limits rf register writes by private ioctls to RF_PATH_A.
Apart from private ioctls, the rest of the driver uses only path a.
This patch limits rf register reads by the private ioctl 0x0D, which
calls rtw_wx_read_rf, to path a.
Martin Kaiser [Sat, 12 Feb 2022 16:17:32 +0000 (17:17 +0100)]
staging: r8188eu: clarify that bb_reg_dump uses only path a
The path variable is always 0 in bb_reg_dump. Remove the path variable
and replace the constant 0 with RF_PATH_A to make it clearer that path
a is used.
Martin Kaiser [Sat, 12 Feb 2022 16:17:29 +0000 (17:17 +0100)]
staging: r8188eu: write only path a registers in rtw_dbg_port
Commit 3b011b097c38 ("staging: r8188eu: limit rf register writes to
path a") limited the rtw_wx_write_rf function to write only rf registers
for path a.
The private ioctl 0x0B invokes the rtw_dbg_port function. This ioctl
can also be used for writing rf registers. We should limit these register
writes to rf path a as well.
Martin Kaiser [Sat, 12 Feb 2022 16:17:28 +0000 (17:17 +0100)]
staging: r8188eu: set path a explicitly
We've already limited the rtw_wx_write_rf function to RF_PATH_A in commit 3b011b097c38 ("staging: r8188eu: limit rf register writes to path a").
Set RF_PATH_A explicitly when we call rtl8188e_PHY_SetRFReg. This will
make it easier later to verify that all callers of rtl8188e_PHY_SetRFReg
use path a.
Martin Kaiser [Wed, 9 Feb 2022 19:28:42 +0000 (20:28 +0100)]
staging: r8188eu: remove ishighspeed from dvobj_priv
There's no need to store the usb device speed in struct dvobj_priv.
We can read the speed from struct usb_device. dvobj_priv has a pointer
to the usb_device.
Reorder one if-statement to make the code clearer.
Sergio Paracuellos [Thu, 10 Feb 2022 09:48:59 +0000 (10:48 +0100)]
clk: ralink: make system controller node a reset provider
MT7621 system controller node is already providing the clocks for the whole
system but must also serve as a reset provider. Hence, add reset controller
related code to the clock driver itself. To get resets properly ready for
the rest of the world we need to move platform driver initialization process
to 'arch_initcall'.
CC: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20220210094859.927868-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Fri, 11 Feb 2022 16:26:58 +0000 (17:26 +0100)]
staging: wfx: allow new PDS format
The device needs data about the antenna configuration. This information
in provided by PDS (Platform Data Set, this is the wording used in WF200
documentation) files.
Until now, the driver had to parse the PDS file before to send it. This
solution was not acceptable for the vanilla kernel. We have slightly
changed the PDS format so it is now an array of Type-Length-Value.
This patch allows to support new format and keep compatibility with
legacy format.
Linus Torvalds [Sun, 13 Feb 2022 19:58:11 +0000 (11:58 -0800)]
Merge tag 'kbuild-fixes-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada:
- Fix the truncated path issue for HAVE_GCC_PLUGINS test in Kconfig
- Move -Wunsligned-access to W=1 builds to avoid sprinkling warnings
for the latest Clang
- Fix missing fclose() in Kconfig
- Fix Kconfig to touch dep headers correctly when KCONFIG_AUTOCONFIG is
overridden.
* tag 'kbuild-fixes-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: fix failing to generate auto.conf
kconfig: fix missing fclose() on error paths
Makefile.extrawarn: Move -Wunaligned-access to W=1
kconfig: let 'shell' return enough output for deep path names
Linus Torvalds [Sun, 13 Feb 2022 18:06:40 +0000 (10:06 -0800)]
Merge tag 'irq-urgent-2022-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
"Interrupt chip driver fixes:
- Don't install an hotplug notifier for GICV3-ITS on systems which do
not need it to prevent a warning in the notifier about inconsistent
state
- Add the missing device tree matching for the T-HEAD PLIC variant so
the related SoC is properly supported"
* tag 'irq-urgent-2022-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/sifive-plic: Add missing thead,c900-plic match string
dt-bindings: update riscv plic compatible string
irqchip/gic-v3-its: Skip HP notifier when no ITS is registered
Linus Torvalds [Sun, 13 Feb 2022 17:43:34 +0000 (09:43 -0800)]
Merge tag 'objtool_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull objtool fix from Borislav Petkov:
"Fix a case where objtool would mistakenly warn about instructions
being unreachable"
* tag 'objtool_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/bug: Merge annotate_reachable() into _BUG_FLAGS() asm
Linus Torvalds [Sun, 13 Feb 2022 17:22:52 +0000 (09:22 -0800)]
Merge tag 'x86_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Borislav Petkov:
"Prevent softlockups when tearing down large SGX enclaves"
* tag 'x86_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/sgx: Silence softlockup detection when releasing large enclaves
Linus Torvalds [Sun, 13 Feb 2022 17:16:45 +0000 (09:16 -0800)]
Merge tag '5.17-rc4-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French:
"Three small smb3 reconnect fixes and an error log clarification"
* tag '5.17-rc4-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: mark sessions for reconnection in helper function
cifs: call helper functions for marking channels for reconnect
cifs: call cifs_reconnect when a connection is marked
[smb3] improve error message when mount options conflict with posix
Linus Torvalds [Sat, 12 Feb 2022 18:29:02 +0000 (10:29 -0800)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"Two minor fixes in the lpfc driver. One changing the classification of
trace messages and the other fixing a build issue when NVME_FC is
disabled"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: lpfc: Reduce log messages seen after firmware download
scsi: lpfc: Remove NVMe support if kernel has NVME_FC disabled