[PATCH v2] staging: olpc_dcon: Change fixed function names with "%s: ", __func__

2017-08-23 Thread Shurong Zhang
Replace hard-coded function names in strings with "%s", __func__ in the olpc_dcon.c file. Issue found by checkpatch.pl. Signed-off-by: Shurong Zhang --- drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/olpc_dcon/olpc_dcon.

[BUGFIX PATCH] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Gilad Ben-Yossef
The crypto API requires saving the last blocks of ciphertext in req->info for use as IV for CTS mode. The ccree driver was not doing this. This patch fixes that. The bug was manifested with cts(cbc(aes)) mode in tcrypt tests. Fixes: 302ef8ebb4b2 ("Add CryptoCell skcipher support") Signed-off-by:

Re: [BUGFIX PATCH] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Stephan Mueller
Am Mittwoch, 23. August 2017, 09:41:11 CEST schrieb Gilad Ben-Yossef: Hi Gilad, > > if (areq) { > + /* > + * The crypto API expects us to set the req->info to the last > + * ciphertext block. For encrypt, simply copy from the result. > + *

Re: [PATCH] staging: fsl-mc: move bus driver out of staging

2017-08-23 Thread Marc Zyngier
On 19/08/17 18:18, laurentiu.tu...@nxp.com wrote: > From: Stuart Yoder > > Move the source files out of staging into their final locations: > -include files in drivers/staging/fsl-mc/include go to include/linux/fsl > -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip > -source in drivers/

Re: [PATCH] staging: fsl-mc: move bus driver out of staging

2017-08-23 Thread Laurentiu Tudor
On 08/23/2017 04:39 AM, Greg KH wrote: > On Sat, Aug 19, 2017 at 08:18:12PM +0300, laurentiu.tu...@nxp.com wrote: >> From: Stuart Yoder >> >> Move the source files out of staging into their final locations: >>-include files in drivers/staging/fsl-mc/include go to include/linux/fsl >>-irq

Re: [BUGFIX PATCH] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Gilad Ben-Yossef
On Wed, Aug 23, 2017 at 10:47 AM, Stephan Mueller wrote: > Am Mittwoch, 23. August 2017, 09:41:11 CEST schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> >> if (areq) { >> + /* >> + * The crypto API expects us to set the req->info to the last >> + * ciphertext

[BUGFIX PATCH v2] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Gilad Ben-Yossef
The crypto API requires saving the last blocks of ciphertext in req->info for use as IV for CTS mode. The ccree driver was not doing this. This patch fixes that. The bug was manifested with cts(cbc(aes)) mode in tcrypt tests. Fixes: 302ef8ebb4b2 ("Add CryptoCell skcipher support") Signed-off-by:

[PATCH] staging:rtl8188eu:core Fix coding style Issues

2017-08-23 Thread Janani S
This patch solves the following warning shown by the checkpatch script WARNING: Comparisons should place the constants on the right side of the test Signed-off-by: Janani Sankara Babu --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [BUGFIX PATCH v2] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Stephan Mueller
Am Mittwoch, 23. August 2017, 11:12:05 CEST schrieb Gilad Ben-Yossef: Hi Gilad, > The crypto API requires saving the last blocks of ciphertext > in req->info for use as IV for CTS mode. The ccree driver > was not doing this. This patch fixes that. > > The bug was manifested with cts(cbc(aes)) mo

[RESEND PATCH] staging: fsl-mc: be consistent when checking strcmp() returns

2017-08-23 Thread laurentiu.tudor
From: Laurentiu Tudor Throughout the driver we use == 0 / != 0 to check strcmp() returns except this place, so fix it. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-mc/bus/dprc

Re: [BUGFIX PATCH v2] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Gilad Ben-Yossef
On Wed, Aug 23, 2017 at 1:03 PM, Stephan Mueller wrote: > Am Mittwoch, 23. August 2017, 11:12:05 CEST schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> The crypto API requires saving the last blocks of ciphertext >> in req->info for use as IV for CTS mode. The ccree driver >> was not doing this. This p

Re: [BUGFIX PATCH v2] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Stephan Mueller
Am Mittwoch, 23. August 2017, 12:47:36 CEST schrieb Gilad Ben-Yossef: Hi Gilad, > > Thank you for your persistence. It is appreciated :-) > > If I understood correctly what you are referring to than the buffer is not > allocated in this code path (unless I've missed something): Ah, that is what

Re: [PATCH v2] staging: olpc_dcon: Change fixed function names with "%s: ", __func__

2017-08-23 Thread Dan Carpenter
On Wed, Aug 23, 2017 at 03:31:46PM +0800, Shurong Zhang wrote: > Replace hard-coded function names in strings with "%s", __func__ > in the olpc_dcon.c file. Issue found by checkpatch.pl. > > Signed-off-by: Shurong Zhang > --- > drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- > 1 file changed, 1 i

[PATCH 2/3] staging: rtlwifi: add MAC80211 dependency

2017-08-23 Thread Arnd Bergmann
Like the version in drivers/net/wireless, this driver requires the MAC80211 framework, otherwise we run into a link error: ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined! ERROR: "cfg80211_unlink_bss" [drivers/staging/rtlwifi/r8822be.ko] undefined! ERROR: "ieee80211_be

[PATCH 3/3] staging: rtlwifi: simplify logical operation

2017-08-23 Thread Arnd Bergmann
gcc notices a very complicated way to check a value for being equal to one, and warns about it: drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c: In function 'halbtc8822b1ant_set_ext_ant_switch': drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: error: '~' on a boolean expression [-

Re: [PATCH] storvsc: do not assume SG list is continuous when doing bounce buffers (for 4.1 stable only)

2017-08-23 Thread Greg KH
On Tue, Aug 22, 2017 at 11:43:19PM -0700, Christoph Hellwig wrote: > Ok. If the stable maintainers are ok with your small fix > I'm not going to complain too loudly. But I'm always worried about > stable trees divering too much from mainline. Given that 90% of the time we do this, something brea

[PATCH][next] staging: r8822be: fix memory leak of eeprom_map on error exit return

2017-08-23 Thread Colin King
From: Colin Ian King A memory leak of eeprom_map occurs if the call to halmac_eeprom_parser_88xx fails. Fix this by kfree'ing it before returning. Detected by CoverityScan, CID#1454569 ("Resource leak") Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver") Signed-off-by: Coli

[PATCH] staging: r8822be: fix null pointer dereference with a null driver_adapter

2017-08-23 Thread Colin King
From: Colin Ian King The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null pointer deference on the null driver_adapter. Fix this by assigning driver_adapter earlier to halmac_adapter->driver_adapter before the tracing call so that a non-null driver_adapter is passed instead.

Re: [PATCH] storvsc: do not assume SG list is continuous when doing bounce buffers (for 4.1 stable only)

2017-08-23 Thread Martin K. Petersen
Christoph, > Ok. If the stable maintainers are ok with your small fix > I'm not going to complain too loudly. But I'm always worried about > stable trees divering too much from mainline. The seemingly innocuous transition from SG_GAPS to virt boundary has caused several data corruption regress

Re: [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency

2017-08-23 Thread Randy Dunlap
On 08/23/2017 06:22 AM, Arnd Bergmann wrote: > Like the version in drivers/net/wireless, this driver requires the > MAC80211 framework, otherwise we run into a link error: > > ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined! > ERROR: "cfg80211_unlink_bss" [drivers/stag

[PATCH v2 1/5] android: binder: Refactor prev and next buffer into a helper function

2017-08-23 Thread Sherry Yang
Use helper functions buffer_next and buffer_prev instead of list_entry to get the next and previous buffers. Signed-off-by: Sherry Yang --- drivers/android/binder_alloc.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/android/binder_alloc.c

[PATCH v2 2/5] android: binder: Add allocator selftest

2017-08-23 Thread Sherry Yang
binder_alloc_selftest tests that alloc_new_buf handles page allocation and deallocation properly when allocate and free buffers. The test allocates 5 buffers of various sizes to cover all possible page alignment cases, and frees the buffers using a list of exhaustive freeing order. Test: boot the

[PATCH v2 3/5] android: binder: Move buffer out of area shared with user space

2017-08-23 Thread Sherry Yang
Binder driver allocates buffer meta data in a region that is mapped in user space. These meta data contain pointers in the kernel. This patch allocates buffer meta data on the kernel heap that is not mapped in user space, and uses a pointer to refer to the data mapped. Signed-off-by: Sherry Yang

[PATCH v2 5/5] android: binder: Add shrinker tracepoints

2017-08-23 Thread Sherry Yang
Add tracepoints in binder transaction allocator to record lru hits and alloc/free page. Signed-off-by: Sherry Yang --- drivers/android/binder_alloc.c | 27 +++-- drivers/android/binder_trace.h | 55 ++ 2 files changed, 80 insertions(+), 2 d

[PATCH v2 4/5] android: binder: Add global lru shrinker to binder

2017-08-23 Thread Sherry Yang
Hold on to the pages allocated and mapped for transaction buffers until the system is under memory pressure. When that happens, use linux shrinker to free pages. Without using shrinker, patch "android: binder: Move buffer out of area shared with user space" will cause a significant slow down for sm

[PATCH v2 0/5] android: binder: move allocator metadata and add shrinker

2017-08-23 Thread Sherry Yang
This patch set moves internal kernel data in the binder driver out of mmap regions that is readable by user space. A shrinker is added to the driver to dynamically manage the memory used by binder transactions and only free pages when the system is under memory pressure. This patch set also adds te

Re: [PATCH] binder: let ANDROID_BINDER_IPC_32BIT be selectable on 32bit ARM

2017-08-23 Thread Rob Herring
On Tue, Aug 22, 2017 at 9:57 PM, John Stultz wrote: > On Tue, Aug 22, 2017 at 7:56 PM, John Stultz wrote: >> On Tue, Aug 22, 2017 at 7:34 PM, Jisheng Zhang wrote: >>> On Tue, 22 Aug 2017 18:51:08 -0700 Greg KH wrote: >>> On Tue, Aug 08, 2017 at 07:03:05PM +0800, Jisheng Zhang wrote: >

[PATCH] Staging: comedi: comedi_fops: fix dev_err() warning style

2017-08-23 Thread Bryan Garza
Changed dev_err() call to use function name constant instead of hardcoded string. Issue found by checkpatch. Signed-off-by: Bryan Garza --- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/sta

Re: [PATCH 2/2] staging: android: ion: Change argument to kmalloc (checkpatch)

2017-08-23 Thread Greg KH
On Wed, Aug 23, 2017 at 12:48:29PM -0400, Nick Fox wrote: > Apologies for the spam, but I think my last reply got rejected by Google for > some reason and didn't get delivered to the linux-kernel mailing list. My > original reply is below: You can not send html email to vger.kernel.org, it will be

Re: [PATCH v2 1/5] android: binder: Refactor prev and next buffer into a helper function

2017-08-23 Thread Greg Kroah-Hartman
On Wed, Aug 23, 2017 at 08:46:39AM -0700, Sherry Yang wrote: > Use helper functions buffer_next and buffer_prev instead > of list_entry to get the next and previous buffers. > > Signed-off-by: Sherry Yang > --- > drivers/android/binder_alloc.c | 24 +++- > 1 file changed, 15

Re: [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency

2017-08-23 Thread Greg Kroah-Hartman
On Wed, Aug 23, 2017 at 08:44:46AM -0700, Randy Dunlap wrote: > On 08/23/2017 06:22 AM, Arnd Bergmann wrote: > > Like the version in drivers/net/wireless, this driver requires the > > MAC80211 framework, otherwise we run into a link error: > > > > ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtl

Re: [PATCH] staging:rtl8188eu:core Fix coding style Issues

2017-08-23 Thread Greg KH
On Wed, Aug 23, 2017 at 02:45:51PM +0530, Janani S wrote: > This patch solves the following warning shown by the checkpatch script > WARNING: Comparisons should place the constants on the right side of > the test > > Signed-off-by: Janani Sankara Babu Your "From:" line does not match this :( _

Re: [PATCH v2] staging: olpc_dcon: Change fixed function names with "%s: ", __func__

2017-08-23 Thread Greg Kroah-Hartman
On Wed, Aug 23, 2017 at 03:31:46PM +0800, Shurong Zhang wrote: > Replace hard-coded function names in strings with "%s", __func__ > in the olpc_dcon.c file. Issue found by checkpatch.pl. > > Signed-off-by: Shurong Zhang > --- > drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- > 1 file changed, 1 i

Re: [PATCH] staging: lustre: obd: check for allocation failure

2017-08-23 Thread Greg Kroah-Hartman
On Wed, Aug 23, 2017 at 09:51:31AM +0300, Dan Carpenter wrote: > lustre_cfg_new() can fail with ERR_PTR(-ENOMEM) so we should check for > that. > > Fixes: d7e09d0397e8 ("staging: add Lustre file system client support") > Signed-off-by: Dan Carpenter > > diff --git a/drivers/staging/lustre/lustre

Re: [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency

2017-08-23 Thread Greg Kroah-Hartman
On Wed, Aug 23, 2017 at 04:19:08PM -0700, Greg Kroah-Hartman wrote: > On Wed, Aug 23, 2017 at 08:44:46AM -0700, Randy Dunlap wrote: > > On 08/23/2017 06:22 AM, Arnd Bergmann wrote: > > > Like the version in drivers/net/wireless, this driver requires the > > > MAC80211 framework, otherwise we run in

Re: [PATCH] binder: let ANDROID_BINDER_IPC_32BIT be selectable on 32bit ARM

2017-08-23 Thread Jisheng Zhang
On Wed, 23 Aug 2017 13:48:47 -0500 Rob Herring wrote: > On Tue, Aug 22, 2017 at 9:57 PM, John Stultz wrote: > > On Tue, Aug 22, 2017 at 7:56 PM, John Stultz > > wrote: > >> On Tue, Aug 22, 2017 at 7:34 PM, Jisheng Zhang > >> wrote: > >>> On Tue, 22 Aug 2017 18:51:08 -0700 Greg KH wrote: >

[PATCH v2] binder: allow ANDROID_BINDER_IPC_32BIT to be unselected on 32bit ARM

2017-08-23 Thread Jisheng Zhang
As noted in commit d0bdff0db809 ("staging: Fix build issues with new binder API"), we can add back the choice for 32bit ARM "once a 64bit __get_user_asm_* implementation is merged." Commit e38361d032f1 ("ARM: 8091/2: add get_user() support for 8 byte types") has added the support, so it's time to a

[PATCH v3] staging: olpc_dcon: remove pointless debug printk in dcon_freeze_store()

2017-08-23 Thread Shurong Zhang
This printk doesn't really add anything worthwhile. Signed-off-by: Shurong Zhang --- drivers/staging/olpc_dcon/olpc_dcon.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index f7f3a78..f9d9465 100644 --- a/drivers