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
---
drivers/block/cciss_scsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions
Quoting Greg KH :
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);
Signed-off-by: Gustavo A. R. Silva
eculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed 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/m
18 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, this patchset aims
to mark switch cases where we are expecting to fall through.
I reviewed case by case and concluded that each of them is an
intentional fall-through. However, it doesn't hurt that the
maint
On 12/18/18 11:13 AM, Boaz Harrosh wrote:
On 28/11/18 06:32, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
ACK-by: Boaz Harrosh
Thank you, Boaz.
--
Gustavo
On 12/18/18 9:45 PM, Martin K. Petersen wrote:
If you haven't received feedback on a patch you should poke the relevant
driver maintainer.
Got it. Will do so.
Thanks
--
Gustavo
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in some cases, I replaced "FALLTH
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in some cases, I replaced "FALLTH
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1357387 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that I replaced "Fall through !!!" wi
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I replaced
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that I replaced "!! fall through !!
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I replaced
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:28 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1056538 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:28 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:29 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 703127 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:30 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, a dash is added
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:30 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, a dash is added
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114978 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I replaced "
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I replaced "
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I replaced "
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:30 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, a dash is added
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:29 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I placed all the
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1475400 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1465234 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114983 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I replaced
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114988 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:34 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114994 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:34 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114996 ("Missing bre
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi
Hi Suganath,
On 12/19/18 10:19 PM, Suganath Prabu Subramani wrote:
Hi Gustavo,
This patch may not apply smoothly over 4.21/scsi-queue.
Our previous patch for Aero had some changes in this switch case.
Can you resend this patch with latest code base ?
Okay. I'll send a separate patch.
Thanks
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1475400 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
1 file changed, 1 insertion(+)
di
Fix boolean expression by using logical AND operator '&&'
instead of bitwise operator '&'.
This issue was detected with the help of Coccinelle.
Fixes: 1e46731efd9c ("scsi: smartpqi: check for null device pointers")
Signed-off-by: Gustavo A. R. Silva
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
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 6:08 PM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:34 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 6:08 PM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114978 ("Mi
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Martin: apparently, the only maintainers for this
driver are you and James.
Thanks
--
Gustavo
On 11/27/18 10:29 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:28 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Martin: apparently, the only maintainers for
this driver are you and James.
Thanks
--
Gustavo
On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:38 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:38 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:37 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:36 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 6:08 PM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:34 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:37 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 6:07 PM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 6:07 PM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 6:07 PM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
In preparation to
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in this particular case, I
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Thanks
--
Gustavo
On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
Hi,
Friendly ping:
Who can ack or review this patch, please?
Thanks
--
Gustavo
On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
In preparation to
On 1/10/19 2:24 PM, "Kai Mäkisara (Kolumbus)" wrote:
On 10 Jan 2019, at 21.56, Gustavo A. R. Silva wrote:
Hi,
Friendly ping (second one):
Who can ack/review/take this patch, please?
Acked-by: Kai Mäkisara
Thanks, Kai.
--
Gustavo
what GCC is expecting to find.
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva
---
drivers/message/fusion/mptbase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message
expecting to find.
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva
---
drivers/xen/xen-scsiback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index
Add missing break statement and fix identation issue.
This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.
Fixes: 9cb62fa24e0d ("aacraid: Log firmware AIF messages")
Cc: sta...@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/aacraid
ult:
^~~
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/scsi/mpt3sas/m
On 2/27/19 8:33 AM, Martin K. Petersen wrote:
>
> Gustavo,
>
>> Add missing break statement and fix identation issue.
>
> So much bad indentation in this driver. Tried various tab widths and it
> is still all over the place.
>
> Anyway. After staring at the firmware header I have convinced m
is modified
in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Update commit log.
- Move code comment after the default label and
retain reason for fall-through in comm
On 2/27/19 8:37 AM, Martin K. Petersen wrote:
>
> Gustavo,
>
>> Fix the following warnings by adding the proper missing breaks:
>>
>> drivers/scsi/mpt3sas/mpt3sas_base.c: In function
>> ‘_base_display_OEMs_branding’:
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3548:4: warning: this statement may f
Hi all,
Friendly ping:
Who can take this?
Thanks
On 3/7/19 3:49 PM, Finn Thain wrote:
> Adjust comments accordingly.
>
> Cc: Gustavo A. R. Silva
> Cc: Michael Schmitz
> Signed-off-by: Finn Thain
> ---
> drivers/scsi/NCR5380.c | 8
> 1 file changed, 4 in
On 4/8/19 7:22 PM, Finn Thain wrote:
>
> It has been queued up by Martin and James on git.kernel.org. Apparently it
> is to be pushed in the v5.2 merge window.
>
Awesome.
Thanks
--
Gustavo
Remove both variable assignments once the value stored in variable _reqlen_
is overwritten at some point either by line 2321: reqlen = mptr - msg;
or by line 2330: reqlen = 12;
Addresses-Coverity-ID: 1226930
Addresses-Coverity-ID: 1226931
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi
Remove unnecessary variable assignments, the variable itself and
refactor the code.
Addresses-Coverity-ID: 1227034
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/ipr.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
Value assigned to variable blkno at lines
4123:if (blkno >= 0) blkno += arg; and
4127:if (blkno >= 0) blkno -= arg;
is overwritten at line 4131:blkno = STps->drv_block;
before it can be used.
This makes such variable assignments useless.
Addresses-Coverity-ID: 1397685
Signed-off-by:
26910 drivers/scsi/mpt3sas/mpt3sas_scsih.o
after:
text data bss dec hex filename
126292 302401152 157684 267f4 drivers/scsi/mpt3sas/mpt3sas_scsih.o
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8
1 file changed, 4 insertions
1152 157684 267f4 drivers/scsi/mpt3sas/mpt3sas_scsih.o
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 2
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
---
This code was tested by compilation only.
drivers/scsi/pmcraid.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff
Remove variable assignments. The value stored in local variable _rc_ is
overwritten at line 2448:rc = lpfc_sli4_bsg_set_link_diag_state(phba, 0);
before it can be used.
Addresses-Coverity-ID: 1226935
Signed-off-by: Gustavo A. R. Silva
---
This issue was detected by Coverity and it was tested by
help. :)
--
Gustavo A. R. Silva
ses-Coverity-ID: 114984 ("Missing break in switch")
Addresses-Coverity-ID: 114985 ("Missing break in switch")
Addresses-Coverity-ID: 114988 ("Missing break in switch")
Addresses-Coverity-ID: 114994 ("Missing break in switch")
Addresses-Coverity-ID: 114995 (&
en; Adaptec OEM Raid
> Solutions; Willem Riede; Kai Mäkisara
> *Cc:* esc.storage...@microsemi.com; linux-scsi@vger.kernel.org;
> linux-ker...@vger.kernel.org; osst-us...@lists.sourceforge.net; Gustavo A. R.
> Silva
> *Subject:* [PATCH] scsi: mark expected switch fall-throughs
-Coverity-ID: 114968 ("Missing break in switch")
Addresses-Coverity-ID: 114969 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/a
eak in switch")
Addresses-Coverity-ID: 114991 ("Missing break in switch")
Addresses-Coverity-ID: 114992 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/aic94xx/aic94xx_scb.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/
Hi Martin,
On 10/11/18 4:47 AM, Martin K. Petersen wrote:
>
> Hi Gustavo,
>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>
> I'm not entirely convinced that all these identified fall through cases
> are intentional. From a qu
Add missing break statement in order to prevent the code from falling
through to case TEST_UNIT_READY.
Addresses-Coverity-ID: 1357338 ("Missing break in switch")
Suggested-by: Martin K. Petersen
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/ips.c | 1 +
1 file changed, 1
ses-Coverity-ID: 114985 ("Missing break in switch")
Addresses-Coverity-ID: 114988 ("Missing break in switch")
Addresses-Coverity-ID: 114994 ("Missing break in switch")
Addresses-Coverity-ID: 114995 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silv
itch")
Addresses-Coverity-ID: 1271175 ("Missing break in switch")
Addresses-Coverity-ID: 1129237 ("Missing break in switch")
Addresses-Coverity-ID: 1357437 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/lpfc/lpfc_ct.c| 2 +
eak in switch")
Addresses-Coverity-ID: 744901 ("Missing break in switch")
Addresses-Coverity-ID: 146155 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/bfa/bfa_fcpim.c | 6 +++---
drivers/scsi/bfa/bfa_fcs_lport.c |
On 10/17/18 3:55 AM, Martin K. Petersen wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>
> Applied to 4.20/scsi-queue.
>
Thank you, Martin.
--
Gustavo
timeout for SMP/internal IO")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c
b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 2e5eaf1..e3f7c7b 100644
--- a/driv
Hi,
I just found another instance of this same issue at line 1053.
Please, drop this patch and I'll send v2 addressing both instances, shortly.
Thanks
--
Gustavo
On 10/18/18 6:41 PM, Gustavo A. R. Silva wrote:
> There is a NULL pointer dereference in case *slot* happens to
> be N
quot;)
Fixes: 584f53fe5f52 ("scsi: hisi_sas: Fix the race between IO completion and
timeout for SMP/internal IO")
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Fix another instance of the same issue at line 1053.
- Update commit log.
drivers/scsi/hisi_sas/hisi_sas_main.c | 8 +
On 10/20/18 12:28 AM, Martin K. Petersen wrote:
>
> Gustavo,
>
>> There is a NULL pointer dereference in case *slot* happens to
>> be NULL at lines 1053 and 1878:
>>
>> struct hisi_sas_cq *cq =
>> &hisi_hba->cq[slot->dlvry_queue];
>>
>> Notice that *slot* is being NULL checked at lines 10
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/be2iscsi/be_iscsi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi
-Coverity-ID: 146155 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/bfa/bfa_ioc.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 16d3aeb0e572..32b24e51cce6 100644
--
Addresses-Coverity-ID: 744899 ("Missing break in switch")
Addresses-Coverity-ID: 744900 ("Missing break in switch")
Addresses-Coverity-ID: 744901 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 703127 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/isci/phy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dr
1 - 100 of 162 matches
Mail list logo