Silence the following fall-through warning by adding a break statement:
drivers/usb/gadget/udc/lpc32xx_udc.c:2230:3: warning: this statement may
fall through [-Wimplicit-fallthrough=]
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/udc/lpc32xx_udc.c | 2 +-
1 file changed, 1
: warning: this statement may fall
through [-Wimplicit-fallthrough=]
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/udc/s3c2410_udc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c
b/drivers/usb/gadget/udc/s3c2410_udc.c
index af3e63316ace
Mark switch cases where we are expecting to fall through.
This patch fixes the following warning (Building: at91_dt_defconfig arm):
drivers/usb/gadget/udc/atmel_usba_udc.c:329:13: warning: this statement may
fall through [-Wimplicit-fallthrough=]
Signed-off-by: Gustavo A. R. Silva
st/ohci-tmio.c:103:7: warning: this statement may fall through
[-Wimplicit-fallthrough=]
pm |= CCR_PM_USBPW2;
^
drivers/usb/host/ohci-tmio.c:104:3: note: here
case 1:
^~~~
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/ohci-tmio.c | 3 +++
1 file changed, 3 insertions(+)
diff
05:
^~~~
Reported-by: Stephen Rothwell
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/phy/phy-ab8500-usb.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index aaf363f19714..14b432982fd3 100644
--- a/driver
lthrough. As part of that, the io_edgeport.c driver is a
>> bit "messy" with the parsing logic of a data packet. Clean that logic
>> up a bit by unindenting one level of the logic, and properly label
>> /* Fall through */ to make gcc happy.
>>
>> Reported-by: Gust
with the parsing logic of a data packet. Clean that logic
> up a bit by unindenting one level of the logic, and properly label
> /* Fall through */ to make gcc happy.
>
> Reported-by: Gustavo A. R. Silva
> Signed-off-by: Greg Kroah-Hartman
>
Acked-by: Gustavo A. R. Silva
Th
_count)
to :
struct_size(packet_status, PacketStatus, seg->isoc_frame_count);
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/wusbcore/wa-xfer.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/dr
necessary, hence
it is removed.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/core/config.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 7bb6b1bd06c8
necessary, hence
it is removed.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/dwc2/hcd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index dd82fa516f3f..3f087962f498
On 2/13/19 3:08 AM, Greg Kroah-Hartman wrote:
> On Tue, Feb 12, 2019 at 01:47:54PM -0600, Bin Liu wrote:
>> Hi Greg,
>>
>> On Tue, Feb 12, 2019 at 01:23:57PM -0600, Gustavo A. R. Silva wrote:
>>> In preparation to enabling -Wimplicit-fallthrough, mark switch
>&
is expecting to find.
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/musb/musb_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
in
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enabling
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/usb
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enabling
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/usb
) + count * sizeof(void *));
Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:
instance = alloc(struct_size(instance, entry, count));
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/net
ne can double-check this.
This issue was detected with the help of Coccinelle.
Fixes: ceb80363b2ec ("USB: net2272: driver for PLX NET2272 USB device
controller")
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/udc/net2272.c | 2 +-
1 file changed, 1
foo) + sizeof(void *) * count, GFP_KERNEL);
Instead of leaving these open-coded and prone to type mistakes, we can now
use the new struct_size() helper:
instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A
foo) + sizeof(void *) * count, GFP_KERNEL);
Instead of leaving these open-coded and prone to type mistakes, we can now
use the new struct_size() helper:
instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A
foo) + sizeof(void *) * count, GFP_KERNEL);
Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:
instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL);
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A
Hi Breno,
On 10/17/18 9:47 PM, Breno Leitao wrote:
> uref->usage_index can be indirectly controlled by userspace, hence leading
> to a potential exploitation of the Spectre variant 1 vulnerability.
>
> This problem might show up in the cmd = HIDIOCGCOLLECTIONINDEX flow at
> function
> hiddev_i
[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/function/f_mass_storage.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/function/f_mass_storage.c
b/drivers/usb/ga
Fix the following compile warning:
warning: unused variable ‘flags’ [-Wunused-variable]
unsigned long flags;
Fixes: ed194d136769 ("usb: core: remove local_irq_save() around ->complete()
handler")
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/core/hcd.c | 1 -
1 file change
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1077614 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/usb/usbnet.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/d
On 05/22/2018 10:56 AM, Shuah Khan wrote:
On 05/18/2018 07:13 PM, Gustavo A. R. Silva wrote:
pdev_nr and rhport can be controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.
This issue was detected with the help of Smatch:
drivers/usb
On 05/19/2018 02:04 AM, Greg Kroah-Hartman wrote:
Greg,
I've been talking with Dan Williams (intel) about this kind of issues [1]
and it seems my original assumptions are correct. Hence, this patch is not
useful and, in order to actually prevent speculation here we would need to
pass the addr
ed with a dependent load/store [1].
[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva
---
Changes in v3:
- Pass the addresses of pdev_nr and rhport into valid_port and
valid_args.
Changes in v2:
- Place t
On 05/18/2018 11:06 AM, Shuah Khan wrote:
On 05/18/2018 07:47 AM, Greg Kroah-Hartman wrote:
On Thu, May 17, 2018 at 03:16:28PM -0500, Gustavo A. R. Silva wrote:
pdev_nr and rhport can be controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1
ed with a dependent load/store [1].
[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Place the barriers into valid_port.
drivers/usb/usbip/vhci_sysfs.c | 6 ++
1 file changed, 6 insert
On 05/17/2018 02:15 PM, Greg Kroah-Hartman wrote:
Shouldn't we just do this in one place, in the valid_port() function?
That way it keeps the range checking logic in one place (now it is in 3
places in the function), which should make maintenance much simpler.
Yep, I thought about that, the
Hi Greg,
On 05/17/2018 01:51 AM, Greg Kroah-Hartman wrote:
On Wed, May 16, 2018 at 05:22:00PM -0500, Gustavo A. R. Silva wrote:
pdev_nr and rhport can be controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.
This issue was detected with
with a dependent load/store [1].
[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/usbip/vhci_sysfs.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/
Currently, logical and is being used instead of *bitwise* and.
Fix this by using a proper bitwise and operator.
Addresses-Coverity-ID: 1468455 ("Logical vs. bitwise operator")
Fixes: 64f7c494a3c0 ("typec: tcpm: Add support for sink PPS related
messages")
Signed-off-by:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1468266 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/core/hcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/d
,
in which case the code would look as follows instead:
iv = kcalloc(crypto_skcipher_ivsize(tfm_cbc), sizeof(*iv), GFP_KERNEL);
but if the data type of _iv_ never changes, or the type size is always one
byte, kzalloc is good enough.
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Fix a
I just discovered an issue with this patch. Please, drop it. I'll send
v2 shortly.
Thanks
--
Gustavo
On 03/16/2018 08:01 AM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wvla, remove VLA and replace it
with dynamic memory allocation instead.
The use of stack Variable L
,
in which case the code would look as follows instead:
iv = kcalloc(crypto_skcipher_ivsize(tfm_cbc), sizeof(*iv), GFP_KERNEL);
but if the data type of _iv_ never changes, or the type size is always one
byte, kzalloc is good enough.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/wusbcore
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/dwc2/gadget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/misc/chaoskey.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/misc/chaoskey.c b
Simplify return logic and avoid unnecessary variable assignment.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/legacy/ncm.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/legacy/ncm.c b/drivers/usb/gadget/legacy/ncm.c
index fcee1ee0
Calling msg_data_left(&msg) is only useful for its return value,
which in this particular case is ignored.
Fix this by removing such call.
Addresses-Coverity-ID: 1427080
Fixes: 90120d15f4c3 ("usbip: prevent leaking socket pointer address in
messages")
Signed-off-by: Gusta
e not
ready")
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/usb/ipheth.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index ca71f6c..7275761 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/us
Quoting Greg Kroah-Hartman :
On Wed, Oct 25, 2017 at 02:05:05PM -0500, Gustavo A. R. Silva wrote:
Greg,
Quoting "Gustavo A. R. Silva" :
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-b
Add missing break statement to prevent the code for case C_HUB_OVER_CURRENT
from falling through to case C_HUB_LOCAL_POWER.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/isp1362-hcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host
rest of these patches are already in my tree.
OK. I'll send a new patch shortly.
Thanks!
--
Gustavo A. R. Silva
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://
hrough" comment in the branch, but removing the else might
be better.
Thanks for the suggestion.
This code is pretty hard to read as is and could really use some clean
up...
I agree. I'll send a V2 of this patch and then let's see if I can help
with some code refactoring.
Thank you
--
Gustavo A. R. Silva
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoting Bjørn Mork :
"Gustavo A. R. Silva" writes:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that in this particular case I replaced "...drop on through"
comments with a proper "fall through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/typec/tps6598x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
index
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/storage/sddr55.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
index
Hi Felipe,
Quoting Felipe Balbi :
"Gustavo A. R. Silva" writes:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
Acked-by: Felipe Balbi
Thank you for the ACKs.
--
Gustavo A
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/wusbcore/wa-xfer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/ehci-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/fotg210-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb
place. So I replaced them with proper "fall through"
comments, which is what GCC is expecting to find.
Thanks!
Gustavo A. R. Silva (9):
usb: host: fotg210-hcd: mark expected switch fall-through
usb: host: xhci: mark expected switch fall-through
usb: host: xhci-mem: mark expected s
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/ohci-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/xhci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ee077a2
Greg,
Quoting "Gustavo A. R. Silva" :
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/isp1362-hcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/driver
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/xhci-hub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/pci-quirks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/isp1362-hcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/oxu210hp-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/xhci-mem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/udc/dummy_hcd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c
b/drivers/usb/gadget
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/composite.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/class/usbtmc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/atm/cxacru.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 600a670
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115006
Addresses-Coverity-ID: 115007
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/isp116x-hcd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115004
Addresses-Coverity-ID: 115005
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/function/f_phonet.c | 2 ++
1 file changed, 2 insertions(+)
diff
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115014
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/serial/kobil_sct.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/serial/kobil_sct.c b
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115016
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/storage/uas.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 145713
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/udc/goku_udc.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1350962
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/function/u_serial.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1397608
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/musb/musb_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/musb/musb_core.c b
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 703128
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/function/f_tcm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget/function
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1162594
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/core/urb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/image/mdc800.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1222118
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/phy/phy-msm-usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/phy/phy-msm-usb.c b
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
---
drivers/usb/misc/ftdi-elan.c | 27 +--
1 file changed, 1 insertion(+), 26 deletions(-)
diff --git a
Hi Yoshihiro,
On 08/09/2017 06:44 AM, Yoshihiro Shimoda wrote:
Hi Gustavo,
Thank you for the patch!
I'm glad to help :)
-Original Message-
From: Gustavo A. R. Silva
Sent: Wednesday, August 9, 2017 7:35 AM
platform_get_irq() returns an error code, but the renesas_usb3 d
/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
Print and propagate the return value of platform_get_irq on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/ehci-omap.c | 4 ++--
1 file changed, 2
/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
Print error message and propagate the return value of platform_get_irq
on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/udc/renesas_usb3.c | 6
/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
Print and propagate the return value of platform_get_irq on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/dwc3/dwc3-omap.c | 4 ++--
1 file changed, 2
/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
Print error message and propagate the return value of platform_get_irq
on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/host/imx21-hcd.c | 6 --
1 file
Hi Oliver,
Quoting Oliver Neukum :
Am Sonntag, den 09.07.2017, 21:00 -0500 schrieb Gustavo A. R. Silva :
Simplify return logic to avoid unnecessary variable assignment.
This issue was detected using Coccinelle and the following
semantic patch:
Hi,
I need to ask: Where is the improvement
Simplify return logic to avoid unnecessary variable declaration
and assignment.
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
---
drivers/usb
Simplify return logic to avoid unnecessary variable assignment.
This issue was 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
---
drivers/usb/gadget/udc
Simplify return logic to avoid unnecessary variable declaration
and assignment.
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
---
drivers/usb
Simplify return logic to avoid unnecessary variable assignment.
This issue was 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
---
drivers/usb/gadget/udc/udc
Simplify return logic to avoid unnecessary variable declaration
and assignment.
This issue was 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
---
drivers/usb/misc
Simplify return logic to avoid unnecessary variable assignment.
This issue was 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
---
drivers/usb/chipidea/udc.c | 5
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
---
drivers/usb/gadget/legacy
Simplify return logic to avoid unnecessary variable declaration
and assignment.
This issue was 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
---
drivers/usb/gadget
Prefer unsigned int to bare use of unsigned.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index 23bfa7d..968179d 100644
--- a/drivers/usb/gadget
Simplify return logic to avoid unnecessary variable assignment.
This issue was 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
---
drivers/usb/gadget/legacy/ncm.c
Simplify return logic to avoid unnecessary variable declaration
and assignment.
This issue was 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
---
drivers/usb/gadget
Simplify return logic to avoid unnecessary variable assignment.
This issue was 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
---
drivers/usb/gadget/configfs.c | 5
Simplify return logic to avoid unnecessary variable assignment.
This issue was 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
---
drivers/usb/isp1760/isp1760-hcd.c
sion e1, e2; position p;
@@
snd_pcm_set_ops(e1, e2, &i@p)
@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_pcm_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct snd_pcm_ops i = { ... };
Signed-off-by: Gustavo A. R. Silva
---
Value assigned to variable bufferspace at line 637 is overwritten
at line 613, before it can be used. This makes such variable
assignment useless.
Addresses-Coverity-ID: 1397677
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/gadget/udc/udc-xilinx.c | 1 -
1 file changed, 1 deletion(-)
diff
Simplify return logic to avoid unnecessary variable assignment.
Signed-off-by: Gustavo A. R. Silva
---
drivers/usb/musb/musb_host.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index dbe617a..76decb8 100644
Add missing goto.
Addresses-Coverity-ID: 1226913
Signed-off-by: Gustavo A. R. Silva
---
drivers/uwb/i1480/dfu/phy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/uwb/i1480/dfu/phy.c b/drivers/uwb/i1480/dfu/phy.c
index 3b1a87d..1ac8526 100644
--- a/drivers/uwb/i1480/dfu/phy.c
+++ b
1 - 100 of 160 matches
Mail list logo