[PATCH] clk: ti: use kcalloc() instead of kzalloc()

2024-12-29 Thread Ethan Carter Edwards
Use 2-factor multiplication argument form kcalloc() instead of kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Ethan Carter Edwards --- drivers/clk/ti/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c

[PATCH] wifi: ath12k: Fix uninitialized variable and remove goto

2025-02-09 Thread Ethan Carter Edwards
ot;) Fixes: b716a10d99a28 ("wifi: ath12k: enable MLO setup and teardown from core") Signed-off-by: Ethan Carter Edwards --- drivers/net/wireless/ath/ath12k/core.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net

[PATCH] ixgbe: remove self assignment

2025-02-09 Thread Ethan Carter Edwards
Variable self assignment does not have any effect. Addresses-Coverity-ID: 1641823 ("Self assignment") Fixes: 46761fd52a886 ("ixgbe: Add support for E610 FW Admin Command Interface") Signed-off-by: Ethan Carter Edwards --- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 1

Re: [PATCH] wifi: ath12k: Fix uninitialized variable and remove goto

2025-02-10 Thread Ethan Carter Edwards
On 25/02/10 05:08PM, Jeff Johnson wrote: > On 2/9/2025 8:36 PM, Ethan Carter Edwards wrote: > > commit subject should be as specific as possible. > suggest you at least mention the function Will change. Thanks! > > > There is a possibility for an uninitialized *ret* variab

[PATCH v2] wifi: ath12k: cleanup ath12k_mac_mlo_ready()

2025-02-10 Thread Ethan Carter Edwards
Fixes: b716a10d99a28 ("wifi: ath12k: enable MLO setup and teardown from core") Signed-off-by: Ethan Carter Edwards --- Changes in v2: - Rewrite commit subject to include function - put int ret; back at top of function declaration - minor changes to description - Link to v1: https://lore.

[PATCH] octeontx2-af: Fix uninitialized scalar variable

2025-02-10 Thread Ethan Carter Edwards
hardware custom sets the mtu, then it will use it instead. Addresses-Coverity-ID: 1636407 ("Uninitialized scalar variable") Fixes: ab58a416c93f ("octeontx2-pf: cn10k: Get max mtu supported from admin function") Signed-off-by: Ethan Carter Edwards --- drivers/net/ethernet/m

[PATCH] ASoC: Intel: sof_sdw: initialize ret in asoc_sdw_rt_amp_spk_rtd_init()

2025-02-10 Thread Ethan Carter Edwards
There is a possibility for an uninitialized *ret* variable to be returned in some code paths. Setting to 0 prevents a random value from being returned. Closes: https://scan5.scan.coverity.com/#/project-view/63873/10063?selectedIssue=1627120 Signed-off-by: Ethan Carter Edwards --- Would it

[PATCH v2] sched/topology: change kzalloc to kcalloc

2025-01-19 Thread Ethan Carter Edwards
: Ethan Carter Edwards --- V2: fix email client formatting. kernel/sched/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 9748a4c8d668..17eb12819563 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched

[PATCH v3] thermal/debugfs: change kzalloc to kcalloc

2025-01-19 Thread Ethan Carter Edwards
: Ethan Carter Edwards --- v3: fix description and email client formatting v2: fix typo drivers/thermal/thermal_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_debugfs.c b/drivers/thermal/thermal_debugfs.c index c800504c3cfe..29dc1431a252 100644

[PATCH] NFSv4: harden nfs4_get_uniquifier() function

2025-01-19 Thread Ethan Carter Edwards
If the incorrect buffer size were passed into nfs4_get_uniquifier function then a memory access error could occur. This change prevents us from accidentally passing an unrelated variable into the buffer copy function. Signed-off-by: Ethan Carter Edwards --- fs/nfs/nfs4proc.c | 10 +- 1

[PATCH] scsi: cxlflash: change kzalloc to kcalloc

2025-01-20 Thread Ethan Carter Edwards
: Ethan Carter Edwards --- drivers/scsi/cxlflash/superpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c index b375509d1470..fc26e62e0dbf 100644 --- a/drivers/scsi/cxlflash/superpipe.c +++ b/drivers/scsi

[PATCH] ASoC: q6dsp: q6apm: change kzalloc to kcalloc

2025-01-19 Thread Ethan Carter Edwards
: Ethan Carter Edwards --- sound/soc/qcom/qdsp6/q6apm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/qcom/qdsp6/q6apm.c b/sound/soc/qcom/qdsp6/q6apm.c index 2a2a5bd98110..11e252a70f69 100644 --- a/sound/soc/qcom/qdsp6/q6apm.c +++ b/sound/soc/qcom/qdsp6/q6apm.c

[PATCH] thermal/debugfs: change kzalloc to kcalloc

2024-12-23 Thread Ethan Carter Edwards
Use 2-factor multiplication argument form kcalloc() instead of instead of the deprecated kzalloc() [1]. [1] https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Ethan Carter

[PATCH v2] thermal/debugfs: change kzalloc to kcalloc

2024-12-23 Thread Ethan Carter Edwards
Use 2-factor multiplication argument form kcalloc() instead of instead of the deprecated kzalloc() [1]. [1] https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Ethan Carter

[PATCH] sched/topology: change kzalloc to kcalloc

2024-12-24 Thread Ethan Carter Edwards
: Ethan Carter Edwards --- kernel/sched/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 9748a4c8d668..17eb12819563 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1920,7 +1920,7 @@ void

Re: [PATCH] ASoC: q6dsp: q6apm: change kzalloc to kcalloc

2025-02-08 Thread Ethan Carter Edwards
I wanted to check in on this. Anything I need to change? Thanks, Ethan On 25/01/19 08:32PM, Ethan Carter Edwards wrote: > We are replacing any instances of kzalloc(size * count, ...) with > kcalloc(count, size, ...) due to risk of overflow [1]. > > [1] > https://www.kernel.or

Re: [PATCH v2] sched/topology: change kzalloc to kcalloc

2025-02-08 Thread Ethan Carter Edwards
I wanted to check in on this. Anything I need to change? Thanks, Ethan On 25/01/19 01:23PM, Ethan Carter Edwards wrote: > We are replacing any instances of kzalloc(size * count, ...) with > kcalloc(count, size, ...) due to risk of overflow [1]. > > [1] > https://www.kernel.or

Re: [PATCH v3] thermal/debugfs: change kzalloc to kcalloc

2025-02-08 Thread Ethan Carter Edwards
I wanted to check in on this. Anything I need to change? Thanks, Ethan On 25/01/19 01:35PM, Ethan Carter Edwards wrote: > We are replacing any instances of kzalloc(size * count, ...) with > kcalloc(count, size, ...) due to risk of overflow [1]. > > [1] > https://www.kernel.or

Re: [PATCH] NFSv4: harden nfs4_get_uniquifier() function

2025-02-08 Thread Ethan Carter Edwards
I wanted to check in on this. Anything I should change? Thanks, Ethan On 25/01/19 11:55PM, Ethan Carter Edwards wrote: > If the incorrect buffer size were passed into nfs4_get_uniquifier > function then a memory access error could occur. This change prevents us > from accidentally p

[PATCH] btf: move kern_type_id to goto cand_cache_unlock

2025-02-19 Thread Ethan Carter Edwards
("bpf: add __arg_trusted global func arg tag") Signed-off-by: Ethan Carter Edwards --- kernel/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 9de6acddd479b4f5e32a5e6ba43cf369de4cee29..8c82ced7da299ad1ad769024fe0978

[PATCH] mtd: rawnand: use kcalloc() instead of kzalloc()

2025-02-22 Thread Ethan Carter Edwards
/issues/162 [1] Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Signed-off-by: Ethan Carter Edwards --- drivers/mtd/nand/raw/nand_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw

[PATCH] sched/topology: replace kzalloc() with kcalloc() in sched_init_numa()

2025-02-22 Thread Ethan Carter Edwards
/issues/162 [1] Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Signed-off-by: Ethan Carter Edwards --- kernel/sched/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/topology.c b/kernel

[PATCH] ASoC: q6dsp: q6apm: replace kzalloc() with kcalloc() in q6apm_map_memory_regions()

2025-02-22 Thread Ethan Carter Edwards
/issues/162 [1] Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Signed-off-by: Ethan Carter Edwards --- sound/soc/qcom/qdsp6/q6apm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/qcom/qdsp6/q6apm.c b

[PATCH] thermal/debugfs: replace kzalloc() with kcalloc() in thermal_debug_tz_add()

2025-02-22 Thread Ethan Carter Edwards
/issues/162 [1] Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Signed-off-by: Ethan Carter Edwards --- drivers/thermal/thermal_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal

Re: [PATCH] btf: move kern_type_id to goto cand_cache_unlock

2025-02-20 Thread Ethan Carter Edwards
On 25/02/20 08:24PM, Pu Lehui wrote: > On 2025/2/20 13:50, Ethan Carter Edwards wrote: > > In most code paths variable move_kern_type_id remains uninitialized upon > > return. By moving it to the goto, it is initialized in these code paths. > > As well as other

[PATCH] mm/shmem: fix uninitialized scalar variable

2025-03-01 Thread Ethan Carter Edwards
: use xas_try_split() in shmem_split_large_entry()") Signed-off-by: Ethan Carter Edwards --- mm/shmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index d19d33e98320d5e0ccbc86616bb3ea30d29f0cc1..3718c71aba9304dd3ca8df137a19e0564b8aadb2 10

[PATCH] ALSA: ctxfi: change dao_set_input functions from kzalloc to kcalloc

2025-03-08 Thread Ethan Carter Edwards
/linux/issues/162 [1] Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Signed-off-by: Ethan Carter Edwards --- sound/pci/ctxfi/ctdaio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/ctxfi/ctdaio.c