Re: [PATCH v2 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-13 Thread Christophe Leroy
Le 14/04/2020 à 00:28, Waiman Long a écrit : Since kfree_sensitive() will do an implicit memzero_explicit(), there is no need to call memzero_explicit() before it. Eliminate those memzero_explicit() and simplify the call sites. For better correctness, the setting of keylen is also moved down af

[staging:staging-linus] BUILD SUCCESS ed87d33ddbcd9a1c3b5ae87995da34e6f51a862c

2020-04-13 Thread kbuild test robot
generic-64bit_defconfig x86_64 randconfig-a001-20200413 x86_64 randconfig-a002-20200413 x86_64 randconfig-a003-20200413 i386 randconfig-a001-20200413 i386 randconfig-a002-20200413 i386 randconfig-a003-20200413

[PATCH v2 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-13 Thread Waiman Long
Since kfree_sensitive() will do an implicit memzero_explicit(), there is no need to call memzero_explicit() before it. Eliminate those memzero_explicit() and simplify the call sites. For better correctness, the setting of keylen is also moved down after the key pointer check. Signed-off-by: Waiman

[PATCH] staging: rtl8712: correct spelling mistake in comment

2020-04-13 Thread Michael Straube
Correct a spelling mistake discovered by checkpatch. attatch -> attach Signed-off-by: Michael Straube --- drivers/staging/rtl8712/usb_halinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/usb_halinit.c b/drivers/staging/rtl8712/usb_halinit.c index

Re: [PATCH 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-13 Thread Waiman Long
On 4/13/20 5:31 PM, Joe Perches wrote: > On Mon, 2020-04-13 at 17:15 -0400, Waiman Long wrote: >> Since kfree_sensitive() will do an implicit memzero_explicit(), there >> is no need to call memzero_explicit() before it. Eliminate those >> memzero_explicit() and simplify the call sites. > 2 bits of

Re: [PATCH 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-13 Thread Joe Perches
On Mon, 2020-04-13 at 17:15 -0400, Waiman Long wrote: > Since kfree_sensitive() will do an implicit memzero_explicit(), there > is no need to call memzero_explicit() before it. Eliminate those > memzero_explicit() and simplify the call sites. 2 bits of trivia: > diff --git a/drivers/crypto/allwin

[PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()

2020-04-13 Thread Waiman Long
As said by Linus: A symmetric naming is only helpful if it implies symmetries in use. Otherwise it's actively misleading. In "kzalloc()", the z is meaningful and an important part of what the caller wants. In "kzfree()", the z is actively detrimental, because maybe in the future we r

[PATCH 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-13 Thread Waiman Long
Since kfree_sensitive() will do an implicit memzero_explicit(), there is no need to call memzero_explicit() before it. Eliminate those memzero_explicit() and simplify the call sites. Signed-off-by: Waiman Long --- .../crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 15 +++ .../crypto/

[PATCH 0/2] mm, treewide: Rename kzfree() to kfree_sensitive()

2020-04-13 Thread Waiman Long
This patchset makes a global rename of the kzfree() to kfree_sensitive() to highlight the fact buffer clearing is only needed if the data objects contain sensitive information like encrpytion key. The fact that kzfree() uses memset() to do the clearing isn't totally safe either as compiler may comp

[staging:staging-testing] BUILD SUCCESS ce920326663b3df22c94ade99a8b234baa6ccaa5

2020-04-13 Thread kbuild test robot
-64bit_defconfig parisc allyesconfig x86_64 randconfig-a001-20200413 x86_64 randconfig-a002-20200413 x86_64 randconfig-a003-20200413 i386 randconfig-a001-20200413 i386 randconfig-a002-20200413 i386

[PATCH 1/3] staging: rtl8188eu: rename define to upper case

2020-04-13 Thread Michael Straube
Rename 'FWDL_ChkSum_rpt' to 'FWDL_CHKSUM_RPT' as defines are normaly named all upper case. Also clears a camel case checkpatch warning. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/fw.c| 4 ++-- drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 2 +- 2 files

[PATCH 3/3] staging: rtl8188eu: make const char array static

2020-04-13 Thread Michael Straube
Make const char array 'fw_name' static. Clears a checkpatch warning and reduces object file size by 17 bytes (gcc 9.3.1 x86_64). WARNING: const array should probably be static const Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH 0/3] staging: rtl8188eu: checkpatch cleanups in hal/fw.c

2020-04-13 Thread Michael Straube
This series clears the last remaining checkpatch issues in the file hal/fw.c. Michael Straube (3): staging: rtl8188eu: rename define to upper case staging: rtl8188eu: cleanup long line in fw.c staging: rtl8188eu: make const char array static drivers/staging/rtl8188eu/hal/fw.c

[PATCH 2/3] staging: rtl8188eu: cleanup long line in fw.c

2020-04-13 Thread Michael Straube
Add line break to avoid line length over 80 characters. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/fw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index dbf7883f9ed7..432e6be

[PATCH] staging: vc04_services: bcm2835-audio: Make function arguments alignment match open parenthesis

2020-04-13 Thread R Veera Kumar
Make function arguments alignment match open parenthesis. Found using checkpatch.pl. Signed-off-by: R Veera Kumar --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2

[PATCH] staging: sm750fb: Make function arguments alignment match open parenthesis

2020-04-13 Thread R Veera Kumar
Make function arguments alignment match open parenthesis. Found using checkpatch.pl. Signed-off-by: R Veera Kumar --- drivers/staging/sm750fb/sm750.h| 23 +-- drivers/staging/sm750fb/sm750_hw.c | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/driv

[driver-core:debugfs_remove_return_value] BUILD SUCCESS d8691ced73b1fb17a5308bd4e5c4fc73e9ed7e95

2020-04-13 Thread kbuild test robot
64r6el_defconfig mips allnoconfig mips 32r2_defconfig mips allmodconfig pariscgeneric-64bit_defconfig parisc allyesconfig i386 randconfig-a002-20200413 x86_64

[PATCH 3/3] staging: mt7621-pci: initialize 'n' variable when it is declared

2020-04-13 Thread Sergio Paracuellos
Variable 'n' in 'mt7621_pcie_init_virtual_bridges' function can be directly initialized when it is declared instead of doing it before using it first. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 1/3] staging: mt7621-pci: rename 'PCIE_P2P_MAX' into 'PCIE_P2P_CNT'

2020-04-13 Thread Sergio Paracuellos
Definition 'PCIE_P2P_MAX' is '3'. The value here is not a MAXimum. It is a count or a number. It is how many masks there are. The masks are numbered 0, 1, 2 so the maximum is 2. Hence rename variable into 'PCIE_P2P_CNT' which is a more accurate name. Suggested-by: NeilBrown Signed-off-by: Sergio

[PATCH 2/3] staging: mt7621-pci: add clarification comment in 'mt7621_pcie_init_virtual_bridges'

2020-04-13 Thread Sergio Paracuellos
Add a comment explaining a bit what is going on in this function. It would be helfulp for other people for a better understanding of the code. Suggested-by: NeilBrown Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 5 + 1 file changed, 5 insertions(+) diff -

Re: [PATCH 1/2] staging: rtl8192u: Refactoring setKey function

2020-04-13 Thread Joe Perches
On Mon, 2020-04-13 at 14:50 +0200, Greg KH wrote: > On Mon, Apr 13, 2020 at 03:01:28AM +, Camylla Goncalves Cantanheide wrote: > > Changes of the local variable value and > > modification in the seletive repetition structure. [] > > diff --git a/drivers/staging/rtl8192u/r8192U_core.c > > b/dri

[staging:staging-next] BUILD SUCCESS 73a6e90041ce80d5683f62bee0eaf7226ce73392

2020-04-13 Thread kbuild test robot
allmodconfig parisc allyesconfig x86_64 randconfig-a001-20200413 x86_64 randconfig-a002-20200413 x86_64 randconfig-a003-20200413 i386 randconfig-a001-20200413 i386 randconfig-a002-20200413 i386

Re: [PATCH v2 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-13 Thread Oscar Carter
On Mon, Apr 13, 2020 at 04:32:58PM +0200, Greg Kroah-Hartman wrote: > On Mon, Apr 13, 2020 at 04:25:17PM +0200, Oscar Carter wrote: > > On Mon, Apr 13, 2020 at 02:56:16PM +0200, Greg Kroah-Hartman wrote: > > > On Sat, Apr 11, 2020 at 02:26:09PM +0200, Oscar Carter wrote: > > > > Create a constant a

Re: [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate

2020-04-13 Thread Oscar Carter
On Mon, Apr 13, 2020 at 04:29:07PM +0200, Greg Kroah-Hartman wrote: > On Mon, Apr 13, 2020 at 04:13:15PM +0200, Oscar Carter wrote: > > On Mon, Apr 13, 2020 at 02:56:33PM +0200, Greg Kroah-Hartman wrote: > > > On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote: > > > > Use the define RATE

Re: [PATCH v2 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-13 Thread Greg Kroah-Hartman
On Mon, Apr 13, 2020 at 04:25:17PM +0200, Oscar Carter wrote: > On Mon, Apr 13, 2020 at 02:56:16PM +0200, Greg Kroah-Hartman wrote: > > On Sat, Apr 11, 2020 at 02:26:09PM +0200, Oscar Carter wrote: > > > Create a constant array with the values of the "phy->signal" for every > > > rate. Remove all "

Re: [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate

2020-04-13 Thread Greg Kroah-Hartman
On Mon, Apr 13, 2020 at 04:13:15PM +0200, Oscar Carter wrote: > On Mon, Apr 13, 2020 at 02:56:33PM +0200, Greg Kroah-Hartman wrote: > > On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote: > > > Use the define RATE_11M present in the file "device.h" instead of the > > > magic number 3. So

Re: [PATCH v2 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-13 Thread Oscar Carter
On Mon, Apr 13, 2020 at 02:56:16PM +0200, Greg Kroah-Hartman wrote: > On Sat, Apr 11, 2020 at 02:26:09PM +0200, Oscar Carter wrote: > > Create a constant array with the values of the "phy->signal" for every > > rate. Remove all "phy->signal" assignments inside the switch statement > > and replace t

Re: [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate

2020-04-13 Thread Oscar Carter
On Mon, Apr 13, 2020 at 02:56:33PM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote: > > Use the define RATE_11M present in the file "device.h" instead of the > > magic number 3. So the code is more clear. > > > > Reviewed-by: Dan Carpenter > > Signed

[RFC] staging: vt6656: Add formula to the vnt_rf_addpower function

2020-04-13 Thread Oscar Carter
Use a formula to calculate the return value of the vnt_rf_addpower function instead of the "if" statement with literal values for every case. Signed-off-by: Oscar Carter --- What is the better approach for this function ? Leave it as is or use a formula although it is less clear. I prefer the fo

Re: [PATCH] staging: vt6656: Return error code in vnt_rf_write_embedded function

2020-04-13 Thread Greg Kroah-Hartman
On Mon, Apr 13, 2020 at 12:19:31PM +0200, Oscar Carter wrote: > Use the error code returned by the vnt_control_out function as the > returned value of the vnt_rf_write_embedded function instead of a > boolean value. > > Then, fix all vnt_rf_write_embedded calls removing the "and" operations > and

Re: [PATCH] staging: vt6656: Use BIT() macro instead of bit shift operator

2020-04-13 Thread Greg Kroah-Hartman
On Sun, Apr 12, 2020 at 11:33:11AM +0200, Oscar Carter wrote: > Use the BIT() macro instead of the bit left shift operator. So the code > is more clear. > > It's safe to remove the casting to u16 type because the value obtained > never exceeds 16 bits. So the casting is unnecessary. > > Signed-of

Re: [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate

2020-04-13 Thread Greg Kroah-Hartman
On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote: > Use the define RATE_11M present in the file "device.h" instead of the > magic number 3. So the code is more clear. > > Reviewed-by: Dan Carpenter > Signed-off-by: Oscar Carter > --- > drivers/staging/vt6656/baseband.c | 3 ++- > 1

Re: [PATCH v2 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-13 Thread Greg Kroah-Hartman
On Sat, Apr 11, 2020 at 02:26:09PM +0200, Oscar Carter wrote: > Create a constant array with the values of the "phy->signal" for every > rate. Remove all "phy->signal" assignments inside the switch statement > and replace these with a single reading from the new vnt_phy_signal > array. > > The con

Re: [PATCH] Staging: comedi: drivers: jr3_pci: fixed two warnings

2020-04-13 Thread Greg KH
On Sun, Apr 12, 2020 at 04:25:08PM +0200, carlosteniswarr...@gmail.com wrote: > Fixed two checkpatch warnings. > > Signed-off-by: Carlos Guerrero Alvarez > --- > drivers/staging/comedi/drivers/jr3_pci.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging

Re: [PATCH] Staging: Comedi: Drivers: das08: Fixed some coding style issues

2020-04-13 Thread Greg KH
On Mon, Apr 13, 2020 at 10:05:55AM +0200, carlosteniswarr...@gmail.com wrote: > Fixed a coding style issue caused by some declarations that weren't separated. > > Signed-off-by: Carlos Guerrero Alvarez Your From: line in your email client does not match with this :( > --- > drivers/staging/com

Re: [PATCH 2/2] staging: rtl8192u: Renames variables in setKey function

2020-04-13 Thread Greg KH
On Mon, Apr 13, 2020 at 03:01:29AM +, Camylla Goncalves Cantanheide wrote: > Renames the local variables of the setKey > function, making them explicit. Why do this? > > Signed-off-by: Camylla Goncalves Cantanheide > --- > drivers/staging/rtl8192u/r8192U_core.c | 48 +--

Re: [PATCH 1/2] staging: rtl8192u: Refactoring setKey function

2020-04-13 Thread Greg KH
On Mon, Apr 13, 2020 at 03:01:28AM +, Camylla Goncalves Cantanheide wrote: > Changes of the local variable value and > modification in the seletive repetition structure. > > Signed-off-by: Camylla Goncalves Cantanheide > --- > drivers/staging/rtl8192u/r8192U_core.c | 52 -

[PATCH] staging: vt6656: Return error code in vnt_rf_write_embedded function

2020-04-13 Thread Oscar Carter
Use the error code returned by the vnt_control_out function as the returned value of the vnt_rf_write_embedded function instead of a boolean value. Then, fix all vnt_rf_write_embedded calls removing the "and" operations and replace with a direct assignment to the ret variable and add a check condi

[PATCH] Staging: Comedi: Drivers: das08: Fixed some coding style issues

2020-04-13 Thread carlosteniswarrior
Fixed a coding style issue caused by some declarations that weren't separated. Signed-off-by: Carlos Guerrero Alvarez --- drivers/staging/comedi/drivers/das08.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c

Re: [PATCH] binderfs: Fix binderfs.c selftest compilation warning

2020-04-13 Thread Tang Bin
Hi greg: On 2020/4/12 15:46, Greg KH wrote: On Sat, Apr 11, 2020 at 10:51:51PM +0800, Tang Bin wrote: Fix missing braces compilation warning in the ARM compiler environment: drivers/android/binderfs.c: In function 'binderfs_fill_super': drivers/android/binderfs.c:650:9: warning: missi

Re: [PATCH] binderfs: Fix binderfs.c selftest compilation warning

2020-04-13 Thread Greg KH
On Sat, Apr 11, 2020 at 10:51:51PM +0800, Tang Bin wrote: > Fix missing braces compilation warning in the ARM > compiler environment: > drivers/android/binderfs.c: In function 'binderfs_fill_super': > drivers/android/binderfs.c:650:9: warning: missing braces around > initializer [-Wmissing