Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-05-15 Thread Oleg Nesterov
On 05/13, Sultan Alsawaf wrote: > > On Fri, May 10, 2019 at 05:10:25PM +0200, Oleg Nesterov wrote: > > I am starting to think I am ;) > > > > If you have task1 != task2 this code > > > > task_lock(task1); > > task_lock(task2); > > > > should trigger print_deadlock_bug(), task1->alloc_lock

[PATCH] Staging: kpc2000: kpc_dma: include instead of

2019-05-15 Thread Puranjay Mohan
Fix following checkpatch.pl warning by including instead of . WARNING: Use #include instead of Signed-off-by: Puranjay Mohan --- drivers/staging/kpc2000/kpc_dma/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc_dma/dma.c

[PATCH] staging: rtl8723bs: core: rtw_recv: fix warning Unneeded variable ret

2019-05-15 Thread Hariprasad Kelam
fix below warning reported by coccicheck drivers/staging/rtl8723bs/core/rtw_recv.c:1903:5-8: Unneeded variable: "ret". Return "_SUCCESS" on line 1972 drivers/staging/rtl8723bs/core/rtw_recv.c:1618:6-9: Unneeded variable: "ret". Return "_SUCCESS" on line 1705 Signed-off-by: Hariprasad Kelam ---

Re: [PATCH] staging: Add rtl8821ce PCIe WiFi driver

2019-05-15 Thread Kai-Heng Feng
at 00:39, Greg KH wrote: On Wed, May 15, 2019 at 09:06:44PM +0800, Kai-Heng Feng wrote: at 20:33, Greg KH wrote: On Wed, May 15, 2019 at 07:54:58PM +0800, Kai-Heng Feng wrote: at 19:40, Greg KH wrote: On Wed, May 15, 2019 at 07:24:01PM +0800, Kai-Heng Feng wrote: The rtl8821ce can be

[PATCH] staging: rtl8723bs: core: rtw_recv: fix warning Comparison to NULL

2019-05-15 Thread Hariprasad Kelam
fix below warning reported by checkpatch CHECK: Comparison to NULL could be written "!precvpriv->pallocated_frame_buf" CHECK: Comparison to NULL could be written "padapter" Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/core/rtw_recv.c | 48 +++ 1

Re: [PATCH] staging: Add rtl8821ce PCIe WiFi driver

2019-05-15 Thread Greg KH
On Wed, May 15, 2019 at 09:06:44PM +0800, Kai-Heng Feng wrote: > at 20:33, Greg KH wrote: > > > On Wed, May 15, 2019 at 07:54:58PM +0800, Kai-Heng Feng wrote: > > > at 19:40, Greg KH wrote: > > > > > > > On Wed, May 15, 2019 at 07:24:01PM +0800, Kai-Heng Feng wrote: > > > > > The rtl8821ce can

Re: [PATCH] staging: Add rtl8821ce PCIe WiFi driver

2019-05-15 Thread Greg KH
On Thu, May 16, 2019 at 01:40:00AM +0800, Kai-Heng Feng wrote: > at 00:39, Greg KH wrote: > > > On Wed, May 15, 2019 at 09:06:44PM +0800, Kai-Heng Feng wrote: > > > at 20:33, Greg KH wrote: > > > > > > > On Wed, May 15, 2019 at 07:54:58PM +0800, Kai-Heng Feng wrote: > > > > > at 19:40, Greg KH

[PATCH] Staging: rtl8192u: ieee80211: Fix coding style issues related to if else

2019-05-15 Thread Puranjay Mohan
Fix positions of braces for if-else statements. Signed-off-by: Puranjay Mohan --- .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c

Re: [PATCH] staging: Add rtl8821ce PCIe WiFi driver

2019-05-15 Thread Larry Finger
On 5/15/19 8:06 AM, Kai-Heng Feng wrote: at 20:33, Greg KH wrote: On Wed, May 15, 2019 at 07:54:58PM +0800, Kai-Heng Feng wrote: at 19:40, Greg KH wrote: On Wed, May 15, 2019 at 07:24:01PM +0800, Kai-Heng Feng wrote: The rtl8821ce can be found on many HP and Lenovo laptops. Users have

[PATCH] Staging: rtl8188eu: os_dep: Use %s and __func__ in strings

2019-05-15 Thread Puranjay Mohan
Fix following checkpatch.pl warnings by using %s and __func__ in strings instead of function names. WARNING: Prefer using '"%s...", __func__' to using 'rtw_report_sec_ie', this function's name, in a string and other similar warning. Signed-off-by: Puranjay Mohan ---

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-05-15 Thread Steven Rostedt
On Wed, 15 May 2019 10:27:28 -0700 Sultan Alsawaf wrote: > On Wed, May 15, 2019 at 04:58:32PM +0200, Oleg Nesterov wrote: > > Could you explain in detail what exactly did you do and what do you see in > > dmesg? > > > > Just in case, lockdep complains only once, print_circular_bug() does > >

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-05-15 Thread Steven Rostedt
On Wed, 15 May 2019 11:52:57 -0700 Sultan Alsawaf wrote: > On Wed, May 15, 2019 at 02:32:48PM -0400, Steven Rostedt wrote: > > I'm confused why you did this? > > Oleg said that debug_locks_off() could've been called and thus prevented > lockdep complaints about simple_lmk from appearing. To

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-05-15 Thread Sultan Alsawaf
On Wed, May 15, 2019 at 02:32:48PM -0400, Steven Rostedt wrote: > I'm confused why you did this? Oleg said that debug_locks_off() could've been called and thus prevented lockdep complaints about simple_lmk from appearing. To eliminate any possibility of that, I disabled debug_locks_off(). Oleg

Re: [PATCH] staging: erofs: drop unneeded -Wall addition

2019-05-15 Thread Chao Yu
On 2019/5/15 12:31, Masahiro Yamada wrote: > The top level Makefile adds -Wall globally: > > KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ > > I see two "-Wall" added for compiling objects in drivers/staging/erofs/. > > Signed-off-by: Masahiro Yamada

Re: [PATCH v3 1/4] staging: vchiq_2835_arm: revert "quit using custom down_interruptible()"

2019-05-15 Thread Stefan Wahren
On 09.05.19 16:31, Nicolas Saenz Julienne wrote: > The killable version of down() is meant to be used on situations where > it should not fail at all costs, but still have the convenience of being > able to kill it if really necessary. VCHIQ doesn't fit this criteria, as > it's mainly used as an

[PATCH] staging: vc04_services: prevent integer overflow in create_pagelist()

2019-05-15 Thread Dan Carpenter
The create_pagelist() "count" parameter comes from the user in vchiq_ioctl() and it could overflow. If you look at how create_page() is called in vchiq_prepare_bulk_data(), then the "size" variable is an int so it doesn't make sense to allow negatives or larger than INT_MAX. I don't know this

[PATCH] staging: wilc1000: Fix some double unlock bugs in wilc_wlan_cleanup()

2019-05-15 Thread Dan Carpenter
If ->hif_read_reg() or ->hif_write_reg() fail then the code unlocks and keeps executing. It should just return. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Dan Carpenter --- drivers/staging/wilc1000/wilc_wlan.c | 8 ++-- 1 file changed, 6

[PATCH] staging: kpc2000: double unlock in error handling in kpc_dma_transfer()

2019-05-15 Thread Dan Carpenter
The goto err_descr_too_many; calls unlock_engine() so this unlocks twice. Fixes: 7df95299b94a ("staging: kpc2000: Add DMA driver") Signed-off-by: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH] Staging: vc04_services: Fix kernel type 'u32' over 'uint32_t'

2019-05-15 Thread Stefan Wahren
Hi Madhumitha, On 14.05.19 18:02, Madhumitha Prabakaran wrote: > Fix the warning issued by checkpatch > Prefer kernel type 'u32' over 'uint32_t' grepping the sources within vc04_services shows a lot more occurences. I suggest to fix this style issue at least for the whole camera driver and name

[PATCH 1/5] staging: kpc2000: inverted conditional in order to reduce indentation.

2019-05-15 Thread Jeremy Sowden
Changed: for (...) { ... if (expr) { ... } } into: for (...) { ... if (!expr) continue; ... } in order to reduce indentation of conditional block. Fixed indentation of cases blocks at the same time. Signed-off-by: Jeremy Sowden ---

[PATCH 0/5] staging: kpc2000: assorted fixes

2019-05-15 Thread Jeremy Sowden
The first patch contains some white-space and formatting fixes that I made while I was looking at the following two TODO items: * the loop in kp2000_probe_cores() that uses probe_core_uio() also probably needs error handling. * probe_core_uio() probably needs error handling The second

[PATCH 4/5] staging: kpc2000: added missing clean-up to probe_core_uio.

2019-05-15 Thread Jeremy Sowden
On error, probe_core_uio just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c | 3

[PATCH 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Jeremy Sowden
Fixed the following two sparse warnings by using designated initializers: drivers/staging/kpc2000/kpc2000/cell_probe.c:101:34: warning: Using plain integer as NULL pointer drivers/staging/kpc2000/kpc2000/cell_probe.c:364:34: warning: Using plain integer as NULL pointer Signed-off-by:

[PATCH 2/5] staging: kpc2000: declare two functions as static.

2019-05-15 Thread Jeremy Sowden
Two functions were not used outside the translation-unit in which they were defined. Declared them static. Fixes two sparse warnings: drivers/staging/kpc2000/kpc2000/cell_probe.c:98:5: warning: symbol 'probe_core_basic' was not declared. Should it be static?

[PATCH 5/5] staging: kpc2000: clean up after probe failure.

2019-05-15 Thread Jeremy Sowden
On error, kp2000_probe_cores just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c |

Re: [PATCH] staging: Add rtl8821ce PCIe WiFi driver

2019-05-15 Thread Greg KH
On Wed, May 15, 2019 at 07:54:58PM +0800, Kai-Heng Feng wrote: > at 19:40, Greg KH wrote: > > > On Wed, May 15, 2019 at 07:24:01PM +0800, Kai-Heng Feng wrote: > > > The rtl8821ce can be found on many HP and Lenovo laptops. > > > Users have been using out-of-tree module for a while, > > > > > >

Re: [PATCH] staging: Add rtl8821ce PCIe WiFi driver

2019-05-15 Thread Kai-Heng Feng
at 20:33, Greg KH wrote: On Wed, May 15, 2019 at 07:54:58PM +0800, Kai-Heng Feng wrote: at 19:40, Greg KH wrote: On Wed, May 15, 2019 at 07:24:01PM +0800, Kai-Heng Feng wrote: The rtl8821ce can be found on many HP and Lenovo laptops. Users have been using out-of-tree module for a while,

Re: [PATCH v2 0/5] Fix checkpatch errors and warnings

2019-05-15 Thread Greg KH
On Tue, May 14, 2019 at 11:00:18PM +0530, Puranjay Mohan wrote: > This series fix the following errors/warnings: > > -Correct spelling mistakes. > -Replace NULL comparison. > -Add space around operators. > -Remove braces from single if statement. You should put the subsystem (staging) and driver

Re: [PATCH v2 1/5] staging: kpc2000: inverted conditional in order to reduce indentation.

2019-05-15 Thread Greg KH
On Wed, May 15, 2019 at 12:14:33PM +0100, Jeremy Sowden wrote: > Changed: > > for (...) { > ... > if (expr) { > ... > } > } > > into: > > for (...) { > ... > if (!expr) > continue; > ... > } > > in order to reduce indentation of conditional block.

Re: [PATCH v2 1/5] staging: kpc2000: inverted conditional in order to reduce indentation.

2019-05-15 Thread Jeremy Sowden
On 2019-05-15, at 15:14:51 +0200, Greg KH wrote: > On Wed, May 15, 2019 at 12:14:33PM +0100, Jeremy Sowden wrote: > > Changed: > > > > for (...) { > > ... > > if (expr) { > > ... > > } > > } > > > > into: > > > > for (...) { > > ... > > if (!expr) > >

Re: [PATCH 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Dan Carpenter
On Wed, May 15, 2019 at 02:09:49PM +0300, Dan Carpenter wrote: > On Wed, May 15, 2019 at 11:34:52AM +0100, Jeremy Sowden wrote: > > Fixed the following two sparse warnings by using designated > > initializers: > > > > drivers/staging/kpc2000/kpc2000/cell_probe.c:101:34: warning: Using plain >

Re: [PATCH] staging: Add rtl8821ce PCIe WiFi driver

2019-05-15 Thread Greg KH
On Wed, May 15, 2019 at 07:24:01PM +0800, Kai-Heng Feng wrote: > The rtl8821ce can be found on many HP and Lenovo laptops. > Users have been using out-of-tree module for a while, > > The new Realtek WiFi driver, rtw88, will support rtl8821ce in 2020 or > later. Where is that driver, and why is

Re: [PATCH 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Dan Carpenter
On Wed, May 15, 2019 at 11:34:52AM +0100, Jeremy Sowden wrote: > Fixed the following two sparse warnings by using designated > initializers: > > drivers/staging/kpc2000/kpc2000/cell_probe.c:101:34: warning: Using plain > integer as NULL pointer >

[PATCH v2 1/5] staging: kpc2000: inverted conditional in order to reduce indentation.

2019-05-15 Thread Jeremy Sowden
Changed: for (...) { ... if (expr) { ... } } into: for (...) { ... if (!expr) continue; ... } in order to reduce indentation of conditional block. Fixed indentation of cases blocks at the same time. Signed-off-by: Jeremy Sowden ---

[PATCH v2 0/5] staging: kpc2000: assorted fixes

2019-05-15 Thread Jeremy Sowden
The first patch contains some white-space and formatting fixes that I made while I was looking at the following two TODO items: * the loop in kp2000_probe_cores() that uses probe_core_uio() also probably needs error handling. * probe_core_uio() probably needs error handling The second

[PATCH v2 5/5] staging: kpc2000: clean up after probe failure.

2019-05-15 Thread Jeremy Sowden
On error, kp2000_probe_cores just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c |

[PATCH v2 2/5] staging: kpc2000: declare two functions as static.

2019-05-15 Thread Jeremy Sowden
Two functions were not used outside the translation-unit in which they were defined. Declared them static. Fixes two sparse warnings: drivers/staging/kpc2000/kpc2000/cell_probe.c:98:5: warning: symbol 'probe_core_basic' was not declared. Should it be static?

[PATCH v2 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Jeremy Sowden
Fixed the following two sparse warnings by using designated initializers: drivers/staging/kpc2000/kpc2000/cell_probe.c:101:34: warning: Using plain integer as NULL pointer drivers/staging/kpc2000/kpc2000/cell_probe.c:364:34: warning: Using plain integer as NULL pointer Signed-off-by:

[PATCH v2 4/5] staging: kpc2000: added missing clean-up to probe_core_uio.

2019-05-15 Thread Jeremy Sowden
On error, probe_core_uio just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c | 3

Re: [PATCH 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Jeremy Sowden
On 2019-05-15, at 14:11:53 +0300, Dan Carpenter wrote: > On Wed, May 15, 2019 at 02:09:49PM +0300, Dan Carpenter wrote: > > On Wed, May 15, 2019 at 11:34:52AM +0100, Jeremy Sowden wrote: > > > diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c > > >

Re: [PATCH v2 0/5] staging: kpc2000: assorted fixes

2019-05-15 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: Add rtl8821ce PCIe WiFi driver

2019-05-15 Thread Kai-Heng Feng
at 19:40, Greg KH wrote: On Wed, May 15, 2019 at 07:24:01PM +0800, Kai-Heng Feng wrote: The rtl8821ce can be found on many HP and Lenovo laptops. Users have been using out-of-tree module for a while, The new Realtek WiFi driver, rtw88, will support rtl8821ce in 2020 or later. Where is that