aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2021-09-13staging: r8188eu: remove commented constants from wifi.hMichael Straube1-50/+0
Remove commented constants from wifi.h. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829180717.15393-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove unused constants from wifi.hMichael Straube1-2/+0
The constants WLAN_REASON_PWR_CAPABILITY_NOT_VALID and WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID defined in wifi.h are unused, remove them. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829180717.15393-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: refactor field of struct odm_rf_calMichael Straube2-8/+7
Refactor the field IQKMatrixRegSetting of struct odm_rf_cal to be not an array. The driver is for chips that operate in the 2.4 GHz band only. So only the first element of the array is used and there is no need for an array. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829175624.5915-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove local variable IndexforchannelMichael Straube1-5/+4
The local variable Indexforchannel in function odm_TXPowerTrackingCallback_ThermalMeter_8188E() is initilaized to 0 and never changed. Remove the variable and replace its usage with 0. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829175624.5915-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove unnecessary type castsMichael Straube1-3/+3
The field rx_data of struct recv_frame and the local variable pframe both have type (u8 *). Remove unnecessary type casts to (unsigned char *). Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829112555.8726-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: convert type of second parameter of rtw_*_decrypt()Michael Straube3-18/+19
Convert the type of the second parameter of the rtw_*_decrypt() functions to struct recv_frame. All callers of the functions cast the type to (u8 *) and in the functions it is casted back to the original type. Changing the type of the second parameter to struct recv_frame avoids these unnecessary casts and improves readability. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829112555.8726-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: convert type of second parameter of rtw_*_encrypt()Michael Straube4-27/+23
Convert the type of the second parameter of the rtw_*_encrypt() functions to struct xmit_frame. All callers of the functions cast the type to (u8 *) and in the functions it is casted back to the original type. Changing the type of the second parameter to struct xmit_frame avoids these unnecessary casts and improves readability. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829112555.8726-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove should_forbid_n_rate()Michael Straube2-37/+0
Function should_forbid_n_rate() is unused, remove it. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove is_ap_in_wep()Michael Straube2-31/+0
Function is_ap_in_wep() is unused, remove it. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove CAM_empty_entry()Michael Straube2-6/+0
Function CAM_empty_entry() is unused, remove it. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove get_bsstype()Michael Straube2-11/+0
Function get_bsstype() is unused, remove it. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove rtw_get_oper_choffset()Michael Straube2-6/+0
Function rtw_get_oper_choffset() is unused, remove it. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove rtw_get_oper_bw()Michael Straube2-6/+0
Function rtw_get_oper_bw() is unused, remove it. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove rtl8188e_PHY_ConfigRFWithParaFile()Michael Straube2-24/+0
Function rtl8188e_PHY_ConfigRFWithParaFile() is unused, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210828170834.31388-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove rtl8188e_PHY_ConfigRFWithHeaderFile()Michael Straube1-2/+0
Function rtl8188e_PHY_ConfigRFWithHeaderFile() is not implemented, remove the declaration from Hal8188EPhyCfg.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210828170834.31388-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: core: remove condition with no effectSaurav Girepunje1-9/+0
Remove the condition with no effect (if == else) and group multiple cases which execute same statement in rtw_mlme_ext.c Reviewed-by: Pavel Skripkin <paskripkin@gmail.com> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YStM2wxtkDAnRemt@user Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: core: remove unused functionSaurav Girepunje2-19/+0
Remove unused function proc_get_adapter_state() from rtw_debug.c file. Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YSpP0+aHdq3Roleo@user Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8118eu: remove useless parts of judgements from os_dep/ioctl_linux.xu xin1-6/+5
Remove the check of the pointer 'pregpriv' that is impossible to be NULL. There is no need to check if pregpriv is NULL. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: xu xin <xu.xin16@zte.com.cn> Thanks-to: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210830012811.3384-1-xu.xin16@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: os_dep: remove unused static variableSaurav Girepunje1-2/+0
Remove unused static variable rtw_enusbss from os_intfs.c file. Acked-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YSoz5Qip12K899SN@user Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: rtl8723bs: clean up comparsions to NULLMichael Straube9-117/+117
Clean up comparsions to NULL reported by checkpatch. x == NULL -> !x x != NULL -> x Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829154533.11054-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: rtl8723bs: remove unused _rtw_init_queue() functionFabio Aiuto1-7/+0
remove _rtw_init_queue() left unused by previous commit in this series. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/3c03fcfbe799195c84608b05fc54efe921bef4de.1630307025.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: rtl8723bs: remove unnecessary parenthesesFabio Aiuto1-2/+2
Fix the following post commit hook checkpatch issues: CHECK: Unnecessary parentheses around pcmdpriv->cmd_queue 103: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:169: + INIT_LIST_HEAD(&(pcmdpriv->cmd_queue).queue); CHECK: Unnecessary parentheses around pcmdpriv->cmd_queue 104: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:170: + spin_lock_init(&(pcmdpriv->cmd_queue).lock); Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/de4fcdb3ff45671333713b27f1dcf376b22f3978.1630307025.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: rtl8723bs: unwrap initialization of queuesFabio Aiuto7-26/+52
unwrap initialization of queues to avoid false positive lockdep warning: [ 27.350258] ============================================ [ 27.350267] WARNING: possible recursive locking detected [ 27.350276] 5.14.0-rc6+ #16 Tainted: G C OE [ 27.350288] -------------------------------------------- [ 27.350295] RTW_CMD_THREAD/679 is trying to acquire lock: [ 27.350306] ffffa846c03290c8 (&(pqueue->lock)){+.-.}-{2:2}, at: rtw_alloc_network+0x1b/0xa0 [r8723bs] [ 27.350441] but task is already holding lock: [ 27.350448] ffffa846c0329118 (&(pqueue->lock)){+.-.}-{2:2}, at: rtw_update_scanned_network+0x33/0x1d0 [r8723bs] [ 27.350573] other info that might help us debug this: [ 27.350581] Possible unsafe locking scenario: [ 27.350588] CPU0 [ 27.350594] ---- [ 27.350600] lock(&(pqueue->lock)); [ 27.350614] lock(&(pqueue->lock)); [ 27.350627] *** DEADLOCK *** [ 27.350634] May be due to missing lock nesting notation [ 27.350641] 2 locks held by RTW_CMD_THREAD/679: [ 27.350652] #0: ffffa846c0329038 (&pmlmepriv->lock){+...}-{2:2}, at: rtw_survey_event_callback+0x2d/0xe0 [r8723bs] [ 27.350780] #1: ffffa846c0329118 (&(pqueue->lock)){+.-.}-{2:2}, at: rtw_update_scanned_network+0x33/0x1d0 [r8723bs] [ 27.350907] stack backtrace: [ 27.350916] CPU: 3 PID: 679 Comm: RTW_CMD_THREAD Tainted: G C OE 5.14.0-rc6+ #16 [ 27.350933] Hardware name: LENOVO 80NR/Madrid, BIOS DACN25WW 08/20/2015 [ 27.350943] Call Trace: [ 27.350959] dump_stack_lvl+0x56/0x6f [ 27.350982] __lock_acquire.cold.79+0x137/0x298 [ 27.351012] lock_acquire+0xb4/0x2c0 [ 27.351031] ? rtw_alloc_network+0x1b/0xa0 [r8723bs] [ 27.351140] ? rtw_update_scanned_network+0x33/0x1d0 [r8723bs] [ 27.351254] _raw_spin_lock_bh+0x34/0x40 [ 27.351271] ? rtw_alloc_network+0x1b/0xa0 [r8723bs] [ 27.351378] rtw_alloc_network+0x1b/0xa0 [r8723bs] [ 27.351488] rtw_update_scanned_network+0xa5/0x1d0 [r8723bs] [ 27.351605] rtw_survey_event_callback+0x54/0xe0 [r8723bs] [ 27.351719] mlme_evt_hdl+0x4e/0x70 [r8723bs] [ 27.351839] rtw_cmd_thread+0x16c/0x3d0 [r8723bs] [ 27.351945] ? rtw_stop_cmd_thread+0x50/0x50 [r8723bs] [ 27.352045] kthread+0x136/0x160 [ 27.352064] ? set_kthread_struct+0x40/0x40 [ 27.352083] ret_from_fork+0x22/0x30 This happens because the wrapping function _rtw_init_queues() bring lockdep considering all queues as a single one. But all queues are different with their own lock. Applied the following semantic patch: @@ expression a; @@ - _rtw_init_queue(&a); + INIT_LIST_HEAD(&a.queue); + spin_lock_init(&a.lock); Reported-by: Hans De Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/c2c3a18cc2b883feab74f150ccbaa4f2cc11995c.1630307025.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: wlan-ng: Remove filenames from filesAldas Taraškevičius18-18/+18
Fix checkpatch warnings about having filenames in the files. Signed-off-by: Aldas Taraškevičius <aldas60@gmail.com> Link: https://lore.kernel.org/r/20210828195324.68-1-aldas60@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: pi433: fix docs typos and references to previous struct namesPaulo Miguel Almeida1-12/+11
In the comments there where some grammar mistakes and references to struct names that have gotten renamed over time but not updated in the comments. Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Link: https://lore.kernel.org/r/20210828105633.GA8421@localhost.localdomain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove rtw_hal_c2h_handler functionPhillip Potter3-9/+0
Remove rtw_hal_c2h_handler function from hal/hal_intf.c, as well as its declaration in include/hal_intf.h, and remove its one remaining caller within core/rtw_cmd.c. This function was a wrapper function, then simplified to always return _FAIL. Since it has no further use, remove it, as part of ongoing efforts to simplify and remove the HAL layer of the driver. Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210829234541.946-4-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: simplify c2h_evt_hdl functionPhillip Potter1-20/+3
Simplify c2h_evt_hdl function by removing majority of its code. The function always returned _FAIL anyway, due to the wrapper function it calls always returning _FAIL, and its one caller doesn't use the return value, so this function should just have a return type of void. Leave the call to c2h_evt_read in place, as without it, event handling semantics of the driver would be changed, despite nothing actually being done with the event. Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210829234541.946-3-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove c2h_handler field from struct hal_opsPhillip Potter2-7/+1
Remove c2h_handler function pointer field from struct hal_ops in include/hal_intf.h, as it is never set in this driver, and remove the check for a non-NULL value in the rtw_hal_c2h_handler wrapper function in hal/hal_intf.c as well. As the function always returns _FAIL anyway, just modify it to do this unconditionally. The motivation for removing this field is that it is more code from the unwanted HAL layer that can be stripped out. Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210829234541.946-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: core: remove null check before vfreeSaurav Girepunje1-3/+2
Remove NULL check. NULL check before freeing function is not needed. Correct the indentation. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YSu9GQa1A3s6FYQx@user Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13spi: amd: Don't wait for a write-only transfer to finishLucas Tanure1-2/+10
Return from a write-only transfer without waiting for it to finish But wait before a new transfer as the previous may still happening and also wait before reading the data from the FIFO Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210910111529.12539-4-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13spi: amd: Remove unneeded variableLucas Tanure1-6/+3
Remove internal cs from amd_spi Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210910111529.12539-3-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13spi: amd: Refactor amd_spi_busy_waitLucas Tanure1-8/+2
Use amd_spi_readreg32 to read 32 bits registers Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210910111529.12539-2-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13spi: amd: Refactor code to use less spi_master_get_devdataLucas Tanure1-60/+34
Get master data in the start and then just use struct amd_spi as it has the needed variable Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210910111529.12539-1-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13SPI: add Ingenic JZ47xx driver.Artur Rojek3-0/+492
Add a driver to support the SPI controller found in Ingenic SoCs. Co-developed-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Link: https://lore.kernel.org/r/20210830230139.21476-3-contact@artur-rojek.eu Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13regulator: core: resolve supply voltage deferral silentlyBrian Norris1-3/+4
Voltage-controlled regulators depend on their supply regulator for retrieving their voltage, and so they might return -EPROBE_DEFER at this stage. Our caller already attempts to resolve supplies and retry, so we shouldn't be printing this error to logs. Quiets log messages like this, on Rockchip RK3399 Gru/Kevin boards: [ 1.033057] ppvar_bigcpu: failed to get the current voltage: -EPROBE_DEFER ... [ 1.036735] ppvar_litcpu: failed to get the current voltage: -EPROBE_DEFER ... [ 1.040366] ppvar_gpu: failed to get the current voltage: -EPROBE_DEFER ... [ 1.044086] ppvar_centerlogic: failed to get the current voltage: -EPROBE_DEFER Cc: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20210826124015.1.Iab79c6dd374ec48beac44be2fcddd165dd26476b@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13regulator: vqmmc-ipq4019: Make use of the helper function devm_platform_ioremap_resource()Cai Huoqing1-3/+1
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210908105752.2035-1-caihuoqing@baidu.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13regulator: ti-abb: Kconfig: Add helper dependency on COMPILE_TESTCai Huoqing1-1/+1
COMPILE_TEST is helpful to find compilation errors in other platform(e.g.X86). In this case, the support of COMPILE_TEST is added, so this module could be compiled in other platform(e.g.X86), without ARCH_SYNQUACER configuration. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210908105738.1933-1-caihuoqing@baidu.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13regulator: ti-abb: Make use of the helper function devm_ioremap relatedCai Huoqing1-25/+6
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap/devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210908105745.1984-1-caihuoqing@baidu.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13spi: tegra20-slink: Declare runtime suspend and resume functions conditionallyGuenter Roeck1-3/+2
The following build error is seen with CONFIG_PM=n. drivers/spi/spi-tegra20-slink.c:1188:12: error: 'tegra_slink_runtime_suspend' defined but not used drivers/spi/spi-tegra20-slink.c:1200:12: error: 'tegra_slink_runtime_resume' defined but not used Declare the functions only if PM is enabled. While at it, remove the unnecessary forward declarations. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20210907045358.2138282-1-linux@roeck-us.net Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-12hwmon: (k10temp) Remove residues of current and voltagesuma hegde1-6/+0
Commit id "b00647c46c9d7f6ee1ff6aaf335906101755e614", adds reporting current and voltage to k10temp.c The commit id "0a4e668b5d52eed8026f5d717196b02b55fb2dc6", removed reporting current and voltage from k10temp.c The curr and in(voltage) entries are not removed from "k10temp_info" structure. Removing those residue entries. while at it, update k10temp driver documentation Signed-off-by: suma hegde <suma.hegde@amd.com> Cc: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210902174155.7365-2-nchatrad@amd.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-09-13Merge existing fixes from spi/for-5.15Mark Brown2-3/+8
2021-09-13Merge existing fixes from regulator/for-5.15Mark Brown1-1/+1
2021-09-12Merge tag 'auxdisplay-for-linus-v5.15-rc1' of git://github.com/ojeda/linuxLinus Torvalds4-20/+6
Pull auxdisplay updates from Miguel Ojeda: "An assortment of improvements for auxdisplay: - Replace symbolic permissions with octal permissions (Jinchao Wang) - ks0108: Switch to use module_parport_driver() (Andy Shevchenko) - charlcd: Drop unneeded initializers and switch to C99 style (Andy Shevchenko) - hd44780: Fix oops on module unloading (Lars Poeschel) - Add I2C gpio expander example (Ralf Schlatterbeck)" * tag 'auxdisplay-for-linus-v5.15-rc1' of git://github.com/ojeda/linux: auxdisplay: Replace symbolic permissions with octal permissions auxdisplay: ks0108: Switch to use module_parport_driver() auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style auxdisplay: hd44780: Fix oops on module unloading auxdisplay: Add I2C gpio expander example
2021-09-12Merge tag 'char-misc-5.15-rc1-lkdtm' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-miscLinus Torvalds2-11/+27
Pull misc driver fix from Greg KH: "Here is a single patch for 5.15-rc1, for the lkdtm misc driver. It resolves a build issue that many people were hitting with your current tree, and Kees and others felt would be good to get merged before -rc1 comes out, to prevent them from having to constantly hit it as many development trees restart on -rc1, not older -rc releases. It has NOT been in linux-next, but has passed 0-day testing and looks 'obviously correct' when reviewing it locally :)" * tag 'char-misc-5.15-rc1-lkdtm' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: lkdtm: Use init_uts_ns.name instead of macros
2021-09-12Merge tag 'for-linus-5.15-1' of git://github.com/cminyard/linux-ipmiLinus Torvalds1-12/+11
Pull IPMI updates from Corey Minyard: "A couple of very minor fixes for style and rate limiting. Nothing big, but probably needs to go in" * tag 'for-linus-5.15-1' of git://github.com/cminyard/linux-ipmi: char: ipmi: use DEVICE_ATTR helper macro ipmi: rate limit ipmi smi_event failure message
2021-09-12drm/panel-orientation-quirks: add Valve Steam DeckSimon Ser1-0/+7
Valve's Steam Deck has a 800x1280 LCD screen. Signed-off-by: Simon Ser <contact@emersion.fr> Cc: Jared Baldridge <jrb@expunge.us> Cc: Emil Velikov <emil.l.velikov@gmail.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210911102430.253986-1-contact@emersion.fr
2021-09-12drm: panel-orientation-quirks: Add quirk for the Chuwi HiBookHans de Goede1-0/+8
The Chuwi HiBook uses a panel which has been mounted 90 degrees rotated. Add a quirk for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210905130501.32980-1-hdegoede@redhat.com
2021-09-12net: mana: Prefer struct_size over open coded arithmeticLen Baker1-3/+1
As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrapping around and a smaller allocation being made than the caller was expecting. Using those allocations could lead to linear overflows of heap memory and other misbehaviors. So, use the struct_size() helper to do the arithmetic instead of the argument "size + count * size" in the kzalloc() function. [1] https://www.kernel.org/doc/html/v5.14/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Signed-off-by: Len Baker <len.baker@gmx.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-12net: dsa: qca8k: fix kernel panic with legacy mdio mappingAnsuel Smith1-8/+22
When the mdio legacy mapping is used the mii_bus priv registered by DSA refer to the dsa switch struct instead of the qca8k_priv struct and causes a kernel panic. Create dedicated function when the internal dedicated mdio driver is used to properly handle the 2 different implementation. Fixes: 759bafb8a322 ("net: dsa: qca8k: add support for internal phy and internal mdio") Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-11Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds24-283/+3343
Pull virtio updates from Michael Tsirkin: - vduse driver ("vDPA Device in Userspace") supporting emulated virtio block devices - virtio-vsock support for end of record with SEQPACKET - vdpa: mac and mq support for ifcvf and mlx5 - vdpa: management netlink for ifcvf - virtio-i2c, gpio dt bindings - misc fixes and cleanups * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (39 commits) Documentation: Add documentation for VDUSE vduse: Introduce VDUSE - vDPA Device in Userspace vduse: Implement an MMU-based software IOTLB vdpa: Support transferring virtual addressing during DMA mapping vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap() vdpa: Add an opaque pointer for vdpa_config_ops.dma_map() vhost-iotlb: Add an opaque pointer for vhost IOTLB vhost-vdpa: Handle the failure of vdpa_reset() vdpa: Add reset callback in vdpa_config_ops vdpa: Fix some coding style issues file: Export receive_fd() to modules eventfd: Export eventfd_wake_count to modules iova: Export alloc_iova_fast() and free_iova_fast() virtio-blk: remove unneeded "likely" statements virtio-balloon: Use virtio_find_vqs() helper vdpa: Make use of PFN_PHYS/PFN_UP/PFN_DOWN helper macro vsock_test: update message bounds test for MSG_EOR af_vsock: rename variables in receive loop virtio/vsock: support MSG_EOR bit processing vhost/vsock: support MSG_EOR bit processing ...