Re: [greybus-dev] [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc

2017-05-11 Thread Viresh Kumar
On 11-05-17, 22:58, JB Van Puyvelde wrote: > According to checkpatch.pl, kcalloc should be preferred to kzalloc with > multiply. > > Signed-off-by: JB Van Puyvelde > --- > drivers/staging/greybus/power_supply.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 4/4] staging: rtl8723bs: checkpatch - resolve indentation and line width

2017-05-11 Thread kbuild test robot
Hi Matthew, [auto build test WARNING on staging/staging-testing] [also build test WARNING on next-20170511] [cannot apply to v4.11] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Matthew-Giassa

[PATCH 3/4] staging: rtl8723bs: checkpatch - fix typos in comments

2017-05-11 Thread Matthew Giassa
Resolving checkpatch issue: CHECK: 'Regsiter' may be misspelled - perhaps 'Register'? CHECK: 'Interrup' may be misspelled - perhaps 'Interrupt'? All instances resolved. --- drivers/staging/rtl8723bs/include/rtl8723b_spec.h | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[PATCH 4/4] staging: rtl8723bs: checkpatch - resolve indentation and line width

2017-05-11 Thread Matthew Giassa
Resolving checkpatch issue: WARNING: line over 80 characters Consolidated indentation so local blocks of macros are column-aligned. Slight slight change to make indentation more readable, assuming a 8-space hard-tab indentation style. --- drivers/staging/rtl8723bs/include/rtl8723b_spec.h | 262

[PATCH 0/4] staging: rtl8723bs: resolve checkpatch issues

2017-05-11 Thread Matthew Giassa
This set of patches resolves a large number of non-functional issues reported by checkpatch for the following header: drivers/staging/rtl8723bs/include/rtl8723b_spec.h *Typos in comments *Indentation consistency (original code not formatted for 8-wide hard-tabs) and 80+ column width lines.

[PATCH 2/4] staging: rtl8723bs: checkpatch - remove mixed spaces/hard-tabs

2017-05-11 Thread Matthew Giassa
Resolving checkpatch issue: WARNING: please, no space before tabs All instances resolved. --- drivers/staging/rtl8723bs/include/rtl8723b_spec.h | 30 +++ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_spec.h

[PATCH 1/4] staging: rtl8723bs: checkpatch - remove multiple blank lines

2017-05-11 Thread Matthew Giassa
Resolving checkpatch issue: CHECK: Please don't use multiple blank lines All instances resolved. --- drivers/staging/rtl8723bs/include/rtl8723b_spec.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_spec.h

Re: [PATCH 2/4] staging: typec: fusb302: cleanup logging and error messages

2017-05-11 Thread Guenter Roeck
On Thu, May 11, 2017 at 10:19:30PM +0100, Rui Miguel Silva wrote: > Hi Guenter, > On Thu, May 11, 2017 at 10:14:15AM -0700, Guenter Roeck wrote: > >On Thu, May 11, 2017 at 03:20:21PM +0100, Rui Miguel Silva wrote: > >>This driver was using debugfs as a logging mechanism instead of the normal >

Re: [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc

2017-05-11 Thread Rui Miguel Silva
Hi JB, Great! thanks for the patch, On Thu, May 11, 2017 at 10:58:56PM +0200, JB Van Puyvelde wrote: According to checkpatch.pl, kcalloc should be preferred to kzalloc with multiply. Signed-off-by: JB Van Puyvelde Reviewed-by: Rui Miguel Silva

Re: [PATCH 3/4] staging: typec: fusb302: refactor resume retry mechanism

2017-05-11 Thread Rui Miguel Silva
Hi, On Thu, May 11, 2017 at 10:32:35AM -0700, Guenter Roeck wrote: On Thu, May 11, 2017 at 03:20:22PM +0100, Rui Miguel Silva wrote: The i2c functions need to test the pm_suspend state and do, if needed, some retry before i2c operations. This code was repeated 4x. The isolate this create a new

Re: [PATCH 2/4] staging: typec: fusb302: cleanup logging and error messages

2017-05-11 Thread Rui Miguel Silva
Hi Guenter, On Thu, May 11, 2017 at 10:14:15AM -0700, Guenter Roeck wrote: On Thu, May 11, 2017 at 03:20:21PM +0100, Rui Miguel Silva wrote: This driver was using debugfs as a logging mechanism instead of the normal dev_* helpers. This patch changes this and move all calls to fusb302_log

[PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc

2017-05-11 Thread JB Van Puyvelde
According to checkpatch.pl, kcalloc should be preferred to kzalloc with multiply. Signed-off-by: JB Van Puyvelde --- drivers/staging/greybus/power_supply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/power_supply.c

[PATCH] staging: wlan-ng: convert endianness in situ

2017-05-11 Thread Thibaut SAUTEREAU
Fix several sparse warnings about casts to restricted little-endian by using in situ conversions. Signed-off-by: Thibaut SAUTEREAU --- drivers/staging/wlan-ng/prism2sta.c | 100 ++-- 1 file changed, 50 insertions(+), 50

[PATCH v2 1/4] staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory.

2017-05-11 Thread Malcolm Priestley
The driver attempts to alter memory that is mapped to PCI device. This is because tx_fwinfo_8190pci points to skb->data Move the pci_map_single to when completed buffer is ready to be mapped with psdec is empty to drop on mapping error. Signed-off-by: Malcolm Priestley Cc:

[PATCH 4/4] staging: rtl8192e: GetTs Fix invalid TID 7 warning.

2017-05-11 Thread Malcolm Priestley
TID 7 is a valid value for QoS IEEE 802.11e. The switch statement that follows states 7 is valid. Remove function IsACValid and use the default case to filter invalid TIDs. Signed-off-by: Malcolm Priestley Cc: ---

[PATCH v2 3/4] staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD.

2017-05-11 Thread Malcolm Priestley
EPROM_CMD is 2 byte aligned on PCI map so calling with rtl92e_readl will return invalid data so use rtl92e_readw. The device is unable to select the right eeprom type. Signed-off-by: Malcolm Priestley Cc: --- v2 - Fix typo in subject line

[PATCH v2 2/4] staging: rtl8192e: fix 2 byte alignment of register BSSIDR.

2017-05-11 Thread Malcolm Priestley
BSSIDR has two byte alignment on PCI ioremap correct the write by swapping to 16 bits first. This fixes a problem that the device associates fail because the filter is not set correctly. Signed-off-by: Malcolm Priestley Cc: --- v2 - Fix name of

Re: [PATCH 1/4] vmbus: Improve a size determination in vmbus_device_create()

2017-05-11 Thread Greg KH
On Thu, May 11, 2017 at 09:30:56AM -0700, Stephen Hemminger wrote: > On Thu, 11 May 2017 18:15:46 +0200 > SF Markus Elfring wrote: > > > From: Markus Elfring > > Date: Thu, 11 May 2017 17:30:10 +0200 > > > > Replace the

Re: [PATCH 3/4] staging: typec: fusb302: refactor resume retry mechanism

2017-05-11 Thread Guenter Roeck
On Thu, May 11, 2017 at 03:20:22PM +0100, Rui Miguel Silva wrote: > The i2c functions need to test the pm_suspend state and do, if needed, some > retry before i2c operations. This code was repeated 4x. > > The isolate this create a new function to check suspend state and call it in > every need

Re: [PATCH 1/4] staging: typec: fusb302: do not free gpio from managed resource

2017-05-11 Thread Guenter Roeck
On Thu, May 11, 2017 at 03:20:20PM +0100, Rui Miguel Silva wrote: > When allocating a gpio using the managed resource devm_, we can avoid freeing > it > manually. But even if we did it we should use devm_gpio_free. > > So, just remove the free of the gpio in the error path. > > Signed-off-by:

Re: [PATCH] staging: typec: Fix sparse warnings about incorrect types

2017-05-11 Thread Guenter Roeck
On Wed, May 10, 2017 at 10:51:35PM -0700, Guru Das Srinagesh wrote: > Fix the following sparse warnings about incorrect type usage: > > fusb302.c:1028:32: warning: incorrect type in argument 1 (different base > types) > fusb302.c:1028:32:expected unsigned short [unsigned] [usertype] header >

Re: [PATCH 2/4] staging: typec: fusb302: cleanup logging and error messages

2017-05-11 Thread Guenter Roeck
On Thu, May 11, 2017 at 03:20:21PM +0100, Rui Miguel Silva wrote: > This driver was using debugfs as a logging mechanism instead of the normal > dev_* > helpers. This patch changes this and move all calls to fusb302_log function to > the correspondent dev_{err,dbg,info}. > > Since the debugfs

Re: vmbus: Delete an error message for a failed memory allocation in vmbus_device_create()

2017-05-11 Thread Stephen Hemminger
On Thu, 11 May 2017 18:36:44 +0200 SF Markus Elfring wrote: > > Taking out the message assumes that all callers of this function either log > > an > > error or pass appropriate error code back to userspace. > > Do you like the default error response by Linux

Re: vmbus: Delete an error message for a failed memory allocation in vmbus_device_create()

2017-05-11 Thread SF Markus Elfring
> Taking out the message assumes that all callers of this function either log an > error or pass appropriate error code back to userspace. Do you like the default error response by Linux memory allocation functions? Regards, Markus ___ devel mailing

Re: [PATCH 4/4] vmbus: Adjust five checks for null pointers

2017-05-11 Thread Stephen Hemminger
On Thu, 11 May 2017 18:19:21 +0200 SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 11 May 2017 17:52:38 +0200 > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > The

Re: [PATCH 3/4] vmbus: Fix a typo in a comment line

2017-05-11 Thread Stephen Hemminger
On Thu, 11 May 2017 18:18:12 +0200 SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 11 May 2017 17:43:55 +0200 > > Add a missing character in this description. > > Signed-off-by: Markus Elfring

Re: [PATCH 1/4] vmbus: Improve a size determination in vmbus_device_create()

2017-05-11 Thread Stephen Hemminger
On Thu, 11 May 2017 18:15:46 +0200 SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 11 May 2017 17:30:10 +0200 > > Replace the specification of a data structure by a pointer dereference > as the parameter for the

Re: [PATCH 2/4] vmbus: Delete an error message for a failed memory allocation in vmbus_device_create()

2017-05-11 Thread Stephen Hemminger
On Thu, 11 May 2017 18:17:01 +0200 SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 11 May 2017 17:33:14 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by

[PATCH 4/4] vmbus: Adjust five checks for null pointers

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 17:52:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus

[PATCH 3/4] vmbus: Fix a typo in a comment line

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 17:43:55 +0200 Add a missing character in this description. Signed-off-by: Markus Elfring --- drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/4] vmbus: Delete an error message for a failed memory allocation in vmbus_device_create()

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 17:33:14 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link:

[PATCH 1/4] vmbus: Improve a size determination in vmbus_device_create()

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 17:30:10 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

[PATCH 0/4] VMBus: Adjustments for some function implementations

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 18:00:18 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Improve a size determination in vmbus_device_create() Delete an error message for a failed memory

[PATCH] staging: rtl8188eu: Put constant on right side of comparison

2017-05-11 Thread palaviv
Constants should be on the right side of comparisons. Issue found by checkpatch.pl script. Signed-off-by: Aviv Palivoda --- drivers/staging/rtl8188eu/hal/phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c

[PATCH 4/4] staging: typec: fusb302: reset i2c_busy state in error path

2017-05-11 Thread Rui Miguel Silva
Fix reset of i2c_busy flag if an error occurs during the i2c block read. Signed-off-by: Rui Miguel Silva --- drivers/staging/typec/fusb302/fusb302.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/typec/fusb302/fusb302.c

[PATCH 3/4] staging: typec: fusb302: refactor resume retry mechanism

2017-05-11 Thread Rui Miguel Silva
The i2c functions need to test the pm_suspend state and do, if needed, some retry before i2c operations. This code was repeated 4x. The isolate this create a new function to check suspend state and call it in every need place. Signed-off-by: Rui Miguel Silva ---

[PATCH 2/4] staging: typec: fusb302: cleanup logging and error messages

2017-05-11 Thread Rui Miguel Silva
This driver was using debugfs as a logging mechanism instead of the normal dev_* helpers. This patch changes this and move all calls to fusb302_log function to the correspondent dev_{err,dbg,info}. Since the debugfs interface was only used for logging, with this patch it became unused, so just

[PATCH 0/4] staging: typec: fusb302: some fixes and cleanups

2017-05-11 Thread Rui Miguel Silva
This series fixes some bugs in the error paths and do some refactoring in the logging and the resume retry mechanism. No new functionality is added and I do *not* have the hw to test it. So, if you have the hw give it a try. Cheers, Rui Rui Miguel Silva (4): staging: typec: fusb302: do

[PATCH 1/4] staging: typec: fusb302: do not free gpio from managed resource

2017-05-11 Thread Rui Miguel Silva
When allocating a gpio using the managed resource devm_, we can avoid freeing it manually. But even if we did it we should use devm_gpio_free. So, just remove the free of the gpio in the error path. Signed-off-by: Rui Miguel Silva --- drivers/staging/typec/fusb302/fusb302.c |

Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control

2017-05-11 Thread Alan Cox
On Thu, 11 May 2017 09:29:14 +0100 Okash Khawaja wrote: > Hi Alan, > > On Wed, May 10, 2017 at 08:41:51PM +0100, Alan Cox wrote: > > > + if (!(tmp_termios.c_cflag & CRTSCTS)) { > > > + tmp_termios.c_cflag |= CRTSCTS; > > > + ret = tty_set_termios(tty,

[PATCH] staging: ccree: remove unused function argument

2017-05-11 Thread Arnd Bergmann
"gcc -Wunused" warns about one argument being assigned but not used: drivers/staging/ccree/ssi_cipher.c: In function 'ssi_blkcipher_complete': drivers/staging/ccree/ssi_cipher.c:747:41: error: parameter 'info' set but not used [-Werror=unused-but-set-parameter] We can simply drop that argument

[PATCH] Staging: lustre: lnet: incorrect type in assignement fix

2017-05-11 Thread Sergiy Redko
Fixed incorrect type in assignment warning found by sparse by changing the type of a local variable Signed-off-by: Sergiy Redko --- drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control

2017-05-11 Thread Okash Khawaja
Hi Alan, On Wed, May 10, 2017 at 08:41:51PM +0100, Alan Cox wrote: > > + if (!(tmp_termios.c_cflag & CRTSCTS)) { > > + tmp_termios.c_cflag |= CRTSCTS; > > + ret = tty_set_termios(tty, _termios); > > + if (ret) > > + pr_warn("speakup: Failed to set

[PATCH] staging: ccree: Fix indentation of driver_hash[] initializers

2017-05-11 Thread Geert Uytterhoeven
Closing braces should match the first characters of the openings. Signed-off-by: Geert Uytterhoeven --- v2: - Rebased against current linus/master. --- drivers/staging/ccree/ssi_hash.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git