Re: [PATCH 00/14] drm/amd/pm: Replace one-element arrays with flexible-array members

2020-10-08 Thread Gustavo A. R. Silva
On Thu, Oct 08, 2020 at 09:19:47AM +0200, Christian König wrote: > Am 07.10.20 um 18:01 schrieb Gustavo A. R. Silva: > > Hi all, > > > > This series aims to replace one-element arrays with flexible-array > > members. > > > > There is a regular need in

[PATCH 14/14] drm/amd/pm: Replace one-element array with flexible-array in struct ATOM_Vega10_GFXCLK_Dependency_Table

2020-10-07 Thread Gustavo A. R. Silva
Link: https://lore.kernel.org/lkml/5f7d61dd.o8jxxi5c6p9fob%2fd%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_pptable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_pptable.h

[PATCH 13/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_ppt_v1_pcie_table

2020-10-07 Thread Gustavo A. R. Silva
-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7db0bc.7xivn4k83f7xw0ug%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- .../drm/amd/pm/powerplay/hwmgr/hwmgr_ppt.h| 2 +- .../powerplay/hwmgr

[PATCH 12/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_ppt_v1_voltage_lookup_table

2020-10-07 Thread Gustavo A. R. Silva
/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7d61df.jwrffnjxgbjskpop%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr_ppt.h | 2 +- .../drm

[PATCH 11/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_ppt_v1_mm_clock_voltage_dependency_table

2020-10-07 Thread Gustavo A. R. Silva
://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7d61e2.qitvtyg2pvog8bb0%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr_ppt.h| 2

[PATCH 10/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_ppt_v1_clock_voltage_dependency_table

2020-10-07 Thread Gustavo A. R. Silva
://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: Signed-off-by: Gustavo A. R. Silva --- .../drm/amd/pm/powerplay/hwmgr/hwmgr_ppt.h| 2 +- .../powerplay/hwmgr/process_pptables_v1_0.c | 31 .../powerplay

[PATCH 09/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_samu_clock_voltage_dependency_table

2020-10-07 Thread Gustavo A. R. Silva
ero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d3a.rym4gmzr3e0jezy+%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h| 2 +- .../gpu/drm/amd/pm/powerplay/hwmgr/processpptable

[PATCH 08/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_cac_leakage_table

2020-10-07 Thread Gustavo A. R. Silva
nel test robot Link: https://lore.kernel.org/lkml/5f7c5d38.it%2fqtjn+659xudo5%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h | 2 +- .../drm/amd/pm/powerplay/hwmgr/processpptables.c| 13 + 2 files changed, 6 inserti

[PATCH 07/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_vce_clock_voltage_dependency_table

2020-10-07 Thread Gustavo A. R. Silva
and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d35.pjtogs3h9khzk6ws%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h| 2 +- .../gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c |

[PATCH 06/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_phase_shedding_limits_table

2020-10-07 Thread Gustavo A. R. Silva
ent-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d36.6pstuzp2hrxaz7im%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h | 2 +- .../gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c | 12 2 fi

[PATCH 05/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_acp_clock_voltage_dependency_table

2020-10-07 Thread Gustavo A. R. Silva
one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d3c.tyfohg%2fa6jycl6zn%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h| 2 +- .../gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c |

[PATCH 04/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_uvd_clock_voltage_dependency_table

2020-10-07 Thread Gustavo A. R. Silva
one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c433e.pxkc6ksn6hn%2fldhj%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h| 2 +- .../gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c |

[PATCH 03/14] drm/amd/pm: Replace one-element array with flexible-array in struct phm_clock_array

2020-10-07 Thread Gustavo A. R. Silva
/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c433f.zymd+yuivawihgve%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h| 2 +- .../amd/pm/powerplay

[PATCH 02/14] drm/amd/pm: Replace one-element array with flexible-array member in struct vi_dpm_table

2020-10-07 Thread Gustavo A. R. Silva
://lore.kernel.org/lkml/5f7c433c.ttk9rna+f58kyduy%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h index a1dbfd5636e6

[PATCH 01/14] drm/amd/pm: Replace one-element array with flexible-array member

2020-10-07 Thread Gustavo A. R. Silva
/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c295c.8iqp1ifc6oivdq%2f%2f%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/inc/hwmgr.h | 4

[PATCH 00/14] drm/amd/pm: Replace one-element arrays with flexible-array members

2020-10-07 Thread Gustavo A. R. Silva
-arrays [3] https://git.kernel.org/linus/44720996e2d79e47d508b0abe99b931a726a3197 [4] https://github.com/KSPP/linux/issues/109 Gustavo A. R. Silva (14): drm/amd/pm: Replace one-element array with flexible-array member drm/amd/pm: Replace one-element array with flexible-array member in struct

Re: [PATCH][next] block: scsi_ioctl: Avoid the use of one-element arrays

2020-10-02 Thread Gustavo A. R. Silva
On Fri, Oct 02, 2020 at 05:58:33PM -0600, Jens Axboe wrote: > >>> - void__user *reserved[1];/* unused, actually */ > >>> + union { > >>> + void__user *reserved[1];/* unused, actually */ > >>> + void__user *unused; > >>> + }; > >> >

Re: [PATCH][next] block: scsi_ioctl: Avoid the use of one-element arrays

2020-10-02 Thread Gustavo A. R. Silva
On Fri, Oct 02, 2020 at 05:53:05PM -0600, Jens Axboe wrote: > On 10/2/20 5:10 PM, Gustavo A. R. Silva wrote: > > diff --git a/include/uapi/linux/cdrom.h b/include/uapi/linux/cdrom.h > > index 2817230148fd..6c34f6e2f1f7 100644 > > --- a/include/uapi/linux/cdrom.h > &g

[PATCH][next] rsxx: Use fallthrough pseudo-keyword

2020-10-02 Thread Gustavo A. R. Silva
Replace /* Fall through. */ comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/block/rsxx/core.c | 2 +- 1 file

[PATCH][next] bpf: verifier: Use fallthrough pseudo-keyword

2020-10-02 Thread Gustavo A. R. Silva
Replace /* fallthrough */ comments with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- kernel/bpf/verifier.c | 4 ++-- 1 file changed

[PATCH][next] bnx2x: Use fallthrough pseudo-keyword

2020-10-02 Thread Gustavo A. R. Silva
Replace /* no break */ comments with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

[PATCH][next] block: scsi_ioctl: Avoid the use of one-element arrays

2020-10-02 Thread Gustavo A. R. Silva
om/ Signed-off-by: Gustavo A. R. Silva --- block/scsi_ioctl.c | 6 +++--- include/uapi/linux/cdrom.h | 5 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 600e38cb69b2..2dfb699389df 100644 --- a/block/scsi_ioctl.c +

[PATCH][next] net: ksz884x: Use fallthrough pseudo-keyword

2020-10-02 Thread Gustavo A. R. Silva
Replace /* Fallthrough... */ comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/micrel/ksz884x.c | 3

[PATCH][next] net: bna: Use fallthrough pseudo-keyword

2020-10-02 Thread Gustavo A. R. Silva
Replace /* !!! fall through !!! */ comments with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/brocade/bna

[PATCH][next] usbnet: Use fallthrough pseudo-keyword

2020-10-02 Thread Gustavo A. R. Silva
Replace // FALLTHROUGH comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/net/usb/usbnet.c | 2 +- 1 file changed, 1

[PATCH][next] pata_cmd64x: Use fallthrough pseudo-keyword

2020-10-02 Thread Gustavo A. R. Silva
Replace /* FALL THRU */ comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/ata/pata_cmd64x.c | 2 +- 1 file changed, 1

[PATCH][next] printk: Use fallthrough pseudo-keyword

2020-10-02 Thread Gustavo A. R. Silva
Replace /* FALL THRU */ comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- kernel/printk/printk.c | 2 +- 1 file changed, 1

[tip: x86/platform] x86/uv/time: Use a flexible array in struct uv_rtc_timer_head

2020-10-01 Thread tip-bot2 for Gustavo A. R. Silva
The following commit has been merged into the x86/platform branch of tip: Commit-ID: a0947081af2ac9549e6ba19877456730713bde23 Gitweb: https://git.kernel.org/tip/a0947081af2ac9549e6ba19877456730713bde23 Author:Gustavo A. R. Silva AuthorDate:Thu, 01 Oct 2020 09:56:08 -05:00

[PATCH 3/3][next] lib/stackdepot.c: Use array_size() helper in jhash2()

2020-10-01 Thread Gustavo A. R. Silva
Use array_size() helper instead of the open-coded version in jhash2(). These sorts of multiplication factors need to be wrapped in array_size(). Also, use the preferred form for passing the size of an object type. Signed-off-by: Gustavo A. R. Silva --- lib/stackdepot.c | 4 ++-- 1 file changed

[PATCH 2/3][next] lib/stackdepot.c: Use flex_array_size() helper in memcpy()

2020-10-01 Thread Gustavo A. R. Silva
. Signed-off-by: Gustavo A. R. Silva --- lib/stackdepot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index c6106cfb7950..683b6a8ddade 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -135,7 +135,7 @@ static struct stack_record

[PATCH 1/3][next] lib/stackdepot.c: Replace one-element array with flexible-array member

2020-10-01 Thread Gustavo A. R. Silva
/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f75876b.x9zdn10esic0qlhv%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- lib/stackdepot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a

[PATCH 0/3][next] lib/stackdepot.c: Replace one-element array with flexible-array member

2020-10-01 Thread Gustavo A. R. Silva
Hi, This series aim to replace a one-element array with a flexible-array member. Also, make use of the struct_size(), flexible_array_size() and array_size() helpers. Thanks -- Gustavo Gustavo A. R. Silva (3): lib/stackdepot.c: Replace one-element array with flexible-array member lib

[PATCH v2][next] x86/uv/time: Replace one-element array and save heap space

2020-10-01 Thread Gustavo A. R. Silva
-rc1/process/deprecated.html#zero-length-and-one-element-arrays [3] https://lore.kernel.org/lkml/20200518190114.GA7757@embeddedor/ Reviewed-by: Kees Cook Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f75bc0a.rqcns6620b2ea74s%25...@intel.com/ Signed-off-by: Gustavo A. R

Re: [PATCH][next] mtd: rawnand: Replace one-element array with flexible-array member

2020-09-30 Thread Gustavo A. R. Silva
On Wed, Sep 30, 2020 at 11:10:43PM +0200, Jann Horn wrote: > On Wed, Sep 30, 2020 at 11:02 PM Gustavo A. R. Silva > wrote: > > There is a regular need in the kernel to provide a way to declare having > > a dynamically sized set of trailing elements in a structure. Kernel code

[PATCH][next] mtd: rawnand: Replace one-element array with flexible-array member

2020-09-30 Thread Gustavo A. R. Silva
[2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7473c0.vv4h6yzxsga90p04%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/mtd/nand/raw/tegra_nand.c | 9 ++

Re: [PATCH] KVM: use struct_size() and flex_array_size() helpers in kvm_io_bus_unregister_dev()

2020-09-30 Thread Gustavo A. R. Silva
Hi Sasha, On 9/21/20 07:54, Sasha Levin wrote: > > NOTE: The patch will not be queued to stable trees until it is upstream. > > How should we proceed with this patch? > This patch should not go to -stable. The author has resent it without the _stable_ stag. Thanks -- Gustavo

Re: [PATCH] x86/uv/time: Replace one-element array and save heap space

2020-09-29 Thread Gustavo A. R. Silva
Hi all, Who can take this? Thanks -- Gustavo On 5/21/20 18:24, Gustavo A. R. Silva wrote: > [+CC John Stultz and +Kees' Reviewed-by tag] > > Reviewed-by: Kees Cook > > On Mon, May 18, 2020 at 02:01:14PM -0500, Gustavo A. R. Silva wrote: >> The current codebas

[PATCH][next] ice: Replace one-element array with flexible-array member

2020-09-29 Thread Gustavo A. R. Silva
/www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Built-tested-by: kernel test robot Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/intel/ice/ice.h | 2 +- drivers/net/ethernet/intel/ice/ice_main.c | 6 +++--- 2 files changed, 4 insertions

[PATCH][next] perf: arm-cmn: Fix unsigned comparison to less than zero

2020-09-29 Thread Gustavo A. R. Silva
Unsigned compared against 0") Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver") Signed-off-by: Gustavo A. R. Silva --- drivers/perf/arm-cmn.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c index e82

[PATCH][next] fddi/skfp: Avoid the use of one-element array

2020-09-29 Thread Gustavo A. R. Silva
-arrays [2] https://github.com/KSPP/linux/issues/86 Built-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f72c23f.%2fkpbwczbu+w6hkh4%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/net/fddi/skfp/h/smc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [PATCH][next] qed/qed_ll2: Replace one-element array with flexible-array member

2020-09-29 Thread Gustavo A. R. Silva
On Mon, Sep 28, 2020 at 06:48:14PM -0700, David Miller wrote: > From: "Gustavo A. R. Silva" > Date: Mon, 28 Sep 2020 10:16:17 -0500 > > > There is a regular need in the kernel to provide a way to declare having > > a dynamically sized set of trailing eleme

Re: [PATCH][next] dpaa2-mac: Fix potential null pointer dereference

2020-09-29 Thread Gustavo A. R. Silva
On Fri, Sep 25, 2020 at 05:15:54PM -0700, David Miller wrote: > From: "Gustavo A. R. Silva" > Date: Fri, 25 Sep 2020 12:03:23 -0500 > > > There is a null-check for _pcs_, but it is being dereferenced > > prior to this null-check. So, if _pcs_ can actually be null

Re: [PATCH][next] net/mlx5e: Fix potential null pointer dereference

2020-09-29 Thread Gustavo A. R. Silva
On Mon, Sep 28, 2020 at 04:22:33PM -0700, Saeed Mahameed wrote: > On Fri, 2020-09-25 at 11:49 -0500, Gustavo A. R. Silva wrote: > > Calls to kzalloc() and kvzalloc() should be null-checked > > in order to avoid any potential failures. In this case, > > a potential nul

Reporting bug in mpi_ec_mul_point()

2020-09-28 Thread Gustavo A. R. Silva
Hi all, I'm reporting the following bug detected by Coverity: The _scalar_copied_ variable is set to 0 at lib/mpi/ec.c:1255: 1255 int scalar_copied = 0; and it is never updated before reaching the code below: lib/mpi/ec.c:1317 1317 if (scalar_copied)

[PATCH][next] crypto: sun8i-ss - Fix memory leak in sun8i_ss_prng_generate()

2020-09-28 Thread Gustavo A. R. Silva
rt for the PRNG") Signed-off-by: Gustavo A. R. Silva --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-prng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-prng.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-prng.c index 08a147

[PATCH][next] net/sched: cls_u32: Replace one-element array with flexible-array member

2020-09-28 Thread Gustavo A. R. Silva
ion code for _ht_. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7062af.z3t9tn9yipv6h5ny%25...@intel.com/ Signed-off-

[PATCH][next] qed/qed_ll2: Replace one-element array with flexible-array member

2020-09-28 Thread Gustavo A. R. Silva
y: kernel test robot Link: https://lore.kernel.org/lkml/5f707198.pa1ucz8myozyzyar%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 18 -- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 8 2 files changed, 12 inserti

[PATCH][next] dpaa2-mac: Fix potential null pointer dereference

2020-09-25 Thread Gustavo A. R. Silva
efore null check") Fixes: 94ae899b2096 ("dpaa2-mac: add PCS support through the Lynx module") Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/

[PATCH][next] net/mlx5e: Fix potential null pointer dereference

2020-09-25 Thread Gustavo A. R. Silva
check") Fixes: c620b772152b ("net/mlx5: Refactor tc flow attributes structure") Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/

Re: [PATCH][next] drm/i915: Fix inconsistent IS_ERR and PTR_ERR

2020-09-25 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this? Thanks -- Gustavo On 9/10/20 05:21, Gustavo A. R. Silva wrote: > Fix inconsistent IS_ERR and PTR_ERR in i915_gem_object_copy_blt(). > > The proper pointer to be passed as argument to PTR_ERR() is vma[1]. > > This bug was detected w

Re: [PATCH v3] nfs: remove incorrect fallthrough label

2020-09-24 Thread Gustavo A. R. Silva
On Thu, Sep 24, 2020 at 10:19:08AM -0700, Nick Desaulniers wrote: > Hello maintainers, > Would you mind please picking up this patch? KernelCI has been > erroring for over a week without it. > I can add this to my -next tree and queue it up for the next merge window. Thanks -- Gustavo

Re: [PATCH] tee: fix some comment typos in header files

2020-09-19 Thread Gustavo A. R. Silva
Hi, Here is another one you can solve: $ git grep -nw overlfow net/sctp/tsnmap.c:78:* overlfow our map Thanks -- Gustavo On 9/19/20 20:58, Elvira Khabirova wrote: > struct tee_param: revc -> recv. > TEE_IOC_SUPPL_SEND: typo introduced by copy-pasting, replace invalid > description with desc

Re: [PATCH] KVM: use struct_size() and flex_array_size() helpers in kvm_io_bus_unregister_dev()

2020-09-18 Thread Gustavo A. R. Silva
er within an enclosing structure > > Cc: sta...@vger.kernel.org I don't think this change applies for -stable. > Suggested-by: Gustavo A. R. Silva > Signed-off-by: Rustam Kovhaev Reviewed-by: Gustavo A. R. Silva Thanks! -- Gustavo > --- > virt/kvm/kvm_main.c | 4 ++-- &g

Re: [GIT PULL] percpu fix for v5.9-rc6

2020-09-18 Thread Gustavo A. R. Silva
On Fri, Sep 18, 2020 at 12:37:48PM -0700, Linus Torvalds wrote: > On Fri, Sep 18, 2020 at 12:28 PM Gustavo A. R. Silva > wrote: > > > > OK. It seems that we are talking about two different things here. One thing > > is to apply sizeof() to a structure that contains

Re: [GIT PULL] percpu fix for v5.9-rc6

2020-09-18 Thread Gustavo A. R. Silva
On Fri, Sep 18, 2020 at 10:23:54AM -0700, Linus Torvalds wrote: > On Fri, Sep 18, 2020 at 9:17 AM Gustavo A. R. Silva > wrote: > > > > This bug could have been prevented by either adopting better > > coding practices or through the use[3] of the recent struct_size() helper

Re: [GIT PULL] percpu fix for v5.9-rc6

2020-09-18 Thread Gustavo A. R. Silva
On Thu, Sep 17, 2020 at 06:05:13PM -0700, Linus Torvalds wrote: > On Thu, Sep 17, 2020 at 1:45 PM Dennis Zhou wrote: > > > > > > diff --git a/mm/percpu.c b/mm/percpu.c > > index f4709629e6de..1ed1a349eab8 100644 > > --- a/mm/percpu.c > > +++ b/mm/percpu.c > > @@ -1316,7 +1316,7 @@ static struct pc

Re: [PATCH] scsi: arcmsr: Remove the superfluous break

2020-09-18 Thread Gustavo A. R. Silva
On Fri, Sep 18, 2020 at 05:32:30PM +0800, Jing Xiangfeng wrote: > Remove the superfluous break, as there is a 'return' before it. > Apparently, the change is correct. Please, just add a proper Fixes tag by yourself this time. Thanks -- Gustavo > Signed-off-by: Jing Xiangfeng > --- > drivers/sc

Re: [PATCH] fbcon: Remove the superfluous break

2020-09-17 Thread Gustavo A. R. Silva
On 9/17/20 08:15, Jing Xiangfeng wrote: > Remove the superfuous break, as there is a 'return' before it. > > Signed-off-by: Jing Xiangfeng Reviewed-by: Gustavo A. R. Silva Also, the following Fixes tag should be included in the changelog text: Fixes: bad07ff74c32 (&q

Re: [PATCH v2] nfs: remove incorrect fallthrough label

2020-09-16 Thread Gustavo A. R. Silva
fallthrough__) > * goto (plz no) > * (call of function with __attribute__(__noreturn__)) > > Fixes: 2a1390c95a69 ("nfs: Convert to use the preferred fallthrough macro") > Link: https://bugs.llvm.org/show_bug.cgi?id=47539 > Suggested-by: Joe Perches > Signed-off-by: Ni

Re: [PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-16 Thread Gustavo A. R. Silva
On 9/16/20 14:50, Alex Dewar wrote: [..] > > drivers/net/dsa/mt7530.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > [..] > > /* Enable Mediatek header mode on the cpu port */ > mt7530_write(priv, MT7530_PVC_P(port), > @@ -2275,7 +2279,7 @@ mt753

Re: [PATCH] nfs: remove incorrect fallthrough label

2020-09-15 Thread Gustavo A. R. Silva
On 9/15/20 18:29, Joe Perches wrote: > On Tue, 2020-09-15 at 15:57 -0700, Nick Desaulniers wrote: >> There is no case after the default from which to fallthrough to. Clang >> will error in this case (unhelpfully without context, see link below) >> and GCC will with -Wswitch-unreachable. >> >> Th

Re: [PATCH] nfs: remove incorrect fallthrough label

2020-09-15 Thread Gustavo A. R. Silva
On 9/15/20 18:51, Gustavo A. R. Silva wrote: > > > On 9/15/20 18:29, Joe Perches wrote: >> On Tue, 2020-09-15 at 15:57 -0700, Nick Desaulniers wrote: >>> There is no case after the default from which to fallthrough to. Clang >>> will error in this case (unhe

Re: [PATCH] docs: deprecated.rst: Update zero-length/one-element arrays section

2020-09-11 Thread Gustavo A. R. Silva
On Wed, Sep 09, 2020 at 11:38:23AM -0600, Jonathan Corbet wrote: > On Mon, 31 Aug 2020 20:09:49 -0500 > "Gustavo A. R. Silva" wrote: > > > Update information in the zero-length and one-element arrays section > > and illustrate how to make use of the new flex_ar

Re: [PATCH] pcmcia: db1xxx_ss: remove unneeded semicolon

2020-09-10 Thread Gustavo A. R. Silva
On Thu, Sep 10, 2020 at 10:05:24PM +0800, Jason Yan wrote: > Eliminate the following coccicheck warning: > > drivers/pcmcia/db1xxx_ss.c:455:2-3: Unneeded semicolon > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan Acked-by: Gustavo A. R. Silva Thanks -- Gustavo >

Re: [PATCH] video: fbdev: fsl-diu-fb: remove unneeded variable 'res'

2020-09-10 Thread Gustavo A. R. Silva
On Thu, Sep 10, 2020 at 10:05:58PM +0800, Jason Yan wrote: > Eliminate the following coccicheck warning: > > drivers/video/fbdev/fsl-diu-fb.c:1428:5-8: Unneeded variable: "res". > Return "0" on line 1450 > > Reported-by: Hulk Robot > Signed-off-by:

[PATCH][next] drm/i915: Fix inconsistent IS_ERR and PTR_ERR

2020-09-10 Thread Gustavo A. R. Silva
t;) Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/i915/gem/i915_gem_object_blt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c b/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c index d93eb36160c9..aee7ad3cc3c6 100644 ---

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Gustavo A. R. Silva
is break; > > Found using: > > $ grep-2.5.4 -rP --include=*.[ch] -n > "fallthrough;(\s*(case\s+\w+|default)\s*:\s*){1,7}break;" * > > Miscellanea: > > o Move or coalesce a couple label blocks above a default: block. > > Signed-off-by:

Re: [PATCH v2] KVM: fix memory leak in kvm_io_bus_unregister_dev()

2020-09-04 Thread Gustavo A. R. Silva
On Fri, Sep 04, 2020 at 02:04:23PM +0200, Vitaly Kuznetsov wrote: > Rustam Kovhaev writes: > > > On Wed, Sep 02, 2020 at 06:34:11PM -0500, Gustavo A. R. Silva wrote: > >> Hi, > >> > >> On 9/2/20 17:57, Rustam Kovhaev wrote: > >> > when kma

Re: [PATCH] RDMA/ucma: Fix resource leak on error path

2020-09-02 Thread Gustavo A. R. Silva
On 9/2/20 19:32, Jason Gunthorpe wrote: >>> Addresses-Coverity: ("Resource leak") >> >> If you are using a public Coverity scan, please also include the Coverity ID. >> In this case ID 1496814, something like: >> >> Addresses-Coverity-ID: 1496814 ("Resource leak") > > Thanks, I fixed it up >

Re: [PATCH] RDMA/ucma: Fix resource leak on error path

2020-09-02 Thread Gustavo A. R. Silva
Hi Alex, On 9/2/20 11:24, Alex Dewar wrote: > In ucma_process_join(), if the call to xa_alloc() fails, the function > will return without freeing mc. Fix this by jumping to the correct line. > > In the process I renamed the jump labels to something more memorable for > extra clarity. > > Address

Re: [PATCH v2] KVM: fix memory leak in kvm_io_bus_unregister_dev()

2020-09-02 Thread Gustavo A. R. Silva
Hi, On 9/2/20 17:57, Rustam Kovhaev wrote: > when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing > the bus, we should iterate over all other devices linked to it and call > kvm_iodevice_destructor() for them > > Reported-and-tested-by: syzbot+f196caa45793d6374...@syzkaller.appspo

Re: [PATCH][next] xsk: Fix null check on error return path

2020-09-02 Thread Gustavo A. R. Silva
On Wed, Sep 02, 2020 at 08:33:41PM +0200, Daniel Borkmann wrote: > On 9/2/20 5:07 PM, Gustavo A. R. Silva wrote: > > Currently, dma_map is being checked, when the right object identifier > > to be null-checked is dma_map->dma_pages, instead. > > > > Fix this by nu

Re: [PATCH v2] power: supply: charger-manager: Fix info message in check_charging_duration()

2020-09-02 Thread Gustavo A. R. Silva
On Wed, Sep 02, 2020 at 09:29:31AM -0700, Randy Dunlap wrote: > On 9/2/20 9:23 AM, Gustavo A. R. Silva wrote: > > A few months ago, commit e132fc6bb89b ("power: supply: charger-manager: > > Make decisions focussed on battery status") > > changed the expression in

Re: [PATCH][next] xsk: Fix null check on error return path

2020-09-02 Thread Gustavo A. R. Silva
On Wed, Sep 02, 2020 at 05:12:51PM +0200, Björn Töpel wrote: > On 2020-09-02 17:07, Gustavo A. R. Silva wrote: > > Currently, dma_map is being checked, when the right object identifier > > to be null-checked is dma_map->dma_pages, instead. > > > > Fix this by nu

[PATCH v2] power: supply: charger-manager: Fix info message in check_charging_duration()

2020-09-02 Thread Gustavo A. R. Silva
error") Fixes: e132fc6bb89b ("power: supply: charger-manager: Make decisions focussed on battery status") Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Replace "exceed" with "exceeds" drivers/power/supply/charger-manager.c | 6 +++--- 1 file changed,

[PATCH][next] xsk: Fix null check on error return path

2020-09-02 Thread Gustavo A. R. Silva
pings") Signed-off-by: Gustavo A. R. Silva --- net/xdp/xsk_buff_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c index 795d7c81c0ca..5b00bc5707f2 100644 --- a/net/xdp/xsk_buff_pool.c +++ b/net/xdp/xsk_buff_pool.c

[PATCH] power: supply: charger-manager: Fix info message in check_charging_duration()

2020-09-02 Thread Gustavo A. R. Silva
_ms", but the arguments for dev_info() were left unchanged. Apparently, due to a copy-paste error. Fix this by using the proper arguments for dev_info(). Addresses-Coverity-ID: 1496803 ("Copy-paste error") Fixes: e132fc6bb89b ("power: supply: charger-manager: Make decisions focusse

Re: [PATCH] rt2x00: Use fallthrough pseudo-keyword macro

2020-09-02 Thread Gustavo A. R. Silva
On 9/2/20 08:05, Leesoo Ahn wrote: > Replace all '/* fall through */' comments with the macro[1]. > > [1]: > https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through > This looks familiar... https://lore.kernel.org/lkml/20200821062

[PATCH][next] mt7601u: Use fallthrough pseudo-keyword

2020-09-01 Thread Gustavo A. R. Silva
-through Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/mediatek/mt7601u/dma.c | 4 ++-- drivers/net/wireless/mediatek/mt7601u/mac.c | 4 ++-- drivers/net/wireless/mediatek/mt7601u/phy.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless

[PATCH][next] mt76: Use fallthrough pseudo-keyword

2020-09-01 Thread Gustavo A. R. Silva
-through Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2

Re: [PATCH] pktgen: fix error message with wrong function name

2020-09-01 Thread Gustavo A. R. Silva
ode()") Acked-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > net/core/pktgen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/core/pktgen.c b/net/core/pktgen.c > index 95f4c6b8f51a..44fdbb9c6e53 100644 > --- a/net/core/pktgen.c >

[PATCH] docs: deprecated.rst: Update zero-length/one-element arrays section

2020-08-31 Thread Gustavo A. R. Silva
Update information in the zero-length and one-element arrays section and illustrate how to make use of the new flex_array_size() helper, together with struct_size() and a flexible-array member. Signed-off-by: Gustavo A. R. Silva --- Documentation/process/deprecated.rst | 6 +++--- 1 file

Re: [PATCH v2] staging: atomisp: Remove unnecessary 'fallthrough'

2020-08-31 Thread Gustavo A. R. Silva
On Mon, Aug 31, 2020 at 04:51:04PM +0300, Cengiz Can wrote: > commit df561f6688fe ("treewide: Use fallthrough pseudo-keyword") from > Gustavo A. R. Silva replaced and standardized /* fallthrough */ comments > with 'fallthrough' pseudo-keyword. > > However, i

[GIT PULL] fallthrough fixes for 5.9-rc3

2020-08-29 Thread Gustavo A. R. Silva
Dan Carpenter (1): afs: Remove erroneous fallthough annotation Gustavo A. R. Silva (3): iio: dpot-dac: fix code comment in dpot_dac_read_raw() media: dib0700: Fix identation issue in dib8096_set_param_override() arm64/cpuinfo: Remove unnecessary

Re: [PATCH][next] media: Use fallthrough pseudo-keyword

2020-08-27 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this? Thanks -- Gustavo On 7/24/20 17:10, Gustavo A. R. Silva wrote: > Replace the existing /* fall through */ comments and its variants with > the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary > fall-through markings when it is

Re: [PATCH v3] udf: Use kvzalloc() in udf_sb_alloc_bitmap()

2020-08-27 Thread Gustavo A. R. Silva
On 8/27/20 17:16, Denis Efremov wrote: > Use kvzalloc() in udf_sb_alloc_bitmap() instead of open-coding it. > Size computation wrapped in struct_size() macro to prevent potential > integer overflows. > > Signed-off-by: Denis Efremov Looks good. :) Reviewed-by: Gustavo A. R.

Re: [PATCH v2] udf: Use kvzalloc() in udf_sb_alloc_bitmap()

2020-08-27 Thread Gustavo A. R. Silva
On 8/27/20 16:25, Denis Efremov wrote: > Use kvzalloc() in udf_sb_alloc_bitmap() instead of open-coding it. > Size computation wrapped in struct_size() macro to prevent potential > integer overflows. > > Signed-off-by: Denis Efremov > --- Please, comment here what changed in v2, vn... e.g.:

Re: [PATCH][next] atmel: Use fallthrough pseudo-keyword

2020-08-27 Thread Gustavo A. R. Silva
On Thu, Aug 27, 2020 at 01:09:33PM +, Kalle Valo wrote: > "Gustavo A. R. Silva" wrote: > > > Replace the existing /* fall through */ comments and its variants with > > the new pseudo-keyword macro fallthrough[1]. > > > > [1] > > https://www.ke

Re: [PATCH v2 2/4] brcmfmac: drop unnecessary "fallthrough" comments

2020-08-26 Thread Gustavo A. R. Silva
Hi, There is a patch that address this, already: https://lore.kernel.org/lkml/20200821063758.GA17783@embeddedor/ Thanks -- Gustavo On 8/27/20 01:04, Dmitry Osipenko wrote: > There is no need to insert the "fallthrough" comment if there is nothing > in-between of case switches. Hence let's remov

Re: [PATCH v2 1/2] IB/qib: remove superfluous fallthrough statements

2020-08-26 Thread Gustavo A. R. Silva
On Wed, Aug 26, 2020 at 09:11:49PM -0300, Jason Gunthorpe wrote: > On Wed, Aug 26, 2020 at 02:18:59PM -0500, Gustavo A. R. Silva wrote: > > Hi, > > > > On Tue, Aug 25, 2020 at 02:33:27PM -0500, Gustavo A. R. Silva wrote: > > > On Tue, Aug 25, 2020 at 06:1

Re: [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()

2020-08-26 Thread Gustavo A. R. Silva
On Wed, Aug 26, 2020 at 04:16:23PM +0200, Peter Rosin wrote: > On 2020-08-26 16:17, Gustavo A. R. Silva wrote: > >> And just to be explicit, this fix is for 5.9. > >> > >> Acked-by: Peter Rosin > >> > > > > If you don't mind I can add this

Re: [PATCH v2 1/2] IB/qib: remove superfluous fallthrough statements

2020-08-26 Thread Gustavo A. R. Silva
Hi, On Tue, Aug 25, 2020 at 02:33:27PM -0500, Gustavo A. R. Silva wrote: > On Tue, Aug 25, 2020 at 06:12:42PM +0100, Alex Dewar wrote: > > Commit 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") > > erroneously marked a couple of switch cases as

Re: [PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()

2020-08-26 Thread Gustavo A. R. Silva
Hi, On 8/26/20 02:04, Peter Rosin wrote: > Hi! > > On 2020-08-26 02:08, Gustavo A. R. Silva wrote: >> After the replacement of the /* fall through */ comment with the >> fallthrough pseudo-keyword macro, the natural reading of a code >> comment was broken. >> >

Re: [PATCH] afs: Remove erroneous fallthough annotation

2020-08-26 Thread Gustavo A. R. Silva
On 8/26/20 06:32, Dan Carpenter wrote: > The fall through annotation comes after a return statement so it's not > reachable. > > Signed-off-by: Dan Carpenter Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > fs/afs/flock.c | 1 - > 1 file changed, 1 del

Re: [GIT PULL] fallthrough pseudo-keyword macro conversions for 5.9-rc3

2020-08-25 Thread Gustavo A. R. Silva
On Wed, Aug 26, 2020 at 01:36:20AM +0200, Peter Rosin wrote: > > Comments are important. > I agree. :) Actually, both things are important: comments and the fallthrough work. So, here you go: https://lore.kernel.org/lkml/20200826000844.GA16807@embeddedor/ Thanks -- Gustavo

[PATCH] iio: dpot-dac: fix code comment in dpot_dac_read_raw()

2020-08-25 Thread Gustavo A. R. Silva
After the replacement of the /* fall through */ comment with the fallthrough pseudo-keyword macro, the natural reading of a code comment was broken. Fix the natural reading of such a comment and make it intelligible. Reported-by: Peter Rosin Signed-off-by: Gustavo A. R. Silva --- drivers/iio

Re: [PATCH] Documentation: add minimum clang/llvm version

2020-08-25 Thread Gustavo A. R. Silva
gt; someone is able to `make htmldocs` and check >> Documentation/output/process/changes.html properly links to >> Documentation/output/kbuild/llvm.html. > > I ran 'make O=out htmldocs' and can confirm that the link works properly > in process/changes.html, pointing to

Re: [PATCH v2 1/2] IB/qib: remove superfluous fallthrough statements

2020-08-25 Thread Gustavo A. R. Silva
ce GCC 7.1. > Remove the fallthrough statements. > > Addresses-Coverity: ("Unreachable code") > Fixes: 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") > Signed-off-by: Alex Dewar Reviewed-by: Gustavo A. R. Silva > --- > v2: Do r

Re: [PATCH] IB/qib: remove superfluous fallthrough statements

2020-08-25 Thread Gustavo A. R. Silva
On 8/25/20 11:47, Joe Perches wrote: > On Tue, 2020-08-25 at 11:49 -0500, Gustavo A. R. Silva wrote: >> >> On 8/25/20 11:26, Joe Perches wrote: >>> On Tue, 2020-08-25 at 11:19 -0500, Gustavo A. R. Silva wrote: >>>> On 8/25/20 10:51, Alex Dewar wrote: >

Re: [PATCH] IB/qib: remove superfluous fallthrough statements

2020-08-25 Thread Gustavo A. R. Silva
On 8/25/20 11:26, Joe Perches wrote: > On Tue, 2020-08-25 at 11:19 -0500, Gustavo A. R. Silva wrote: >> >> On 8/25/20 10:51, Alex Dewar wrote: >>> Commit 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") >>> erroneously marked

<    1   2   3   4   5   6   7   8   9   10   >