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/media/i2c/ov13858.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov13858.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/macintosh/windfarm_pm72.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/macintosh
Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources.
The proper pointer to be passed as argument is ch.
This issue was detected with the help of Coccinelle.
Fixes: 0b2e9e7947e7 ("media: staging/imx: remove confusing IS_ERR_OR_NULL
usage")
Signed-off-by: Gustavo A
Quoting Michael Ellerman :
"Gustavo A. R. Silva" writes:
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/macintosh/windfarm_pm72.c | 2 +-
1 file
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/macintosh/ams/ams-input.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/macintosh/ams/ams
Change the data type of the following variables from int to bool
across all macintosh drivers:
started
slots_started
pm121_started
wf_smu_started
Some of these issues were detected with the help of Coccinelle.
Suggested-by: Michael Ellerman
Signed-off-by: Gustavo A. R. Silva
---
drivers
Quoting "Gustavo A. R. Silva" :
Quoting Michael Ellerman :
"Gustavo A. R. Silva" writes:
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/macin
Hello Lucas,
Quoting Lucas Stach :
Hi Gustavo,
Am Dienstag, den 23.01.2018, 11:07 -0600 schrieb Gustavo A. R. Silva:
Fix the following warning by using %zx instead of %x for variable of
type size_t:
warning: format ‘%x’ expects argument of type ‘unsigned int’, but
argument 4 has type
Quoting Arnd Bergmann :
On Wed, Jan 24, 2018 at 1:43 AM, Gustavo A. R. Silva
wrote:
Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources.
The proper pointer to be passed as argument is ch.
This issue was detected with the help of Coccinelle.
Fixes: 0b2e9e7947e7 ("media: st
Hi Juergen,
Quoting Juergen Gross :
On 10/05/17 18:49, Gustavo A. R. Silva wrote:
Hello everybody,
While looking into Coverity ID 1350942 I ran into the following piece of
code at drivers/block/xen-blkback/xenbus.c:490:
490static int xen_blkbk_remove(struct xenbus_device *dev)
491{
492
Add null check before calling xen_blkif_put() to avoid potential
null pointer dereference.
Addresses-Coverity-ID: 1350942
Cc: Juergen Gross
Signed-off-by: Gustavo A. R. Silva
---
drivers/block/xen-blkback/xenbus.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a
if at all?
I'm trying to figure out if this is a false positive or something that
needs to be fixed.
I'd really appreciate any comment on this.
Thank you!
--
Gustavo A. R. Silva
_?
I'm trying to figure out if this is a false positive or something that
needs to be fixed.
I'd really appreciate any comment on this.
Thank you!
--
Gustavo A. R. Silva
Previous assignment was causing the use of the uninitialized variable
_explan_ inside fc_seq_ls_rjt() function, which in this particular
case is being called by fc_seq_els_rsp_send().
Addresses-Coverity-ID: 1398125
Signed-off-by: Gustavo A. R. Silva
---
drivers/scsi/libfc/fc_rport.c | 2 +-
1
Hi Andrew,
Quoting Andrew Lunn :
On Thu, May 11, 2017 at 04:35:37PM -0500, Gustavo A. R. Silva wrote:
Hello everybody,
While looking into Coverity ID 1398130 I ran into the following
piece of code at drivers/net/dsa/mv88e6xxx/chip.c:849:
849static uint64_t _mv88e6xxx_get_ethtool_stat
Add default case to switch in order to avoid any chance of using an
uninitialized variable _low_, in case s->type does not match any of
the listed case values.
Addresses-Coverity-ID: 1398130
Suggested-by: Andrew Lunn
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/dsa/mv88e6xxx/chip.c
value")
Addresses-Coverity-ID: 1463772 ("Dereference null return value")
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
b/drivers/gpu/drm/amd/amdkfd
)) {
+ mutex_unlock(&p->mutex);
+ continue;
+ }
+
if (pdd->bound == PDD_BOUND)
pdd->bound = PDD_BOUND_SUSPENDED;
mutex_unlock(&p->mutex);
Thank you for the feedback.
--
Gustavo
ty-ID: 1463794 ("Dereference null return value")
Addresses-Coverity-ID: 1463772 ("Dereference null return value")
Suggested-by: Felix Kuehling
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
Print a WARN_ON and skip PDDs that aren't found instead of returning
an error
Quoting Oded Gabbay :
On Thu, Jan 11, 2018 at 1:15 AM, Gustavo A. R. Silva
wrote:
In case kfd_get_process_device_data returns null, there are some
null pointer dereferences in functions kfd_bind_processes_to_device
and kfd_unbind_processes_from_device.
Fix this by printing a WARN_ON for
Hi Hans,
Quoting Hans Verkuil :
Hi Gustavo,
On 01/30/2018 01:33 AM, Gustavo A. R. Silva wrote:
Cast len to const u64 in order to avoid a potential integer
overflow. This variable is being used in a context that expects
an expression of type const u64.
Addresses-Coverity-ID: 1454996
Hi Daniel,
Quoting Daniel Vetter :
On Tue, Jan 23, 2018 at 10:46:07AM -0600, Gustavo A. R. Silva wrote:
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
Thanks for your patch
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
---
Changes in v2:
- Use true for boolean value in add_detailed_mode as suggested by Daniel
Vetter.
- Update subject.
drivers/gpu
Quoting Hans Verkuil :
On 01/30/2018 09:51 AM, Gustavo A. R. Silva wrote:
Hi Hans,
Quoting Hans Verkuil :
Hi Gustavo,
On 01/30/2018 01:33 AM, Gustavo A. R. Silva wrote:
Cast len to const u64 in order to avoid a potential integer
overflow. This variable is being used in a context that
Quoting Hans Verkuil :
[...]
What happens if you do: ((u64)CEC_TIM_START_BIT_TOTAL +
I think that forces everything else in the expression to be evaluated
as u64.
Well, in this case the operator precedence takes place and the
expression len * 10 * CEC_TIM_DATA_BIT_TOTAL is computed first.
Quoting Hans Verkuil :
On 01/30/18 12:43, Gustavo A. R. Silva wrote:
Quoting Hans Verkuil :
[...]
What happens if you do: ((u64)CEC_TIM_START_BIT_TOTAL +
I think that forces everything else in the expression to be evaluated
as u64.
Well, in this case the operator precedence takes
external cast to u64.
Addresses-Coverity-ID: 1357588 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
net/ipv4/tcp_nv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_nv.c b/net/ipv4/tcp_nv.c
index ddbce73..764298e 100644
--- a/net/ipv
000 is currently
being evaluated using 32-bit arithmetic.
Addresses-Coverity-ID: 1461563 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
net/openvswitch/meter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/meter.c b/net/openvswit
arithmetic.
In general, the use of incorrect arithmetic has security
implications.
Addresses-Coverity-ID: 200686
Signed-off-by: Gustavo A. R. Silva
---
net/ceph/osdmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 0da27c6
Hello Ilya,
Quoting Ilya Dryomov :
On Wed, Jan 31, 2018 at 6:29 AM, Gustavo A. R. Silva
wrote:
Cast objsetno to u64 in order to give the compiler complete
information about the proper arithmetic to use. Notice
that this variable is used in a context that expects an
expression of type u64 (64
arithmetic.
Addresses-Coverity-ID: 200687
Addresses-Coverity-ID: 200688
Addresses-Coverity-ID: 200689
Signed-off-by: Gustavo A. R. Silva
---
net/ipv4/tcp_lp.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c
index ae10ed6..4999111 100644
Hi Alan,
Quoting Alan Cox :
On Wed, 31 Jan 2018 18:24:07 -0600
"Gustavo A. R. Silva" wrote:
Cast to s64 some variables and a macro in order to give the
compiler complete information about the proper arithmetic to
use. Notice that these elements are used in contexts that
expect e
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
Return statements in functions returning bool should use
true/false instead of 1/0.
These issues were detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
net/netfilter/nf_conncount.c | 2 +-
net/netfilter/xt_hashlimit.c | 2 +-
net/netfilter/xt_ipcomp.c| 2 +-
3
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
net/bridge/br_private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_private.h b
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/ssb/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ssb/main.c b/drivers
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
net/smc/smc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/smc/smc.h b/net/smc/smc.h
index
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd
Quoting Stephen Hemminger :
On Thu, 18 Jan 2018 17:37:45 -0600
"Gustavo A. R. Silva" wrote:
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
L
Hi Ursula,
Quoting Ursula Braun :
On 01/19/2018 12:33 AM, Gustavo A. R. Silva wrote:
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
net/smc/smc.h | 2 +-
1 file
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Fix function using_ipsec as suggested by Ursula Braun.
- Update subject line.
net/smc/smc.h | 4
Quoting Felix Kuehling :
Looks good. This change is Reviewed-by: Felix Kuehling
Thanks Felix.
--
Gustavo
Bool initializations should use true and false.
This issue was detected with the help of Coccinelle.
Fixes: eaa6111b70a7 ("PCI: altera: Add Altera PCIe host controller driver")
Signed-off-by: Gustavo A. R. Silva
---
drivers/pci/host/pcie-altera.c | 2 +-
1 file changed, 1 inser
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Fixes: 342d765e011f ("power_supply: Add Dialog DA9030 battery charger driver")
Signed-off-by: Gustavo A. R. Silva
---
drivers/power/supply/da9030_battery.c |
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Fixes: 1cb3fe513f62 ("ndisc: Break down ndisc_build_skb() and build message
directly.")
Signed-off-by: Gustavo A. R. Silva
---
net/ipv6/ndisc.c | 2 +-
1 file
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Fixes: 2ae0b8af1fe3 ("tipc: add functionality to lookup multicast destination
nodes")
Signed-off-by: Gustavo A. R. Silva
---
net/tipc/bcast.c | 2 +-
1 file
l it
later")
Signed-off-by: Gustavo A. R. Silva
---
net/caif/caif_dev.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index e0adcd1..f2848d6 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -139,7 +139,7 @@
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Fixes: ffdb5211da1c ("xfrm: Auto-load xfrm offload modules")
Signed-off-by: Gustavo A. R. Silva
---
net/xfrm/xfrm_state.c | 2 +-
1 file changed, 1 inser
Quoting Ursula Braun :
[...]
Thanks, Gustavo. I have added the patch to our local repository. It will
be part of one of my next patch sets to be sent to Dave Miller.
Thanks, Ursula :)
--
Gustavo
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1463447 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
---
This code was compiled with GCC 7.2.0
drivers/net/phy/phylink.c | 2 ++
1 fi
Hi Michael,
Quoting Michael Ellerman :
On Wed, 2018-01-24 at 01:42:28 UTC, "Gustavo A. R. Silva" wrote:
Change the data type of the following variables from int to bool
across all macintosh drivers:
started
slots_started
pm121_started
wf_smu_started
Some of these issues were det
Cast expression (clock_rate - abs_nco_freq) to s64 in order to avoid
a potential integer overflow. This variable is being used in a
context that expects an expression of type s64.
Addresses-Coverity-ID: 1446589 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva
--
Cast p to dma_addr_t in order to avoid a potential integer overflow.
This variable is being used in a context that expects an expression
of type dma_addr_t (u64).
Addresses-Coverity-ID: 1458347 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
drivers/medi
ntional integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
drivers/media/platform/sh_veu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
index 976ea0b..e2795d0 100644
--- a/drivers/media/pla
Cast dev->pdata->clk to u64 in order to avoid a potential integer
overflow. This variable is being used in a context that expects
an expression of type u64.
Addresses-Coverity-ID: 1271223 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
drivers/med
Cast fi->interval.numerator to u64 in order to avoid a potential integer
overflow. This variable is being used in a context that expects an
expression of type u64.
Addresses-Coverity-ID: 1324146 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
drivers/media
Cast state->config->xin to u64 in order to avoid a potential integer
overflow. This variable is being used in a context that expects an
expression of type u64.
Addresses-Coverity-ID: 200604 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
drivers/med
l integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
drivers/media/pci/cx88/cx88-input.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/cx88/cx88-input.c
b/drivers/media/pci/cx88/cx88-input.c
index 4e9953e..096b350 100644
--- a/drivers/medi
Cast len to const u64 in order to avoid a potential integer
overflow. This variable is being used in a context that expects
an expression of type const u64.
Addresses-Coverity-ID: 1454996 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva
---
drivers/media/plat
s the following Coverity IDs reported as
"Unintentional integer overflow" issues:
200604, 1056807, 1056808, 1271223,
1324146, 1392628, 1392630, 1446589,
1454996, 1458347.
Thank you
Gustavo A. R. Silva (8):
rtl2832: fix potential integer overflow
dvb-frontends: ves1820: fix potential i
Quoting Michal Simek :
On 16.1.2018 15:22, Dhaval Rajeshbhai Shah wrote:
Hi,
-Original Message-
From: Gustavo A. R. Silva [mailto:garsi...@embeddedor.com]
Sent: Monday, January 15, 2018 11:15 AM
To: Michal Simek ; Dhaval Rajeshbhai Shah
Cc: linux-arm-ker...@lists.infradead.org
_vcu: Add Xilinx ZYNQMP VCU logicoreIP
init driver")
Signed-off-by: Gustavo A. R. Silva
---
drivers/soc/xilinx/xlnx_vcu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/xilinx/xlnx_vcu.c b/drivers/soc/xilinx/xlnx_vcu.c
index c1d6f1b..a840c02 100644
--- a/dri
In preparation to enabling -Wvla, remove VLA and replace it
with a fixed-length array instead.
Fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
drivers/input/keyboard/stmpe-keypad.c | 10 ++
1
In preparation to enabling -Wvla, remove VLA and replace it
with a fixed-length array instead.
Fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
Notice that due to this change, the field max_interleave
Hi Dmitry,
On 03/09/2018 05:32 PM, Dmitry Torokhov wrote:
On Fri, Mar 09, 2018 at 04:42:08PM -0600, Gustavo A. R. Silva wrote:
In preparation to enabling -Wvla, remove VLA and replace it
with a fixed-length array instead.
Fixed as part of the directive to remove all VLAs from
the kernel
In preparation to enabling -Wvla, remove VLA and replace it
with a fixed-length array instead.
Fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Update the code based on Dmitry Torokhov
Hi Krzysztof,
On 03/09/2018 07:04 AM, Krzysztof Kozlowski wrote:
On Thu, Mar 8, 2018 at 7:03 PM, Gustavo A. R. Silva
wrote:
On 03/08/2018 11:58 AM, Kees Cook wrote:
On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva
wrote:
In preparation to enabling -Wvla, remove VLAs and replace
Move this enum to rtc-s5m.c once it is meaningless to others drivers [1].
[1] https://marc.info/?l=linux-rtc&m=152060068925948&w=2
Signed-off-by: Gustavo A. R. Silva
---
drivers/rtc/rtc-s5m.c | 11 +++
include/linux/mfd/samsung/rtc.h | 11 ---
2 files cha
VLAs, hence turning them
into fixed-length arrays instead.
[1] https://marc.info/?l=linux-rtc&m=152060068925948&w=2
Thanks
Gustavo A. R. Silva (2):
rtc: s5m: move enum from rtc.h to rtc-s5m.c
rtc: s5m: Remove VLA usage
drivers/rtc/rtc-s5m.c | 25 +++--
hus, we
can end up having segfaults that are hard to debug.
Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
drivers/rtc/rtc-s5m.c | 14 --
1 file changed, 8 insertions(+), 6 deleti
On 03/10/2018 05:12 PM, Kees Cook wrote:
On Sat, Mar 10, 2018 at 3:06 PM, Arend van Spriel
wrote:
On 3/9/2018 1:30 PM, Andreas Christoforou wrote:
The kernel would like to have all stack VLA usage removed.
I think there was a remark made earlier to give more explanation here. It
should e
Hi Pablo,
On 03/11/2018 05:04 PM, Pablo Neira Ayuso wrote:
On Tue, Mar 06, 2018 at 12:47:55PM -0600, Gustavo A. R. Silva wrote:
In preparation to enabling -Wvla, remove VLA and replace it
with dynamic memory allocation.
Looks good but...
Signed-off-by: Gustavo A. R. Silva
---
net
On 03/11/2018 05:21 PM, Pablo Neira Ayuso wrote:
On Sun, Mar 11, 2018 at 05:12:09PM -0500, Gustavo A. R. Silva wrote:
Hi Pablo,
On 03/11/2018 05:04 PM, Pablo Neira Ayuso wrote:
On Tue, Mar 06, 2018 at 12:47:55PM -0600, Gustavo A. R. Silva wrote:
In preparation to enabling -Wvla, remove VLA
Hi Borislav,
On 03/10/2018 08:04 AM, Borislav Petkov wrote:
On Fri, Mar 09, 2018 at 09:02:18PM -0600, Gustavo A. R. Silva wrote:
In preparation to enabling -Wvla, remove VLA and replace it
with a fixed-length array instead.
Fixed as part of the directive to remove all VLAs from
the kernel
we
can end up having segfaults that are hard to debug.
Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
net/netfilter/nfnetlink_cttimeout.c | 26 +-
1 file changed, 17 inserti
we
can end up having segfaults that are hard to debug.
Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
net/netfilter/nfnetlink_cthelper.c | 25 +
1 file changed, 17 inserti
we
can end up having segfaults that are hard to debug.
Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
net/netfilter/nf_tables_api.c | 23 +++
1 file changed, 15 insertions(+)
On 03/12/2018 07:35 PM, Alexandre Belloni wrote:
Hi,
On 10/03/2018 at 00:27:02 -0600, Gustavo A. R. Silva wrote:
This patchset aims to remove VLA usage from rtc-s5m.
The first patch moves an enum from rtc.h to rtc-s5m.c, as this is the
only driver in which such enum is actually being used
we
can end up having segfaults that are hard to debug.
Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Use kmalloc_array instead of kcalloc.
net/netfilter/nf_tables_api.c |
On 03/11/2018 11:39 AM, Krzysztof Kozlowski wrote:
On Sat, Mar 10, 2018 at 7:27 AM, Gustavo A. R. Silva
wrote:
Move this enum to rtc-s5m.c once it is meaningless to others drivers [1].
[1] https://marc.info/?l=linux-rtc&m=152060068925948&w=2
Instead of external link (which might
On 03/09/2018 05:02 AM, Emil Velikov wrote:
On 9 March 2018 at 10:59, Eric Engestrom wrote:
On Thursday, 2018-03-08 11:39:49 -0600, Gustavo A. R. Silva wrote:
In preparation to enabling -Wvla, remove VLA usage.
Also, fixed as part of the directive to remove all VLAs from
the kernel: https
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
---
net/xfrm/xfrm_policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm
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
---
net/netfilter/ipvs/ip_vs_lblc.c | 4 ++--
net/netfilter/ipvs/ip_vs_lblcr.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions
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
---
net/caif/caif_dev.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/caif/caif_dev.c b/net/caif
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
---
net/ipv6/ndisc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index
On 03/05/2018 04:10 PM, Pablo Neira Ayuso wrote:
On Tue, Feb 13, 2018 at 08:25:57AM -0600, Gustavo A. R. Silva wrote:
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
This one didn't get in time fo
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
---
net/tipc/bcast.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index
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/infiniband/hw/bnxt_re/qplib_sp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw
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/spi/spi-tegra20-slink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-tegra20
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/hid/hid-ntrig.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/hid/hid-ntrig.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/hid/hid-multitouch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-multitouch.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/input/mouse/appletouch.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/mouse
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/pinctrl/mediatek/pinctrl-mtk-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
In preparation to enabling -Wvla, remove VLA and replace it
with dynamic memory allocation.
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c | 25 +
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet
Hi Jiri,
On 03/06/2018 08:20 AM, Jiri Kosina wrote:
On Mon, 5 Mar 2018, Gustavo A. R. Silva wrote:
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
I've commited this (an
In preparation to enabling -Wvla, remove VLA and replace it
with dynamic memory allocation.
Signed-off-by: Gustavo A. R. Silva
---
net/netfilter/nfnetlink_cttimeout.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nfnetlink_cttimeout.c
b/net
On 03/07/2018 11:25 AM, David Miller wrote:
From: "Gustavo A. R. Silva"
Date: Mon, 5 Mar 2018 23:39:34 -0600
In preparation to enabling -Wvla, remove VLA and replace it
with dynamic memory allocation.
Signed-off-by: Gustavo A. R. Silva
All of these lengths are limited by the e
Remove VLA usage and change the 'len' argument to a u8 and use a 256
byte buffer on the stack. Notice that these lengths are limited by the
encoding field in the VPD structure, which is a u8 [1].
[1] https://marc.info/?l=linux-netdev&m=152044354814024&w=2
Signed-off-by: G
In preparation to enabling -Wvla, remove VLA and replace it
with a fixed-length array instead. Also, remove variable 'len'.
Notice that no new IDs have been added in seven years.
Signed-off-by: Gustavo A. R. Silva
---
drivers/video/fbdev/via/via_aux_vt1632.c | 6 +++---
1 file
301 - 400 of 3578 matches
Mail list logo