[PATCH] Staging: fbtft : fbtft-bus: fixed two checkpatch errors

2020-04-14 Thread carlosteniswarrior
From: Carlos Guerrero Álvarez Fixed two checkpatch space prohibited before that close parenthesis errors. Signed-off-by: Carlos Guerrero Álvarez --- drivers/staging/fbtft/fbtft-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/dr

Re: [PATCH] Staging: fbtft : fbtft-bus: fixed two checkpatch errors

2020-04-14 Thread Greg KH
On Tue, Apr 14, 2020 at 09:30:47AM +0200, carlosteniswarr...@gmail.com wrote: > From: Carlos Guerrero Álvarez > > Fixed two checkpatch space prohibited before that close parenthesis errors. > > Signed-off-by: Carlos Guerrero Álvarez > --- > drivers/staging/fbtft/fbtft-bus.c | 4 ++-- > 1 file

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

2020-04-14 Thread Jason A. Donenfeld
On 4/13/20 3:15 PM, Waiman Long wrote: 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 d

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

2020-04-14 Thread Michal Hocko
On Mon 13-04-20 17:15:49, Waiman Long wrote: > 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()", th

Re: [PATCH] taging: android: ashmem: Declared const key

2020-04-14 Thread Dan Carpenter
On Sun, Apr 12, 2020 at 12:59:56AM +0530, MugilRaj wrote: > From: mugil2301 <110117...@nitt.edu> ^ 1) Real name. 2) Add a commit message. > > Signed-off-by: mugil2301 <110117...@nitt.edu> ^ 3) Real name here as well. > --- > drivers/staging/android/ashm

[staging:staging-next 127/127] drivers/staging/wfx/bh.c:88:32: sparse: warning: restricted __le16 degrades to integer

2020-04-14 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next head: ce920326663b3df22c94ade99a8b234baa6ccaa5 commit: ce920326663b3df22c94ade99a8b234baa6ccaa5 [127/127] staging: vt6656: formulate rspinf values into tables reproduce: # apt-get install sparse

Re: [staging:staging-next 127/127] drivers/staging/wfx/bh.c:88:32: sparse: warning: restricted __le16 degrades to integer

2020-04-14 Thread Greg Kroah-Hartman
On Tue, Apr 14, 2020 at 05:55:15PM +0800, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > staging-next > head: ce920326663b3df22c94ade99a8b234baa6ccaa5 > commit: ce920326663b3df22c94ade99a8b234baa6ccaa5 [127/127] staging: vt6656: > formula

Re: [PATCH] staging: vc04_services: remove set but not used 'local_entity_uc'

2020-04-14 Thread Nicolas Saenz Julienne
On Thu, 2020-04-09 at 16:53 +0800, Jason Yan wrote: > Fix the following gcc warning: > > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:2356:16: > warning: variable ‘local_entity_uc’ set but not used > [-Wunused-but-set-variable] > int local_uc, local_entity_uc; >

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

2020-04-14 Thread Nicolas Saenz Julienne
On Mon, 2020-04-13 at 22:29 +0530, R Veera Kumar wrote: > Make function arguments alignment match open parenthesis. > Found using checkpatch.pl. > > Signed-off-by: R Veera Kumar > --- Reviewed-by: Nicolas Saenz Julienne Thanks, Nicolas signature.asc Description: This is a digitally signed m

[PATCH] staging: vt6656: Power save stop wake_up_count wrap around.

2020-04-14 Thread Malcolm Priestley
conf.listen_interval can sometimes be zero causing wake_up_count to wrap around up to many beacons too late causing CTRL-EVENT-BEACON-LOSS as in. wpa_supplicant[795]: message repeated 45 times: [..CTRL-EVENT-BEACON-LOSS ] Fixes: 43c93d9bf5e2 ("staging: vt6656: implement power saving code.") Cc: s

Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-14 Thread Dan Carpenter
On Sun, Apr 12, 2020 at 04:34:08PM +0300, Ivan Safonov wrote: > > Remove function rtw_modular64 as all it does is call do_div. > > This is wrong. Macro do_div(x, y) change first argument x, but > rtw_modular64(x, y) preserve it. > > > + tsf = pmlmeext->TSFValue - do_div(pmlmeext

Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-14 Thread Ivan Safonov
On 4/14/20 2:56 PM, Dan Carpenter wrote: On Sun, Apr 12, 2020 at 04:34:08PM +0300, Ivan Safonov wrote: Remove function rtw_modular64 as all it does is call do_div. This is wrong. Macro do_div(x, y) change first argument x, but rtw_modular64(x, y) preserve it. + tsf = pm

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

2020-04-14 Thread Dan Carpenter
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. > This changelog isn't totally clear why you're doing this. Just say: "I am refactorying setKey() to make it more clear.

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

2020-04-14 Thread David Sterba
On Mon, Apr 13, 2020 at 05:15:49PM -0400, Waiman Long wrote: > fs/btrfs/ioctl.c | 2 +- > diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c > index 40b729dce91c..eab3f8510426 100644 > --- a/fs/btrfs/ioctl.c > +++ b/fs/btrfs/ioctl.c > @@ -2691,7 +2691,7 @@ static int b

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

2020-04-14 Thread David Howells
Waiman Long wrote: > 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 detrimen

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

2020-04-14 Thread Dan Carpenter
On Mon, Apr 13, 2020 at 04:02:09PM +0200, Oscar Carter wrote: > diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c > index 4f9aba0f21b0..3b200d7290a5 100644 > --- a/drivers/staging/vt6656/rf.c > +++ b/drivers/staging/vt6656/rf.c > @@ -575,28 +575,14 @@ int vnt_rf_setpower(struct

Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-14 Thread Dan Carpenter
On Tue, Apr 14, 2020 at 03:22:59PM +0300, Ivan Safonov wrote: > On 4/14/20 2:56 PM, Dan Carpenter wrote: > > On Sun, Apr 12, 2020 at 04:34:08PM +0300, Ivan Safonov wrote: > > > > Remove function rtw_modular64 as all it does is call do_div. > > > > > > This is wrong. Macro do_div(x, y) change first

[PATCH] staging: android: ion: Skip sync if not mapped

2020-04-14 Thread Ørjan Eide
Only sync the sg-list of an Ion dma-buf attachment when the attachment is actually mapped on the device. dma-bufs may be synced at any time. It can be reached from user space via DMA_BUF_IOCTL_SYNC, so there are no guarantees from callers on when syncs may be attempted, and dma_buf_end_cpu_access(

Re: [PATCH] staging: android: ion: Skip sync if not mapped

2020-04-14 Thread Greg Kroah-Hartman
On Tue, Apr 14, 2020 at 03:46:27PM +0200, Ørjan Eide wrote: > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any ot

Re: [PATCH] staging: android: ion: Skip sync if not mapped

2020-04-14 Thread Greg Kroah-Hartman
On Tue, Apr 14, 2020 at 04:18:47PM +0200, Ørjan Eide wrote: > Only sync the sg-list of an Ion dma-buf attachment when the attachment > is actually mapped on the device. > > dma-bufs may be synced at any time. It can be reached from user space > via DMA_BUF_IOCTL_SYNC, so there are no guarantees fr

[PATCH][next] staging: vt6656: remove redundant assignment to variable ed_inx

2020-04-14 Thread Colin King
From: Colin Ian King The variable ed_inx is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/vt6656/baseba

[PATCH 5/5] staging: vt6656: Remove duplicate code for the phy->service assignment

2020-04-14 Thread Oscar Carter
Take out the "phy->service" assignment from the if-else statement due to it's the same for the two branches. Signed-off-by: Oscar Carter --- drivers/staging/vt6656/baseband.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/stagin

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

2020-04-14 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 2/5] staging: vt6656: Use BIT() macro instead of bit shift operator

2020-04-14 Thread Oscar Carter
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-off-by: Oscar Carter --- drivers/staging/vt6656/card.c | 4 ++-- 1 file chan

[PATCH 3/5] staging: vt6656: Use define instead of magic number for tx_rate

2020-04-14 Thread Oscar Carter
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 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6

[PATCH 4/5] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-14 Thread Oscar Carter
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 constant array can be of one dimension because the OR mask with BIT(3) or BIT

[PATCH 0/5] staging: vt6656: Rebase all rejected patches

2020-04-14 Thread Oscar Carter
This patch series makes a "rebase" of all the patches that were previously rejected because they did not apply. The first patch uses 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. This way, the return

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

2020-04-14 Thread Joe Perches
On Tue, 2020-04-14 at 15:33 +0300, Dan Carpenter 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. > > > > This changelog isn't totally clear why you're doing t

Re: [PATCH] staging: android: ion: Skip sync if not mapped

2020-04-14 Thread Ørjan Eide
On Tue, Apr 14, 2020 at 04:28:10PM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 14, 2020 at 04:18:47PM +0200, �rjan Eide wrote: > > Only sync the sg-list of an Ion dma-buf attachment when the attachment > > is actually mapped on the device. > > > > dma-bufs may be synced at any time. It can be

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

2020-04-14 Thread Waiman Long
On 4/14/20 2:08 AM, Christophe Leroy wrote: > > > 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 c

[PATCH] staging: android: ion: Skip sync if not mapped

2020-04-14 Thread Ørjan Eide
Only sync the sg-list of an Ion dma-buf attachment when the attachment is actually mapped on the device. dma-bufs may be synced at any time. It can be reached from user space via DMA_BUF_IOCTL_SYNC, so there are no guarantees from callers on when syncs may be attempted, and dma_buf_end_cpu_access(

Re: [PATCH v2 5/9] dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0 bindings out of staging

2020-04-14 Thread Rob Herring
On Fri, 3 Apr 2020 13:15:34 -0300, Helen Koike wrote: > Move phy-rockchip-dphy-rx0 bindings to Documentation/devicetree/bindings/phy > > Verified with: > make ARCH=arm64 dt_binding_check > DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml > > Signed-off-by: Helen

Re: [PATCH v2 6/9] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

2020-04-14 Thread Rob Herring
On Fri, 3 Apr 2020 13:15:35 -0300, Helen Koike wrote: > Move rkisp1 bindings to Documentation/devicetree/bindings/media > > Verified with: > make ARCH=arm64 dt_binding_check > DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml > > Signed-off-by: Helen Koike > --- > > V

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

2020-04-14 Thread Waiman Long
On 4/14/20 8:48 AM, David Sterba wrote: > On Mon, Apr 13, 2020 at 05:15:49PM -0400, Waiman Long wrote: >> fs/btrfs/ioctl.c | 2 +- > >> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c >> index 40b729dce91c..eab3f8510426 100644 >> --- a/fs/btrfs/ioctl.c >> +++ b/fs/btr

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

2020-04-14 Thread Dan Carpenter
On Tue, Apr 14, 2020 at 09:01:18AM -0700, Joe Perches wrote: > On Tue, 2020-04-14 at 15:33 +0300, Dan Carpenter wrote: > > On Mon, Apr 13, 2020 at 03:01:28AM +, Camylla Goncalves Cantanheide > > wrote: > > > + > > > + for (i = 2; i < CAM_CONTENT_COUNT; i++) { > > > + write_nic_dword(de

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

2020-04-14 Thread Michal Suchánek
On Tue, Apr 14, 2020 at 12:24:36PM -0400, Waiman Long wrote: > On 4/14/20 2:08 AM, Christophe Leroy wrote: > > > > > > 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. Elimin

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

2020-04-14 Thread Waiman Long
On 4/14/20 3:16 PM, Michal Suchánek wrote: > On Tue, Apr 14, 2020 at 12:24:36PM -0400, Waiman Long wrote: >> On 4/14/20 2:08 AM, Christophe Leroy wrote: >>> >>> Le 14/04/2020 à 00:28, Waiman Long a écrit : Since kfree_sensitive() will do an implicit memzero_explicit(), there is no need to

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

2020-04-14 Thread Joe Perches
On Tue, 2020-04-14 at 15:37 -0400, Waiman Long wrote: > OK, I can change it to clear the key length when the allocation failed > which isn't likely. Perhaps: kfree_sensitive(op->key); op->key = NULL; op->keylen = 0; but I don't know that it impacts any possible state.

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

2020-04-14 Thread Joe Perches
On Tue, 2020-04-14 at 22:18 -0300, Camylla Cantanheide wrote: > Em ter., 14 de abr. de 2020 às 09:35, Dan Carpenter < > dan.carpen...@oracle.com> escreveu: [] > > > diff --git a/drivers/staging/rtl8192u/r8192U_core.c [] > > > + target_content = macaddr[0] << 16 | > > > + ma

Re: [PATCH] staging: android: ion: Skip sync if not mapped

2020-04-14 Thread John Stultz
On Tue, Apr 14, 2020 at 7:28 AM Greg Kroah-Hartman wrote: > > On Tue, Apr 14, 2020 at 04:18:47PM +0200, Ørjan Eide wrote: > > Only sync the sg-list of an Ion dma-buf attachment when the attachment > > is actually mapped on the device. > > > > dma-bufs may be synced at any time. It can be reached f

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

2020-04-14 Thread Johannes Weiner
On Mon, Apr 13, 2020 at 05:15:49PM -0400, Waiman Long wrote: > As said by Linus: > > A symmetric naming is only helpful if it implies symmetries in use. > Otherwise it's actively misleading. As the btrfs example proves - people can be tempted by this false symmetry to pair kzalloc with kzfree

Re: [PATCH] staging: android: ion: Skip sync if not mapped

2020-04-14 Thread John Stultz
On Tue, Apr 14, 2020 at 9:11 AM Ørjan Eide wrote: > > On Tue, Apr 14, 2020 at 04:28:10PM +0200, Greg Kroah-Hartman wrote: > > On Tue, Apr 14, 2020 at 04:18:47PM +0200, �rjan Eide wrote: > > > Only sync the sg-list of an Ion dma-buf attachment when the attachment > > > is actually mapped on the dev