[PATCH v2 4/4] staging: rtl8188eu: remove unused function parameters

2021-04-19 Thread Martin Kaiser
The Enable and Linked parameters of _BeaconFunctionEnable are not used. Remove them. Signed-off-by: Martin Kaiser --- v2: - no change, re-sending the entire series drivers/staging/rtl8188eu/hal/usb_halinit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH v2 3/4] staging: rtl8188eu: cmdThread is a task_struct

2021-04-19 Thread Martin Kaiser
cmdThread is the return value of kthread_run, i.e. a struct task_struct. Signed-off-by: Martin Kaiser --- v2: - no change, re-sending the entire series drivers/staging/rtl8188eu/include/drv_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu

[PATCH v2 2/4] staging: rtl8188eu: remove constant variable and dead code

2021-04-19 Thread Martin Kaiser
g_wifi_on is always true. Remove the variable and the code that would be run only if g_wifi_on was false. While at it, remove a pointlesss comment that starts with /** and is misinterpreted as a kernel-doc comment. Signed-off-by: Martin Kaiser Reported-by: kernel test robot --- v2: - fix

[PATCH v2 1/4] staging: rtl8188eu: change bLeisurePs' type to bool

2021-04-19 Thread Martin Kaiser
bLeisurePs is used as a boolean variable. Change its type from u8 to bool. Signed-off-by: Martin Kaiser --- v2: - no change, re-sending the entire series drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH 1/4] staging: rtl8188eu: change bLeisurePs' type to bool

2021-04-17 Thread Martin Kaiser
bLeisurePs is used as a boolean variable. Change its type from u8 to bool. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h b/drivers/staging

[PATCH 3/4] staging: rtl8188eu: cmdThread is a task_struct

2021-04-17 Thread Martin Kaiser
cmdThread is the return value of kthread_run, i.e. a struct task_struct. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/include/drv_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/include/drv_types.h b/drivers/staging/rtl8188eu

[PATCH 4/4] staging: rtl8188eu: remove unused function parameters

2021-04-17 Thread Martin Kaiser
The Enable and Linked parameters of _BeaconFunctionEnable are not used. Remove them. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers

[PATCH 2/4] staging: rtl8188eu: remove constant variable and dead code

2021-04-17 Thread Martin Kaiser
g_wifi_on is always true. Remove the variable and the code that would be run only if g_wifi_on was false. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/rtw_android.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/staging/rtl8188eu

[PATCH 11/12] staging: rtl8188eu: remove a dead assignment

2021-04-08 Thread Martin Kaiser
There's no need to set cmd_hdl to NULL after it's used. It will be set again before the next command is processed. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers

[PATCH 12/12] staging: rtl8188eu: simplify rtw_cmd_thread's main loop

2021-04-08 Thread Martin Kaiser
is check if there's a command in the queue. If yes, we process it. If not, we wait until someone enqueues a command. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging

[PATCH 10/12] staging: rtl8188eu: remove duplicate if statement

2021-04-08 Thread Martin Kaiser
There's two identical checks if the device was stopped or unplugged. Remove one of them. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core

[PATCH 09/12] staging: rtl8188eu: always free cmd_obj in the cmd thread

2021-04-08 Thread Martin Kaiser
be freed. At the moment, if there's a post-processing function for the current command, this function has to free the cmd_obj. If there's no post-processing function, the command thread frees cmd_obj. It's much simpler if we always leave it to the command thread to free cmd_obj. Signed-off-by: Martin

[PATCH 08/12] staging: rtl8188eu: move another static array from .h to .c

2021-04-08 Thread Martin Kaiser
Move the declaration of the rtw_cmd_callback array from rtw_cmd.h to rtw_cmd.c. The _RTW_CMD_C_ symbol is now obsolete and can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 19 ++- drivers/staging/rtl8188eu/include/rtw_cmd.h | 20

[PATCH 07/12] staging: rtl8188eu: move static array from .h to .c

2021-04-08 Thread Martin Kaiser
to declare the array in the .c file. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 18 +++ .../staging/rtl8188eu/include/rtw_mlme_ext.h | 22 --- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH 06/12] staging: rtl8188eu: remove a constant variable

2021-04-08 Thread Martin Kaiser
enqueue is always 0. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index c3c1cf67cf7e..4d507d9faec2

[PATCH 05/12] staging: rtl8188eu: remove unused function parameter

2021-04-08 Thread Martin Kaiser
The struct adapter parameter of rtw_os_recvbuf_resource_alloc is not used. Remove it. While at it, use the same parameter name in the prototype and the function definition. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/rtl8188eu/include

[PATCH 04/12] staging: rtl8188eu: replace switch-case with if

2021-04-08 Thread Martin Kaiser
This switch has only one case. Replace it with an if statement. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging

[PATCH 03/12] staging: rtl8188eu: make ffaddr2pipehdl static

2021-04-08 Thread Martin Kaiser
This function is used only inside usb_ops_linux.c. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/include/usb_ops_linux.h | 2 -- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/include

[PATCH 02/12] staging: rtl8188eu: remove prototype for non-existing function

2021-04-08 Thread Martin Kaiser
There's no usb_read_port_cancel function in this driver. Remove its prototype. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/include/usb_ops_linux.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/include/usb_ops_linux.h b/drivers/staging/rtl8188eu

[PATCH 01/12] staging: rtl8188eu: remove the last urb callback macros

2021-04-08 Thread Martin Kaiser
Both usb_read_port_complete and usb_write_port_complete have a regs parameter that is not used. When this parameter is removed, the functions can be used as urb completion callbacks directly. There's no need for the macros that strip the second parameter. Signed-off-by: Martin Kaiser

Re: [PATCH 01/10] staging: rtl8188eu: remove unused macros

2021-04-08 Thread Martin Kaiser
Thus wrote Greg Kroah-Hartman (gre...@linuxfoundation.org): > Wow, that's there for a really old kernel version and should not be > needed anymore at all. I'll take this, but please remove the other ones > here, they are not necessary. Ok, I see what you mean. New patch is on the way. Best

[PATCH 09/10] staging: rtl8188eu: make usb_dvobj_init return a status

2021-04-07 Thread Martin Kaiser
usb_dvobj_init populates a struct dvobj_priv and installs it as interface data of the usb interface. There's no point in returning this struct to the caller, it makes more sense to return an error status. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 26

[PATCH 10/10] staging: rtl8188eu: make rtw_usb_if1_init return a status

2021-04-07 Thread Martin Kaiser
Return an error status instead of the struct adapter that was allocated and filled. This is more useful for the probe function, who calls rtw_usb_if1_init. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 28 ++--- 1 file changed, 14 insertions

[PATCH 08/10] staging: rtl8188eu: rtw_usb_if1_init needs no dvobj parameter

2021-04-07 Thread Martin Kaiser
rtw_usb_if1_init receives a pointer to struct usb_interface. dvobj is the interface data for this interface. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep

[PATCH 06/10] staging: rtl8188eu: clean up rtw_recv_entry

2021-04-07 Thread Martin Kaiser
Change the return type to int, the function returns 0 or 1. Remove the goto statement, we're not doing any cleanup on exit. Summarize variable declarations and assignments. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_recv.c | 23 +++ 1 file changed, 7

[PATCH 07/10] staging: rtl8188eu: remove unnecessary variable

2021-04-07 Thread Martin Kaiser
We just want to check if rtw_usb_if1_init returns NULL, which means there was an error. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers

[PATCH 05/10] staging: rtl8188eu: set pipe only once

2021-04-07 Thread Martin Kaiser
Set the pipe for reading or writing in usbctrl_vendorreq only once. There's no need to set it again for every retry. Signed-off-by: Martin Kaiser --- .../staging/rtl8188eu/os_dep/usb_ops_linux.c | 22 ++- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH 04/10] staging: rtl8188eu: move defines into the .c file

2021-04-07 Thread Martin Kaiser
Some of the defines from usb_ops_linux.h are used only inside usb_ops_linux.c. Move them to the .c file. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/include/usb_ops_linux.h | 8 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 8 2 files changed, 8 insertions

[PATCH 03/10] staging: rtl8188eu: remove unused defines

2021-04-07 Thread Martin Kaiser
Some defines in usb_ops_linux.h are not used by the rtl8188eu driver. Remove them. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/include/usb_ops_linux.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/usb_ops_linux.h b/drivers/staging

[PATCH 02/10] staging: rtl8188eu: remove unnecessary brackets

2021-04-07 Thread Martin Kaiser
ESHUTDOWN is just a number, it needs no brackets. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep

[PATCH 01/10] staging: rtl8188eu: remove unused macros

2021-04-07 Thread Martin Kaiser
usb_ops_linux.h contains a couple of macros to make functions usable as urb completion callbacks. Most of them are unused and can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/include/usb_ops_linux.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers

[PATCH 11/11] staging: rtl8188eu: remove an obsolete comment

2021-04-06 Thread Martin Kaiser
This driver does not set URB_ZERO_PACKET. The rtl8188eu driver that's available from Realtek/Edimax has some commented-out code that sets zero packet. It was removed from this driver before it was imported. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2

[PATCH 09/11] staging: rtl8188eu: clean up usb_write16

2021-04-06 Thread Martin Kaiser
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers

[PATCH 10/11] staging: rtl8188eu: clean up usb_write32

2021-04-06 Thread Martin Kaiser
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers

[PATCH 08/11] staging: rtl8188eu: clean up usb_write8

2021-04-06 Thread Martin Kaiser
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging

[PATCH 07/11] staging: rtl8188eu: clean up usb_read32

2021-04-06 Thread Martin Kaiser
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging

[PATCH 06/11] staging: rtl8188eu: clean up usb_read16

2021-04-06 Thread Martin Kaiser
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging

[PATCH 05/11] staging: rtl8188eu: clean up usb_read8

2021-04-06 Thread Martin Kaiser
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging

[PATCH 02/11] staging: rtl8188eu: ctrl vendor req value is always 0x05

2021-04-06 Thread Martin Kaiser
The bRequest value for the vendor specific control requests sent by this driver is always 0x05. Replace the function parameter with a define. Use the same define as the rtlwifi driver. Signed-off-by: Martin Kaiser --- .../staging/rtl8188eu/os_dep/usb_ops_linux.c | 32 +++ 1

[PATCH 04/11] staging: rtl8188eu: use actual request type as parameter

2021-04-06 Thread Martin Kaiser
defines for the read and write request types. Move them to usb_ops_linux.c, they're used only inside this file. Replace the numeric values with USB constants to make their meaning clearer. Signed-off-by: Martin Kaiser --- .../staging/rtl8188eu/include/usb_ops_linux.h | 3 -- .../staging/rtl8188eu

[PATCH 03/11] staging: rtl8188eu: ctrl vendor req index is not used

2021-04-06 Thread Martin Kaiser
The index for rtl8188eu's vendor-specific control requests is not used. Remove the index parameter from usbctrl_vendorreq and pass index 0 to usb_control_msg. Signed-off-by: Martin Kaiser --- .../staging/rtl8188eu/os_dep/usb_ops_linux.c | 33 ++- 1 file changed, 10 insertions

[PATCH 01/11] staging: rtl8188eu: remove unused efuse hal components

2021-04-06 Thread Martin Kaiser
struct hal_data_8188e contains some components related to efuses which are not used for rtl8188eu. Signed-off-by: Martin Kaiser --- .../staging/rtl8188eu/include/rtl8188e_hal.h | 4 drivers/staging/rtl8188eu/include/rtw_efuse.h | 20 --- 2 files changed, 24 deletions

[PATCH] staging: rtl8723bs: remove unused dvobj_priv members

2021-04-05 Thread Martin Kaiser
InterfaceNumber und NumInterfaces in struct dvobj_priv are not used. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8723bs/include/drv_types.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include

[PATCH v2] staging: rtl8188eu: (trivial) remove a duplicate debug print

2021-03-29 Thread Martin Kaiser
Keep the one that shows the wakeup capability. Signed-off-by: Martin Kaiser --- v2: - fix the subject line drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c

[PATCH] staging: rtl8188eu: remove unused function parameter

2021-03-28 Thread Martin Kaiser
rtw_usb_if1_init does not use its struct usb_device_id parameter. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep

[PATCH] staging: rtl8188eu: (trivial) remove a duplicate comment

2021-03-28 Thread Martin Kaiser
Keep the one that shows the wakeup capability. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 91a3d34a1050

Re: [PATCH][next] staging: rtl8188eu: Fix null pointer dereference on free_netdev call

2021-03-24 Thread Martin Kaiser
free_netdev(pnetdev); > } > static int rtw_drv_init(struct usb_interface *pusb_intf, const struct > usb_device_id *pdid) > -- > 2.30.2 you're right. I removed the NULL check that was part of rtw_free_netdev. Sorry for the mistake and thanks for your fix. Reviewed-by: Martin Kaiser Best regards, Martin

[PATCH] staging: rtl8188eu: use netdev routines for private data

2021-03-21 Thread Martin Kaiser
This driver implements its own routines to allocate, access and free the private data of its net_device. Use the functionality from the networking core instead. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_debug.c| 8 +- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c

[PATCH] staging: rtl8188eu: Add Edimax EW-7811UN V2 to device table

2021-02-04 Thread Martin Kaiser
The Edimax EW-7811UN V2 uses an RTL8188EU chipset and works with this driver. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep

Re: [PATCH v2 0/3] Make fw_devlink=on more forgiving

2021-02-03 Thread Martin Kaiser
Thus wrote Geert Uytterhoeven (ge...@linux-m68k.org): > > The property you are using is not a standard GPIO binding (-gpios, > > gpio, gpios) and I'm not surprised it's not working. The gpio1 is > > probably getting probe deferred and ends up running after "my_driver". > So my_driver doesn't

Re: [PATCH v2 0/3] Make fw_devlink=on more forgiving

2021-02-03 Thread Martin Kaiser
Thus wrote Saravana Kannan (sarava...@google.com): > > With modules disabled, the kernel boots but probe fails for some > > (non-mainline) drivers in my tree. > Thanks Martin! > > All of those drivers have a gpio in > > their device-tree node, such as > > my_driver { > >gpio_test1 = < 0

Re: [PATCH v2 0/3] Make fw_devlink=on more forgiving

2021-02-02 Thread Martin Kaiser
Hi Saravana, Thus wrote Saravana Kannan (sarava...@google.com): > Martin, > If you tested this series, can you please give a Tested-by? I tested this v2 series on top of next-20210202 (without the fsl,avic patch). If modules are enabled, the kernel doesn't boot on my imx25 board. This is

Re: [PATCH v1] ARM: imx: avic: Convert to using IRQCHIP_DECLARE

2021-02-01 Thread Martin Kaiser
inute > before sending it out. Thanks for catching it. > I'll wait to see if there are any other review comments before I send out v2. > Martin, > Please make this fix before you test it. > -Saravana with fsl,avic Tested-by: Martin Kaiser

Re: [PATCH v2 0/2] of: property: Add fw_devlink support for more props

2021-02-01 Thread Martin Kaiser
Hi Saravana, Thus wrote Saravana Kannan (sarava...@google.com): > This series [1] has a high chance of fixing it for you if > CONFIG_MODULES is disabled in your set up. Can you give it a shot? sure. This fixes things for me if CONFIG_MODULES is disabled. Booting is still stuck if modules are

[PATCH] staging: rtl8723bs: fix rtw_cfg80211_monitor_if_xmit_entry's return value

2021-01-31 Thread Martin Kaiser
A netdev xmit function should return NETDEV_TX_OK or NETDEV_TX_BUSY. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging

[PATCH] staging: rtl8188eu: fix rtw_xmit_entry's return value

2021-01-22 Thread Martin Kaiser
A netdev xmit function should return NETDEV_TX_OK or NETDEV_TX_BUSY. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/xmit_linux.c b/drivers/staging/rtl8188eu

[PATCH v4] PCI: brcmstb: Remove chained IRQ handler and data in one go

2021-01-15 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser Acked-by: Florian Fainelli Acked-by: Nicolas Saenz Jul

[PATCH v4 3/3] PCI: xgene-msi: Fix race in installing chained irq handler

2021-01-15 Thread Martin Kaiser
, it seems ok to drop the error handling. Signed-off-by: Martin Kaiser --- v4 - resend after two months drivers/pci/controller/pci-xgene-msi.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controller/pci-x

[PATCH v4 1/3] PCI: altera-msi: Remove IRQ handler and data in one go

2021-01-15 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser --- Hi Lorenzo, here's another bunch of simple patc

[PATCH v4 2/3] PCI: dwc: Remove IRQ handler and data in one go

2021-01-15 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser --- v4: - resend after two months - capitalize the c

[PATCH RESEND v2 2/3] mailbox: stm32-ipcc: remove duplicate error message

2020-11-29 Thread Martin Kaiser
platform_get_irq_byname already prints an error message if the requested irq was not found. Don't print another message in the driver. Signed-off-by: Martin Kaiser Reviewed-by: Fabien Dessenne --- changes in v2 - added Fabien's review tag - reformatted the commit message such that lines

[PATCH RESEND v2 3/3] mailbox: stm32-ipcc: cast void pointers to unsigned long

2020-11-29 Thread Martin Kaiser
ast to 'void *' from smaller integer type 'unsigned int' ipcc->controller.chans[i].con_priv = (void *)i; Update these casts to use unsigned long variables, which are the same size as pointers on all platforms. Reported-by: kernel test robot Signed-off-by: Martin Kaiser Reviewed-by:

[PATCH RESEND v2 1/3] mailbox: stm32-ipcc: add COMPILE_TEST dependency

2020-11-29 Thread Martin Kaiser
This allows compiling the driver on architectures where the hardware is not available. Most other mailbox drivers support this as well. Signed-off-by: Martin Kaiser Reviewed-by: Fabien Dessenne --- changes in v2 - added Fabien's review tag Dear all, this has been around for some weeks now

[PATCH v3 1/3] PCI: altera-msi: remove chained IRQ handler and data in one go

2020-11-12 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser --- v3: - rewrite the commit message again. th

[PATCH v3 3/3] PCI: xgene-msi: Fix race in installing chained irq handler

2020-11-12 Thread Martin Kaiser
, it seems ok to drop the error handling. Link: https://lore.kernel.org/linux-pci/87h7pumo9l@nanos.tec.linutronix.de/T/#m6d3288531114ada1378b41538ef73fef451f1441 Signed-off-by: Martin Kaiser --- drivers/pci/controller/pci-xgene-msi.c | 10 +++--- 1 file changed, 3 insertions(+), 7

[PATCH v3 2/3] PCI: dwc: remove chained IRQ handler and data in one go

2020-11-12 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser --- v3: - rewrite the commit message again. th

[PATCH v3] PCI: brcmstb: remove chained IRQ handler and data in one go

2020-11-12 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser Acked-by: Florian Fainelli Acked-by: Nicolas Saenz Jul

[PATCH v2 2/2] PCI: dwc: Fix race in removing chained IRQ handler

2020-11-11 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser --- drivers/pci/controller/dwc/pcie-designware-host.c

[PATCH v2 1/2] PCI: altera-msi: Fix race in removing chained IRQ handler

2020-11-11 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser --- v2: - rewrite the commit messa

[PATCH v2] PCI: brcmstb: Fix race in removing chained IRQ handler

2020-11-11 Thread Martin Kaiser
Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser Acked-by: Florian Fainelli --- v2: - rewrite the c

Re: [PATCH] PCI: altera-msi: Remove irq handler and data in one go

2020-11-11 Thread Martin Kaiser
Thus wrote Bjorn Helgaas (helg...@kernel.org): > [+cc Florian, sorry, I hadn't seen your ack when I sent the below] > On Tue, Nov 10, 2020 at 03:21:36PM -0600, Bjorn Helgaas wrote: > > [+cc Nicolas, Jingoo, Gustavo, Toan] > > On Sun, Nov 08, 2020 at 08:11:40PM +0100, M

[PATCH] PCI: altera-msi: Remove irq handler and data in one go

2020-11-08 Thread Martin Kaiser
Replace the two separate calls for removing the irq handler and data with a single irq_set_chained_handler_and_data() call. Signed-off-by: Martin Kaiser --- drivers/pci/controller/pcie-altera-msi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie

[PATCH] PCI: brcmstb: Remove irq handler and data in one go

2020-11-08 Thread Martin Kaiser
Replace the two separate calls for removing the irq handler and data with a single irq_set_chained_handler_and_data() call. Signed-off-by: Martin Kaiser --- drivers/pci/controller/pcie-brcmstb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie

[PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go

2020-11-08 Thread Martin Kaiser
Replace the two separate calls for setting the irq handler and data with a single irq_set_chained_handler_and_data() call. Signed-off-by: Martin Kaiser --- drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91

[PATCH v2 3/3] i2c: exynos5: don't check for irq 0

2020-11-01 Thread Martin Kaiser
platform_get_irq never returns 0. Don't check for this. Make it clear that the error path always returns a negative error code. Signed-off-by: Martin Kaiser --- changes in v2 - split the patch in three parts drivers/i2c/busses/i2c-exynos5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 1/3] i2c: exynos5: remove duplicate error message

2020-11-01 Thread Martin Kaiser
platform_get_irq already prints an error message if the requested irq was not found. Don't print another message in the driver. Signed-off-by: Martin Kaiser --- changes in v2 - split the patch in three parts drivers/i2c/busses/i2c-exynos5.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH v2 2/3] i2c: exynos5: fix platform_get_irq error handling

2020-11-01 Thread Martin Kaiser
If platform_get_irq returns an error, relay this error to the caller of the probe function. Don't change all errors to -EINVAL. This breaks the case where platform_get_irq returns -EPROBE_DEFER. Signed-off-by: Martin Kaiser --- changes in v2 - split the patch in three parts drivers/i2c/busses

[PATCH v2 3/3] mailbox: stm32-ipcc: cast void pointers to unsigned long

2020-11-01 Thread Martin Kaiser
ast to 'void *' from smaller integer type 'unsigned int' ipcc->controller.chans[i].con_priv = (void *)i; Update these casts to use unsigned long variables, which are the same size as pointers on all platforms. Reported-by: kernel test robot Signed-off-by: Martin Kaiser --- changes

[PATCH v2 2/3] mailbox: stm32-ipcc: remove duplicate error message

2020-11-01 Thread Martin Kaiser
platform_get_irq_byname already prints an error message if the requested irq was not found. Don't print another message in the driver. Signed-off-by: Martin Kaiser Reviewed-by: Fabien Dessenne --- changes in v2 - added Fabien's review tag - reformatted the commit message such that lines

[PATCH v2 1/3] mailbox: stm32-ipcc: add COMPILE_TEST dependency

2020-11-01 Thread Martin Kaiser
This allows compiling the driver on architectures where the hardware is not available. Most other mailbox drivers support this as well. Signed-off-by: Martin Kaiser Reviewed-by: Fabien Dessenne --- changes in v2 - added Fabien's review tag drivers/mailbox/Kconfig | 2 +- 1 file changed, 1

[PATCH] i2c: exynos5: fix platform_get_irq error handling

2020-10-27 Thread Martin Kaiser
platform_get_irq returns -EPROBE_DEFER. platform_get_irq never returns 0. Don't check for this. Make it clear that the error path always returns a negative error code. Signed-off-by: Martin Kaiser --- drivers/i2c/busses/i2c-exynos5.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH 1/2] mailbox: stm32-ipcc: add COMPILE_TEST dependency

2020-10-24 Thread Martin Kaiser
This allows compiling the driver on architectures where the hardware is not available. Most other mailbox drivers support this as well. Signed-off-by: Martin Kaiser --- I used this for testing the trivial patch that removes the duplicate error message. Also, compiling the driver on x86_64

[PATCH 2/2] mailbox: stm32-ipcc: remove duplicate error message

2020-10-24 Thread Martin Kaiser
platform_get_irq_byname already prints an error message if the requested irq was not found. Don't print another message in the driver. Signed-off-by: Martin Kaiser --- drivers/mailbox/stm32-ipcc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers

Re: [PATCH v2 5/5] hwrng: imx-rngc: enable driver for i.MX6

2020-06-21 Thread Martin Kaiser
{ .compatible = "fsl,imx25-rngb", .data = NULL, }, > + { .compatible = "fsl,imx6sl-rngb", .data = NULL, }, > + { .compatible = "fsl,imx6sll-rngb", .data = NULL, }, > + { .compatible = "fsl,imx6ull-rngb", .data = NULL, }, > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(of, imx_rngc_dt_ids); > -- > 2.17.1 Reviewed-by: Martin Kaiser

[PATCH v2 0/2] dt-bindings: display: fix native-mode setting

2019-10-05 Thread Martin Kaiser
which got this wrong. Fix the examples in the device tree bindings as well. Martin Kaiser (2): dt-bindings: display: imx: fix native-mode setting dt-bindings: display: clps711x-fb: fix native-mode setting Documentation/devicetree/bindings/display/cirrus,clps711x-fb.txt | 2 +- Documentation

[PATCH v2 1/2] dt-bindings: display: imx: fix native-mode setting

2019-10-05 Thread Martin Kaiser
Move the native-mode setting inside the display-timing node. Outside of display-timing, it is ignored. Signed-off-by: Martin Kaiser --- changes in v2 move parts of the commit message into the cover letter Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt | 2 +- 1 file changed, 1

[PATCH v2 2/2] dt-bindings: display: clps711x-fb: fix native-mode setting

2019-10-05 Thread Martin Kaiser
Move the native-mode setting inside the display-timing node. Outside of display-timing, it is ignored. Signed-off-by: Martin Kaiser --- changes in v2 fix the example in this binding as well Documentation/devicetree/bindings/display/cirrus,clps711x-fb.txt | 2 +- 1 file changed, 1 insertion

[PATCH] dt-bindings: display: imx: fix native-mode setting

2019-09-18 Thread Martin Kaiser
which got this wrong. Fix the example in the imx framebuffer bindings as well. Signed-off-by: Martin Kaiser --- Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx

[PATCH] iio: max5481: use devres for iio device registration

2019-08-14 Thread Martin Kaiser
Replace iio_device_register with the devres variant and drop the explicit function call to unregister the iio device. Signed-off-by: Martin Kaiser --- drivers/iio/potentiometer/max5481.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/potentiometer/max5481.c

[PATCH] iio: max5487: use devres for iio device registration

2019-08-14 Thread Martin Kaiser
Replace iio_device_register with the devres variant and drop the explicit function call to unregister the iio device. Signed-off-by: Martin Kaiser --- drivers/iio/potentiometer/max5487.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/iio/potentiometer/max5487.c

Re: iio: Is storing output values to non volatile registers something we should do automatically or leave to userspace action. [was Re: [PATCH] iio: potentiometer: max5432: update the non-volatile po

2019-08-12 Thread Martin Kaiser
Hi Jonathan, Thus wrote Jonathan Cameron (ji...@kernel.org): > The patch is fine, but I'm wondering about whether we need some element > of policy control on this restore to current value. > A few things to take into account. > * Some devices don't have a non volatile store. So userspace will

[PATCH] iio: potentiometer: max5432: update the non-volatile position

2019-08-09 Thread Martin Kaiser
the remove function, shutdown is called when the system is rebooted. It's safe to send an i2c message in the shutdown function. Skip the update if user space never changed the wiper position. Signed-off-by: Martin Kaiser --- The patch is against the testing branch in git://git.kernel.org/pub/scm

[PATCH 3/8] ARM: dts: eukrea-mbimxsd27: native-mode is part of display-timings

2019-08-01 Thread Martin Kaiser
display timing is used (which is a problem only if someone adds another display timing). Signed-off-by: Martin Kaiser --- arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dts

[PATCH 5/8] ARM: dts: imx27-phytec-phycore-rdk: native-mode is part of display-timings

2019-08-01 Thread Martin Kaiser
display timing is used (which is a problem only if someone adds another display timing). Signed-off-by: Martin Kaiser --- arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts b/arch/arm/boot

[PATCH 6/8] ARM: dts: edb7211: native-mode is part of display-timings

2019-08-01 Thread Martin Kaiser
display timing is used (which is a problem only if someone adds another display timing). Signed-off-by: Martin Kaiser --- arch/arm/boot/dts/ep7211-edb7211.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/ep7211-edb7211.dts b/arch/arm/boot/dts/ep7211-edb7211

[PATCH 4/8] ARM: dts: mbimxsd25: native-mode is part of display-timings

2019-08-01 Thread Martin Kaiser
display timing is used (which is a problem only if someone adds another display timing). Signed-off-by: Martin Kaiser --- arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25

[PATCH 8/8] ARM: dts: imx25: mbimxsd25: native-mode is part of display-timings

2019-08-01 Thread Martin Kaiser
display timing is used (which is a problem only if someone adds another display timing). Signed-off-by: Martin Kaiser --- arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25

[PATCH 7/8] ARM: dts: apf27dev: native-mode is part of display-timings

2019-08-01 Thread Martin Kaiser
display timing is used (which is a problem only if someone adds another display timing). Signed-off-by: Martin Kaiser --- arch/arm/boot/dts/imx27-apf27dev.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx27-apf27dev.dts b/arch/arm/boot/dts/imx27

[PATCH 1/8] ARM: dts: imx27 phyCARD-S: native-mode is part of display-timings

2019-08-01 Thread Martin Kaiser
display timing is used (which is a problem only if someone adds another display timing). Signed-off-by: Martin Kaiser --- arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts b/arch/arm

[PATCH 2/8] ARM: dts: imx25: mbimxsd25: native-mode is part of display-timings

2019-08-01 Thread Martin Kaiser
display timing is used (which is a problem only if someone adds another display timing). Signed-off-by: Martin Kaiser --- arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25

  1   2   3   4   >