[PATCH 2/2] Staging: comedi: kcomedilib: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in kcomedilib_main.c file. Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging

[PATCH 3/3] Staging: nvec: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in nvec.c file Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/nvec/nvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 093535c..2637059 100644 --- a/drivers/staging

[PATCH 4/4] Staging: octeon-usb: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in octeon-hcd.c file Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/octeon-usb/octeon-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index

[PATCH] Staging: nvec: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in nvec.c file Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/nvec/nvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 093535c..2637059 100644 --- a/drivers/staging

[PATCH] Staging: olpc_dcon: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in olpc_dcon_xo_1.c file. Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/olpc_dcon/olpc_dcon_xo_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/olpc_dcon/olpc_dcon_xo_1.c b/drivers/staging/olpc_dcon

[PATCH] Staging: vt6656: Fixed typo in a variable name

2015-01-11 Thread Gustavo A. R. Silva
Fixed typo in a variable name in dpc.h file. Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/vt6656/dpc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/dpc.h b/drivers/staging/vt6656/dpc.h index fab195f..95e0e83 100644

[PATCH] Staging: octeon-usb: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in octeon-hcd.c file Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/octeon-usb/octeon-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index

[PATCH] Staging: vt6656: Fixed typo in a macro name

2015-01-11 Thread Gustavo A. R. Silva
Fixed typo in a macro name in card.c and device.h files. Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/vt6656/card.c | 2 +- drivers/staging/vt6656/device.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/card.c b

[PATCH] Staging: comedi: kcomedilib: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in kcomedilib_main.c file. Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging

[PATCH] Staging: octeon: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in ethernet.c file. Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/octeon/ethernet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index ee32149..460e854

[PATCH] Staging: vt6655: Fixed a typo

2015-01-11 Thread Gustavo A. R. Silva
Fixed a typo in mac.c file. Signed-off-by: Gustavo A. R. Silva garsi...@embeddedor.com --- drivers/staging/vt6655/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index 8f0d652..1975c91 100644 --- a/drivers

Re: [PATCH] drivers: usb: gadget: udc: remove pointer dereference after free

2017-02-08 Thread Gustavo A. R. Silva
Hi Andy, Quoting Andy Shevchenko <andriy.shevche...@linux.intel.com>: On Wed, 2017-02-08 at 13:15 -0600, Gustavo A. R. Silva wrote: Remove pointer dereference and write after free. It's wrong description. There is no write after free. The memory is still in pool and one may

[PATCH] drivers: usb: gadget: udc: remove pointer dereference after free

2017-02-08 Thread Gustavo A. R. Silva
Remove pointer dereference and write after free. Addresses-Coverity-ID: 1091173 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/udc/pch_udc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch

[PATCH 2/2] drivers: usb: gadget: udc: remove logically dead code

2017-02-07 Thread Gustavo A. R. Silva
Remove unnecesary code because zlt never evaluates to zero. Addresses-Coverity-ID: 1226747 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/udc/mv_udc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadg

[PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch

2017-02-08 Thread Gustavo A. R. Silva
Add missing break in switch. Addresses-Coverity-ID: 201385 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/udc/mv_udc_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c

[PATCH] drivers: usb: early: remove unused code

2017-02-07 Thread Gustavo A. R. Silva
Remove this line of code because devnum is overwritten before it can be used. This could happen if line of code 609 (goto try_again;) is executed. Otherwise, devnum is never used again. Addresses-Coverity-ID: 1226870 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drive

[PATCH] drivers: usb-misc: sisusbvga: remove dead code

2017-02-07 Thread Gustavo A. R. Silva
The condition modex % 16 cannot be true when modex value is equal to 640 The condition du & 0xff cannot be true when du value is equal to 0x1400 Addresses-Coverity-Id: 101163 Addresses-Coverity-Id: 744373 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/misc

Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch

2017-02-08 Thread Gustavo A. R. Silva
Hello Felipe, Quoting Felipe Balbi <ba...@kernel.org>: Hi, "Gustavo A. R. Silva" <garsi...@embeddedor.com> writes: Add missing break in switch. Addresses-Coverity-ID: 201385 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/udc

Re: [PATCH] usb: misc: add a missing continue and refactor code

2017-02-21 Thread Gustavo A. R. Silva
Hi Alan, Quoting Alan Stern <st...@rowland.harvard.edu>: On Tue, 21 Feb 2017, Gustavo A. R. Silva wrote: Code refactoring to make the flow easier to follow and add missing 'continue' for case USB_ENDPOINT_XFER_INT. Addresses-Coverity-ID: 1248733 Cc: Alan Stern <st...@rowland.ha

Re: [PATCH] usb: misc: add a missing continue and refactor code

2017-02-21 Thread Gustavo A. R. Silva
Quoting "Gustavo A. R. Silva" <garsi...@embeddedor.com>: Hi Alan, Quoting Alan Stern <st...@rowland.harvard.edu>: On Tue, 21 Feb 2017, Gustavo A. R. Silva wrote: Code refactoring to make the flow easier to follow and add missing 'continue' for case USB_ENDPOIN

Re: [PATCH] usb: misc: remove unnecessary code

2017-02-21 Thread Gustavo A. R. Silva
Hi Peter, Quoting Peter Senna Tschudin <peter.se...@gmail.com>: On Mon, Feb 20, 2017 at 05:28:46PM -0600, Gustavo A. R. Silva wrote: 'val' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. I would add that val is set by kstrtoul() that co

Re: [usb-storage] [PATCH] usb: storage: add missing pre-increment to variable

2017-02-20 Thread Gustavo A. R. Silva
Hi Alan, Quoting Alan Stern <st...@rowland.harvard.edu>: On Wed, 15 Feb 2017, Gustavo A. R. Silva wrote: Add missing pre-increment to 'waitcount' variable used in do-while loop. Addresses-Coverity-ID: 1011631 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> ---

[PATCH] usb: misc: remove unnecessary code

2017-02-20 Thread Gustavo A. R. Silva
'val' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 1230257 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/misc/lvstest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 1/2] media: pci: saa7164: remove unnecessary code

2017-02-20 Thread Gustavo A. R. Silva
Remove unnecessary variable 'loop'. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/media/pci/saa7164/saa7164-cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c b/drivers/media/pci/saa7164/saa7164

[PATCH 2/2] media: pci: saa7164: remove dead code

2017-02-20 Thread Gustavo A. R. Silva
Remove dead code. The following line of code is never reached: return SAA_OK; Addresses-Coverity-ID: 114283 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/media/pci/saa7164/saa7164-cmd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/pci/s

[PATCH] usb: host: add cast to avoid potential integer overflow

2017-02-16 Thread Gustavo A. R. Silva
A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/host/xhci.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 50aee8b..8094d9a 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -4

[PATCH] usb: atm: remove unnecessary code

2017-02-16 Thread Gustavo A. R. Silva
'index' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 115396 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/atm/cxacru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] regulator: remove unnecessary code

2017-02-20 Thread Gustavo A. R. Silva
The name of an array used by itself will always return the array's address. So it makes no sense to evaluate it, since the test will always evaluate as true. Addresses-Coverity-ID: 751412 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/regulator/da9055-regulator

[PATCH] usb: misc: add a missing continue and refactor code

2017-02-21 Thread Gustavo A. R. Silva
Code refactoring to make the flow easier to follow and add missing 'continue' for case USB_ENDPOINT_XFER_INT. Addresses-Coverity-ID: 1248733 Cc: Alan Stern <st...@rowland.harvard.edu> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/misc/us

Re: [PATCH] usb: musb: add code comment for clarification

2017-02-14 Thread Gustavo A. R. Silva
Quoting Greg KH <gre...@linuxfoundation.org>: On Fri, Feb 10, 2017 at 06:57:41PM -0600, Gustavo A. R. Silva wrote: Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292 Signed-off-by: Gustavo A. R.

[PATCH v2] usb: musb: add code comment for clarification

2017-02-14 Thread Gustavo A. R. Silva
Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292 Addresses-Coverity-ID: 1397608 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: Fix tabs and line-wrapping in previous

[PATCH v3] usb: gadget: udc: remove pointer dereference after free

2017-02-13 Thread Gustavo A. R. Silva
Remove pointer dereference after free. Addresses-Coverity-ID: 1091173 Acked-by: Michal Nazarewicz <min...@mina86.com> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: Move pointer dereference before pci_pool_free() Set pointer to NULL after free C

Re: [PATCH v2] usb: gadget: udc: remove pointer dereference after free

2017-02-13 Thread Gustavo A. R. Silva
Hi Michal, Quoting Michal Nazarewicz <min...@mina86.com>: On Sat, Feb 11 2017, Gustavo A. R. Silva wrote: Remove pointer dereference after free and set pointer to NULL after free. Addresses-Coverity-ID: 1091173 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> Acke

[PATCH] drivers: usb: usbip: Add missing break statement to switch

2017-02-09 Thread Gustavo A. R. Silva
Add missing break statement to prevent the code for case USB_PORT_FEAT_C_RESET falling through to the default case. Addresses-Coverity-ID: 143155 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/usbip/vhci_hcd.c | 1 + 1 file changed, 1 insertion(+) diff

drivers: usb: dwc3: A question...

2017-02-09 Thread Gustavo A. R. Silva
the case for OMAP_DWC3_ID_FLOAT is not terminated by a break statement, and it falls through to the next case OMAP_DWC3_VBUS_OFF. My question here is if for any reason this code is intentional? In case it is not, I will write a patch to fix this, but first it would be great to hear any comment about it. Thank you -- Gustavo A. R. Silva

drivers: usb: musb: question about missing break in switch

2017-02-09 Thread Gustavo A. R. Silva
MUSB_QUIRK_A_DISCONNECT_19, in case "if (musb->quirk_retries--)" turns to be false. My question here is if this code is intentional? In case it is not, I will write a patch to fix this, but first it would be great to hear any comment about it. Thank you -- Gustavo A. R. Silva

Re: drivers: usb: musb: question about missing break in switch

2017-02-09 Thread Gustavo A. R. Silva
Hello Bin, Quoting Bin Liu <b-...@ti.com>: On Thu, Feb 09, 2017 at 02:37:34AM -0600, Gustavo A. R. Silva wrote: Hello everybody, I ran into the following piece of code at drivers/usb/musb/musb_core.c:1854 (linux-next) 1854/* 1855 * Check the musb devctl session bit to determine if w

[PATCH] usb: musb: add code comment for clarification

2017-02-10 Thread Gustavo A. R. Silva
Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/musb/musb_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/d

[PATCH v2] usb: gadget: udc: remove pointer dereference after free

2017-02-11 Thread Gustavo A. R. Silva
Remove pointer dereference after free and set pointer to NULL after free. Addresses-Coverity-ID: 1091173 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: Move pointer dereference before pci_pool_free() Set pointer to NULL after free drivers/usb/gadg

Re: [PATCH 1/2] usb: gadget: udc: avoid use of freed pointer

2017-02-14 Thread Gustavo A. R. Silva
Hi Michal, Quoting Michal Nazarewicz <min...@mina86.com>: On Mon, Feb 13 2017, Gustavo A. R. Silva wrote: Rewrite udc_free_dma_chain() function to avoid use of pointer after free. Addresses-Coverity-ID: 1091172 Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

[PATCH v2 1/2] usb: gadget: udc: avoid use of freed pointer

2017-02-14 Thread Gustavo A. R. Silva
Rewrite udc_free_dma_chain() function to avoid use of pointer after free. Addresses-Coverity-ID: 1091172 Acked-by: Michal Nazarewicz <min...@mina86.com> Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>

[PATCH v2 2/2] usb: gadget: udc: remove unnecessary variable and update function prototype

2017-02-14 Thread Gustavo A. R. Silva
Remove unnecessary variable and update function prototype. Acked-by: Michal Nazarewicz <min...@mina86.com> Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: None. drivers/usb/gadget/ud

[PATCH] usb: class: remove logically dead code

2017-02-14 Thread Gustavo A. R. Silva
Remove logically dead code. 'cntr' is always equal to zero when the following line of code is executed: rv = cntr ? cntr : -EAGAIN; Addresses-Coverity-ID: 113227 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion

usb: storage: suspicious code

2017-02-14 Thread Gustavo A. R. Silva
tcount < 10) In case 'waitcount' isn't needed, lines 318 and 319 should be removed. Can someone help me to clarify this so I can write a patch to fix this code? Thank you -- Gustavo A. R. Silva

Re: [usb-storage] usb: storage: suspicious code

2017-02-14 Thread Gustavo A. R. Silva
Hi Oliver, Quoting Oliver Neukum <oneu...@suse.com>: Am Dienstag, den 14.02.2017, 23:06 -0600 schrieb Gustavo A. R. Silva: Hi, waitcount = 0; do { result = jumpshot_get_status(us); if (result != USB_STOR_TRANSPORT_GOOD) { // I have not experimented t

[PATCH] usb: storage: add missing pre-increment to variable

2017-02-15 Thread Gustavo A. R. Silva
Add missing pre-increment to 'waitcount' variable used in do-while loop. Addresses-Coverity-ID: 1011631 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/storage/jumpshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/s

[PATCH 0/2] avoid use of freed pointer

2017-02-13 Thread Gustavo A. R. Silva
Hello, This patch series addesses Coverity ID 1091172, which reports the use of a freed pointer. udc_free_dma_chain() function was rewritten in order to fix this issue. Unnecessary 'ret_val' variable was removed and the function prototype was modified. Thanks Gustavo A. R. Silva (2): usb

[PATCH 1/2] usb: gadget: udc: avoid use of freed pointer

2017-02-13 Thread Gustavo A. R. Silva
Rewrite udc_free_dma_chain() function to avoid use of pointer after free. Addresses-Coverity-ID: 1091172 Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/udc/amd5536udc.c | 20 +++

[PATCH 2/2] usb: gadget: udc: remove unnecessary variable and update function prototype

2017-02-13 Thread Gustavo A. R. Silva
Remove unnecessary variable and update function prototype. Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/gadget/udc/amd5536udc.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

[PATCH] usb: misc: remove unnecessary code

2017-02-16 Thread Gustavo A. R. Silva
'val' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 1230256 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/misc/lvstest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] drivers: power: supply: Compress return logic into one line.

2017-01-19 Thread Gustavo A. R. Silva
Hey hello, Quoting Sebastian Reichel <s...@kernel.org>: Hi, On Wed, Jan 11, 2017 at 08:45:57PM -0600, Gustavo A. R. Silva wrote: Simplify return logic to avoid unnecessary variable assignments. These issues were detected using Coccinelle and the following semantic patch: @@

Re: [PATCH] drivers: power: supply: Compress return logic into one line.

2017-01-19 Thread Gustavo A. R. Silva
Hey hello, Quoting Sebastian Reichel <s...@kernel.org>: Hi, On Wed, Jan 11, 2017 at 08:29:35PM -0600, Gustavo A. R. Silva wrote: Simplify return logic to avoid unnecessary variable assignments. These issues were detected using Coccinelle and the following semantic patch: @@

[PATCH] Staging: fbtft: Fix too many leading tabs warning

2016-10-11 Thread Gustavo A. R. Silva
This is a patch to the fb_agm1264k-fl.c file that fixes up the following issue: WARNING: Too many leading tabs - consider code refactoring Add new function iterate_diffusion_matrix() to refactor a piece of code inside write_vmem(). Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.

[PATCH] drivers: power: supply: Compress return logic into one line.

2017-01-11 Thread Gustavo A. R. Silva
Simplify return logic to avoid unnecessary variable assignments. These issues were detected using Coccinelle and the following semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.

[PATCH] drivers: power: supply: Compress return logic into one line.

2017-01-11 Thread Gustavo A. R. Silva
Simplify return logic to avoid unnecessary variable assignments. These issues were detected using Coccinelle and the following semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.

[PATCH] drivers: block: Remove unnecessary cast

2017-01-11 Thread Gustavo A. R. Silva
This issue was detected using Coccinelle and the following semantic patch: @@ expression * e; expression arg1, arg2; type T; @@ - e = (T *) + e = kmalloc(arg1, arg2); Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/block/cciss_scsi.c | 3 +-- 1 file chan

Re: [PATCH] drivers: block: Remove unnecessary cast

2017-01-11 Thread Gustavo A. R. Silva
Quoting Greg KH <gre...@linuxfoundation.org>: On Wed, Jan 11, 2017 at 12:41:05PM -0600, Gustavo A. R. Silva wrote: This issue was detected using Coccinelle and the following semantic patch: @@ expression * e; expression arg1, arg2; type T; @@ - e = (T *) + e = kmalloc(arg1, arg2);

[PATCH] Staging: lustre: lustre: lmv: Compress return logic into one line.

2017-01-04 Thread Gustavo A. R. Silva
Simplify return logic to avoid unnecessary variable assignments. These issues were detected using Coccinelle and the following semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.

[PATCH] staging: speakup: fix warning for static declaration

2017-03-27 Thread Gustavo A. R. Silva
Fix the following sparse warning: symbol 'spk_serial_out' was not declared. Should it be static? Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/speakup/serialio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/s

[PATCH v2 2/2] usb: misc: refactor code

2017-04-03 Thread Gustavo A. R. Silva
Code refactoring to make the flow easier to follow. Cc: Alan Stern <st...@rowloand.harvard.edu> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: Remove unfruitful changes in previous pat

[PATCH v2 1/2] usb: misc: add missing continue in switch

2017-04-03 Thread Gustavo A. R. Silva
Add missing continue in switch. Addresses-Coverity-ID: 1248733 Cc: Alan Stern <st...@rowloand.harvard.edu> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: None. drivers/usb/misc/usbtest.c | 1

[PATCH v2 1/2] usb: gadget: udc: avoid use of freed pointer

2017-04-03 Thread Gustavo A. R. Silva
Rewrite udc_free_dma_chain() function to avoid use of pointer after free. Addresses-Coverity-ID: 1091172 Acked-by: Michal Nazarewicz <min...@mina86.com> Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>

Re: [PATCH 2/2] usb: misc: refactor code

2017-04-03 Thread Gustavo A. R. Silva
Hi Alan, Quoting Alan Stern <st...@rowland.harvard.edu>: On Mon, 3 Apr 2017, Gustavo A. R. Silva wrote: Code refactoring to make the flow easier to follow. Cc: Alan Stern <st...@rowloand.harvard.edu> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: G

[PATCH v2 2/2] usb: gadget: udc: remove unnecessary variable and update function prototype

2017-04-03 Thread Gustavo A. R. Silva
Remove unnecessary variable and update function prototype. Acked-by: Michal Nazarewicz <min...@mina86.com> Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: None. drivers/usb/gadget/ud

[PATCH 2/2] usb: misc: refactor code

2017-04-03 Thread Gustavo A. R. Silva
Code refactoring to make the flow easier to follow. Cc: Alan Stern <st...@rowloand.harvard.edu> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/misc/usbtest.c | 67 +--

Re: [PATCH 2/2] usb: misc: refactor code

2017-04-04 Thread Gustavo A. R. Silva
Hello, Quoting Felipe Balbi <felipe.ba...@linux.intel.com>: Hi, "Gustavo A. R. Silva" <garsi...@embeddedor.com> writes: Code refactoring to make the flow easier to follow. Cc: Alan Stern <st...@rowloand.harvard.edu> Cc: Greg Kroah-Hartman <gre...@linuxfoundat

[PATCH] usb: misc: add missing continue and refactor code

2017-04-03 Thread Gustavo A. R. Silva
-Code refactoring to make the flow easier to follow. -Add missing 'continue' for case USB_ENDPOINT_XFER_INT. Addresses-Coverity-ID: 1248733 Cc: Alan Stern <st...@rowloand.harvard.edu> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/misc/us

Re: [PATCH v3] usb: gadget: udc: remove pointer dereference after free

2017-03-10 Thread Gustavo A. R. Silva
Hello, Quoting Felipe Balbi <ba...@kernel.org>: "Gustavo A. R. Silva" <garsi...@embeddedor.com> writes: Remove pointer dereference after free. Addresses-Coverity-ID: 1091173 Acked-by: Michal Nazarewicz <min...@mina86.com> Signed-off-by: Gustavo A. R. Si

[PATCH v4] usb: gadget: udc: remove pointer dereference after free

2017-03-10 Thread Gustavo A. R. Silva
Remove pointer dereference after free. Addresses-Coverity-ID: 1091173 Acked-by: Michal Nazarewicz <min...@mina86.com> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- Changes in v2: Move pointer dereference before pci_pool_free() Set pointer to NULL after free C

Re: [PATCH] usb: misc: add missing continue and refactor code

2017-04-03 Thread Gustavo A. R. Silva
Quoting Alan Stern <st...@rowland.harvard.edu>: On Mon, 3 Apr 2017, Greg Kroah-Hartman wrote: On Mon, Apr 03, 2017 at 09:39:53AM -0500, Gustavo A. R. Silva wrote: > -Code refactoring to make the flow easier to follow. > -Add missing 'continue' for case USB_ENDPOINT_XFER_IN

[PATCH 1/2] usb: misc: add missing continue in switch

2017-04-03 Thread Gustavo A. R. Silva
Add missing continue in switch. Addresses-Coverity-ID: 1248733 Cc: Alan Stern <st...@rowloand.harvard.edu> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/usb/misc/usbtest.c | 1 + 1 file changed, 1

[PATCH] gpio: msic: fix error return code in platform_msic_gpio_probe()

2017-08-03 Thread Gustavo A. R. Silva
/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/gpio/gpio-msic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH] soc: integrator: remove unnecessary static in integrator_soc_init()

2017-08-03 Thread Gustavo A. R. Silva
Hi Linus, On 08/02/2017 06:58 AM, Linus Walleij wrote: On Thu, Jul 20, 2017 at 12:39 AM, Gustavo A. R. Silva <gust...@embeddedor.com> wrote: Remove unnecessary static on local variable syscon_regmap. Such variables are initialized before being used, on every execution path thro

Re: [PATCH] soc: versatile: remove unnecessary static in realview_soc_probe()

2017-08-03 Thread Gustavo A. R. Silva
On 08/02/2017 06:59 AM, Linus Walleij wrote: On Thu, Jul 20, 2017 at 12:40 AM, Gustavo A. R. Silva <gust...@embeddedor.com> wrote: Remove unnecessary static on local variables syscon_regmap. Such variables are initialized before being used, on every execution path throughout the fun

[PATCH] rtc: at91rm9200: fix error return code in at91_rtc_probe()

2017-08-09 Thread Gustavo A. R. Silva
of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/rtc/rtc-at91rm9200.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index e221b78..09bc2e0 100644 --- a/drivers/r

[PATCH] misc: atmel_tclib: fix error return code in tc_probe()

2017-08-09 Thread Gustavo A. R. Silva
with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/misc/atmel_tclib.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/misc/atmel_tclib.c b/drivers/misc/atmel_tclib.c index ac24a4b..c5d3449 100644 --- a/driver

[PATCH] drm/gma500: fix potential NULL pointer dereference dereference

2017-08-11 Thread Gustavo A. R. Silva
A. R. Silva <gust...@embeddedor.com> --- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c b/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c index 1616af2..c50534c 100644 --- a/drive

[PATCH] IB/core: fix duplicated code for different branches

2017-08-12 Thread Gustavo A. R. Silva
Refactor code to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/infiniband/core/cm.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/infiniband/core/

[PATCH] scsi: pmcraid: fix duplicated code for different branches

2017-08-12 Thread Gustavo A. R. Silva
Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- This code was tested by compilation only. drivers/scsi/pmcraid.c | 7 +-- 1 file changed, 1 ins

[PATCH] usb: misc: ftdi-elan: fix duplicated code for different branches

2017-08-12 Thread Gustavo A. R. Silva
Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/usb/misc/ftdi-elan.c | 27 +-- 1 file changed, 1 insertion(+), 26 del

[PATCH] liquidio: fix duplicated code for different branches

2017-08-12 Thread Gustavo A. R. Silva
Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- This code was tested by compilation only. drivers/net/ethernet/cavium/liquidio/lio_ethtool.

[PATCH] qlge: fix duplicated code for different branches

2017-08-12 Thread Gustavo A. R. Silva
Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- This code was tested by compilation only. drivers/net/ethernet/qlogic/qlge/qlge_dbg.

[PATCH] au0828: fix unbalanced lock/unlock in au0828_usb_probe

2017-08-12 Thread Gustavo A. R. Silva
Call mutex_unlock and free dev on failure. Reported-by: Julia Lawall <julia.law...@lip6.fr> Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/media/usb/au0828/au0828-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/au0828/au08

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
eryone affected by a single patch in the set on everything, that's harder to avoid when sending a series via git, but it can be confusing to get one item in a large patch series without context). I like this idea better. I will do so next time. :) Thank you -- Gustavo A. R. Silva

[PATCH 08/12] ASoC: max9867: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/max9867

[PATCH 05/12] ASoC: max98926: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/max98926

[PATCH 01/12] ASoC: cs42l42: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/cs42l42

[PATCH 02/12] ASoC: rt5663: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/rt5663

[PATCH 07/12] ASoC: codecs: msm8916-wcd-digital: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/msm89

[PATCH 04/12] ASoC: msm8916-wcd-analog: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/msm89

[PATCH 12/12] ASoC: tas5720: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/tas5720

[PATCH 11/12] ASoC: dwc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/dwc/dwc-i2s.c | 2

[PATCH 10/12] ASoC: hdac_hdmi: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/hdac_hdmi

[PATCH 09/12] ASoC: rk3036: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/inno_rk3036

[PATCH 00/12] constify snd_soc_dai_ops structures

2017-07-13 Thread Gustavo A. R. Silva
This patchset aims to constify all snd_soc_dai_ops structures that are only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Thanks! Gustavo A. R. Silva (12): ASoC

[PATCH 06/12] ASoC: rt5514: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/rt5514.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c index a71e630..4ca73bf 100644 --- a/sound/soc/codecs/rt5514.c +++ b/sound/soc/codecs/rt5514.c @@ -

[PATCH 03/12] ASoC: rt5616: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/codecs/rt5616

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
Hi Joe, Quoting Joe Perches <j...@perches.com>: On Thu, 2017-07-13 at 10:18 -0500, Gustavo A. R. Silva wrote: Hi Mark, Quoting Mark Brown <broo...@kernel.org>: > On Thu, Jul 13, 2017 at 09:32:41AM +0200, Takashi Iwai wrote: > > > please stop posting in this styl

[PATCH] ARM: mm: iomap: use is_vmalloc_addr

2017-07-13 Thread Gustavo A. R. Silva
Instead of manually checking the bounds of VMALLOC_START and VMALLOC_END, use is_vmalloc_addr. Such function was specifically designed for that purpose. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- arch/arm/mm/iomap.c | 3 +-- 1 file changed, 1 insertion(+), 2 del

[PATCH] ASoC: rsnd: remove unnecessary static in rsnd_ssiu_probe()

2017-07-17 Thread Gustavo A. R. Silva
592 03799 ed7 sound/soc/sh/rcar/ssiu.o Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- sound/soc/sh/rcar/ssiu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c index bed2c9c..4d94875 100644

  1   2   3   4   5   6   7   8   9   10   >