[PATCH 9/9] staging: rtl8192e: reformat rx_ts_record struct

2021-03-01 Thread William Durand
This change uses a space instead of tabs between the type and name of each member of the struct. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_TS.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl819x_TS.h

[PATCH 4/9] staging: rtl8192e: rename RxPendingPktList to rx_pending_pkt_list in rx_ts_record struct

2021-03-01 Thread William Durand
Rename RxPendingPktList to rx_pending_pkt_list to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 10 +- drivers/staging/rtl8192e/rtllib_rx.c | 12

[PATCH 6/9] staging: rtl8192e: rename RxAdmittedBARecord to rx_admitted_ba_record in rx_ts_record struct

2021-03-01 Thread William Durand
Rename RxAdmittedBARecord to rx_admitted_ba_record to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_BAProc.c | 10 +- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 4 ++--

[PATCH 8/9] staging: rtl8192e: rename RxLastFragNum to rx_last_frag_num in rx_ts_record struct

2021-03-01 Thread William Durand
Rename RxLastFragNum to rx_last_frag_num to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 5/9] staging: rtl8192e: rename RxPktPendingTimer to rx_pkt_pending_timer in rx_ts_record struct

2021-03-01 Thread William Durand
Rename RxPktPendingTimer to rx_pkt_pending_timer to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 10 +- drivers/staging/rtl8192e/rtllib_rx.c | 8

[PATCH 7/9] staging: rtl8192e: rename RxLastSeqNum to rx_last_seq_num in rx_ts_record struct

2021-03-01 Thread William Durand
Rename RxLastSeqNum to rx_last_seq_num to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 3/9] staging: rtl8192e: rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq in rx_ts_record struct

2021-03-01 Thread William Durand
Rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 10 +- drivers/staging/rtl8192e/rtllib_rx.c | 6

[PATCH 2/9] staging: rtl8192e: rename RxIndicateSeq to rx_indicate_seq in rx_ts_record struct

2021-03-01 Thread William Durand
Rename RxIndicateSeq to rx_indicate_seq to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 16 - drivers/staging/rtl8192e/rtllib_rx.c | 42

[PATCH 1/9] staging: rtl8192e: rename TsCommonInfo to ts_common_info in rx_ts_record struct

2021-03-01 Thread William Durand
Rename TsCommonInfo to ts_common_info to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand --- drivers/staging/rtl8192e/rtl819x_BAProc.c | 2 +- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 10 +- 3 files

[PATCH 0/9] rx_ts_record struct cleanups

2021-03-01 Thread William Durand
This patchset fixes the checkpatch issues related to the `rx_ts_record` struct defined in `rtl8192e/rtl819x_TS.h` (avoid camelcase). The last patch reformats the struct a bit to be more consistent with structures defined in other header files. William Durand (9): staging: rtl8192e: rename

[staging:staging-next] BUILD SUCCESS b0ff7ee301a6ed3220056d99a3b343f534edd788

2021-03-01 Thread kernel test robot
powerpc allmodconfig powerpc allnoconfig i386 randconfig-a005-20210301 i386 randconfig-a003-20210301 i386 randconfig-a002-20210301 i386 randconfig-a004-20210301 i386

[driver-core:debugfs_remove_return_value] BUILD SUCCESS 996b090d746db78df6947e224a2f594f0f80dc4c

2021-03-01 Thread kernel test robot
allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a005-20210301 i386 randconfig-a003-20210301 i386 randconfig-a002-20210301

[PATCH 6/6] staging: comedi: dt2814: Clear stale AI data on detach

2021-03-01 Thread Ian Abbott
When the Comedi "detach" handler is called, it is possible that an extra A/D conversion (triggered during termination of a Comedi asynchronous command) is still in progress. In that case, the FINISH bit in the Status register will eventually get set and there will be stale data waiting to be read

[PATCH 5/6] staging: comedi: dt2814: Remove struct dt2814_private

2021-03-01 Thread Ian Abbott
The `ntrig` member of the `struct dt2814_private` pointed to by `dev->private` is no longer used as a counter to determine the end of acquisition for a Comedi asynchronous command. The other member `curadscan` is also unused. Remove the allocation of the private data during initialization and

[PATCH 4/6] staging: comedi: dt2814: Fix asynchronous command interrupt handling

2021-03-01 Thread Ian Abbott
The support for asynchronous commands in this driver is currently broken. If interrupts are enabled, the interrupt handler is called at the end of every A/D conversion. A/D conversions could be due to software-triggered conversions resulting from Comedi `INSN_READ` instruction handling, or due

[PATCH 3/6] staging: comedi: dt2814: Call dt2814_ai_clear() during initialization

2021-03-01 Thread Ian Abbott
The Comedi "attach" handler `dt2814_attach()` writes to the Control register to turn off the timer enable 'ENB' bit, which triggers a conversion. It then sleeps awhile and checks the Status register, returning an error if the ERR bit is set. However, the ERR bit could have been set due to the

[PATCH 2/6] staging: comedi: dt2814: Don't wait for conversion in interrupt handler

2021-03-01 Thread Ian Abbott
When the interrupt handler decides the final sample has been acquired, it turns off the timer enable (ENB) bit in the Command register. That triggers another A/D conversion. The interrupt handler currently waits for that to finish and then reads the resulting, unwanted sample. Since the

[PATCH 1/6] staging: comedi: dt2814: Clear stale AI data before operation

2021-03-01 Thread Ian Abbott
When performing a Comedi read instruction or setting up an asynchronous command on the AI subdevice, clear any stale data on the A/D registers by waiting for the Status register's BUSY bit to clear (if set) and then if the FINISH or ERR bit is set, reading the A/D Data register twice to clear the

[PATCH 0/6] staging: comedi: dt2814: Fix broken AI command support

2021-03-01 Thread Ian Abbott
The DT2814 board is an old analog-to-digital ISA card supported by the Comedi "dt2814" driver. The board has a timed acquisition mode, and an end-of-conversion interrupt. The interrupt can be disabled by removing the jumper that sets the IRQ level. In Comedi, the board is a manually configured

Re: [PATCH] staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan

2021-03-01 Thread Lee
> This check worked out pretty well. It's probably 50% bugs? Unfiltered > results below. The trick of warning for "if (ststr(member, "->ssid")) " > and the memcpy length couldn't be verified turned out to be the best. That list looks great. I checked out 2 of those listed at random and

[PATCH v3 5/5] arm64: dts: imx8mq: Use reset driver for VPU hardware block

2021-03-01 Thread Benjamin Gaignard
Add a vpu reset hardware block node. Signed-off-by: Benjamin Gaignard --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 31 ++- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi

[PATCH v3 4/5] media: hantro: Use reset driver

2021-03-01 Thread Benjamin Gaignard
Rather use a reset like feature inside the driver use the reset controller API to get the same result. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/Kconfig| 1 + drivers/staging/media/hantro/imx8m_vpu_hw.c | 61 - 2 files changed, 12

[PATCH v3 1/5] dt-bindings: reset: IMX8MQ VPU reset

2021-03-01 Thread Benjamin Gaignard
Document bindings for IMX8MQ VPU reset hardware block Signed-off-by: Benjamin Gaignard --- .../bindings/reset/fsl,imx8mq-vpu-reset.yaml | 54 +++ include/dt-bindings/reset/imx8mq-vpu-reset.h | 16 ++ 2 files changed, 70 insertions(+) create mode 100644

[PATCH v3 3/5] reset: Add reset driver for IMX8MQ VPU block

2021-03-01 Thread Benjamin Gaignard
IMX8MQ SoC got a dedicated hardware block to reset the video processor units (G1 and G2). Signed-off-by: Benjamin Gaignard --- drivers/reset/Kconfig| 8 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-imx8mq-vpu.c | 169 +++ 3 files

[PATCH v3 0/5] Reset driver for IMX8MQ VPU hardware block

2021-03-01 Thread Benjamin Gaignard
The two VPUs inside IMX8MQ share the same control block which can be see as a reset hardware block. In order to be able to add the second VPU (for HECV decoding) it will be more handy if the both VPU drivers instance don't have to share the control block registers. This lead to implement it as an

[PATCH v3 2/5] dt-bindings: media: IMX8MQ VPU: document reset usage

2021-03-01 Thread Benjamin Gaignard
Document IMX8MQ VPU bindings to add the phandle to the reset driver. Provide an independent reset driver allow to the both VPUs to share their control/reset hardware block. The reset driver replace what was previously done be using the 'ctrl' registers inside the driver. This breaks the

Re: [PATCH v2 3/3] staging: rtl8723bs: os_dep: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
On Mon, Mar 01, 2021 at 06:07:25PM +0300, Dan Carpenter wrote: > On Mon, Mar 01, 2021 at 10:00:11PM +0700, Candy Febriyanto wrote: > > The use of sprintf with format string here means that there is a risk > > that the writes will go out of bounds, replace it with scnprintf. > > > > In one block

Re: [PATCH v2 3/3] staging: rtl8723bs: os_dep: Replace sprintf with scnprintf

2021-03-01 Thread Dan Carpenter
On Mon, Mar 01, 2021 at 10:00:11PM +0700, Candy Febriyanto wrote: > The use of sprintf with format string here means that there is a risk > that the writes will go out of bounds, replace it with scnprintf. > > In one block of the translate_scan function sprintf is only called once > (it's not

[PATCH v2 2/3] staging: rtl8723bs: hal: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. Also avoid unnecessarily passing "%s" on some of the function calls. Signed-off-by: Candy Febriyanto Reviewed-by: Hans de Goede ---

[PATCH v2 3/3] staging: rtl8723bs: os_dep: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. In one block of the translate_scan function sprintf is only called once (it's not being used to concatenate strings) so there is no need to keep the pointer "p",

[PATCH v2 1/3] staging: rtl8723bs: core: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. In on_action_public_default the variable "cnt" isn't being used for anything meaningful so remove it. Signed-off-by: Candy Febriyanto Reviewed-by: Hans de

[PATCH v2 0/3] staging: rtl8723bs: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
This patchset replaces most calls to sprintf with scnprintf, thereby preventing potential buffer overflows. The rest I left alone because they write to a buffer passed by a caller that doesn't pass its size alongside it. Candy Febriyanto (3): staging: rtl8723bs: core: Replace sprintf with

Re: [PATCH v2 2/5] dt-bindings: media: IMX8MQ VPU: document reset usage

2021-03-01 Thread Rob Herring
On Fri, 26 Feb 2021 10:11:25 +0100, Benjamin Gaignard wrote: > Document IMX8MQ VPU bindings to add the phandle to the reset driver. > > Provide an independent reset driver allow to the both VPUs to share > their control/reset hardware block. The reset driver replace what > was previously done be

Re: [PATCH 0/3] staging: rtl8723bs: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
On Mon, Mar 01, 2021 at 02:45:00PM +0100, Hans de Goede wrote: > Hi, > > On 3/1/21 2:12 PM, Candy Febriyanto wrote: > > This patchset replaces most calls to sprintf with scnprintf, thereby > > preventing potential buffer overflows. The rest I left alone because > > they write to a buffer passed

Re: [PATCH 3/3] staging: rtl8723bs: os_dep: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
On Mon, Mar 01, 2021 at 04:41:09PM +0300, Dan Carpenter wrote: > On Mon, Mar 01, 2021 at 08:13:54PM +0700, Candy Febriyanto wrote: > > @@ -5082,7 +5084,7 @@ static int rtw_ioctl_wext_private(struct net_device > > *dev, union iwreq_data *wrq_ > > case IW_PRIV_TYPE_BYTE: > >

Re: [PATCH 0/3] staging: rtl8723bs: Replace sprintf with scnprintf

2021-03-01 Thread Hans de Goede
Hi, On 3/1/21 2:12 PM, Candy Febriyanto wrote: > This patchset replaces most calls to sprintf with scnprintf, thereby > preventing potential buffer overflows. The rest I left alone because > they write to a buffer passed by a caller that doesn't pass its size > alongside it. > > Candy Febriyanto

Re: [PATCH 3/3] staging: rtl8723bs: os_dep: Replace sprintf with scnprintf

2021-03-01 Thread Dan Carpenter
On Mon, Mar 01, 2021 at 08:13:54PM +0700, Candy Febriyanto wrote: > @@ -5082,7 +5084,7 @@ static int rtw_ioctl_wext_private(struct net_device > *dev, union iwreq_data *wrq_ > case IW_PRIV_TYPE_BYTE: > /* Display args */ > for (j = 0; j <

[PATCH] staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd

2021-03-01 Thread Lee Gibson
Function r8712_sitesurvey_cmd calls memcpy without checking the length. A user could control that length and trigger a buffer overflow. Fix by checking the length is within the maximum allowed size. Signed-off-by: Lee Gibson --- drivers/staging/rtl8712/rtl871x_cmd.c | 6 -- 1 file changed,

Re: [PATCH] staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan

2021-03-01 Thread Dan Carpenter
On Fri, Feb 26, 2021 at 05:05:26PM +0300, Dan Carpenter wrote: > Here is a v2 of my check. I've changed it to mark all "->ssid" and > everything in "(struct ieee80211_network)" as protected. I'm just > playing around with it at this point to explore what works best. It's > impossible to know

[PATCH 3/3] staging: rtl8723bs: os_dep: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. In one block of the translate_scan function sprintf is only called once (it's not being used to concatenate strings) so there is no need to keep the pointer "p",

[PATCH 2/3] staging: rtl8723bs: hal: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. Also avoid unnecessarily passing "%s" on some of the function calls. Signed-off-by: Candy Febriyanto --- drivers/staging/rtl8723bs/hal/hal_com.c | 45

[PATCH 1/3] staging: rtl8723bs: core: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. In on_action_public_default the variable "cnt" isn't being used for anything meaningful so remove it. Signed-off-by: Candy Febriyanto ---

[PATCH 0/3] staging: rtl8723bs: Replace sprintf with scnprintf

2021-03-01 Thread Candy Febriyanto
This patchset replaces most calls to sprintf with scnprintf, thereby preventing potential buffer overflows. The rest I left alone because they write to a buffer passed by a caller that doesn't pass its size alongside it. Candy Febriyanto (3): staging: rtl8723bs: core: Replace sprintf with

RE: [PATCH 4/4] staging:rtl8712: replace cap_* definitions with native kernel WLAN_CAPABILITY_*

2021-03-01 Thread Chen, Mike Ximing
> -Original Message- > From: Ivan Safonov > Sent: Saturday, February 27, 2021 5:23 PM > To: Greg Kroah-Hartman > Cc: Florian Schilhabel ; Larry Finger > ; Michael Straube ; Pascal > Terjan ; de...@driverdev.osuosl.org; linux- > ker...@vger.kernel.org; Ivan Safonov > Subject: [PATCH