Message ID | 20201102134601.698436-1-colin.king@canonical.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | octeontx2-pf: Fix sizeof() mismatch | expand |
Context | Check | Description |
---|---|---|
jkicinski/cover_letter | success | Link |
jkicinski/fixes_present | success | Link |
jkicinski/patch_count | success | Link |
jkicinski/tree_selection | success | Guessed tree name to be net-next |
jkicinski/subject_prefix | warning | Target tree name not specified in the subject |
jkicinski/source_inline | success | Was 0 now: 0 |
jkicinski/verify_signedoff | success | Link |
jkicinski/module_param | success | Was 0 now: 0 |
jkicinski/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
jkicinski/kdoc | success | Errors and warnings before: 0 this patch: 0 |
jkicinski/verify_fixes | success | Link |
jkicinski/checkpatch | warning | WARNING: line length of 84 exceeds 80 columns |
jkicinski/build_allmodconfig_warn | success | Errors and warnings before: 7 this patch: 7 |
jkicinski/header_inline | success | Link |
jkicinski/stable | success | Stable not CCed |
On Mon, 2 Nov 2020 13:46:01 +0000 Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > An incorrect sizeof() is being used, sizeof(u64 *) is not correct, > it should be sizeof(*sq->sqb_ptrs). > > Fixes: caa2da34fd25 ("octeontx2-pf: Initialize and config queues") > Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") > Signed-off-by: Colin Ian King <colin.king@canonical.com> Applied, but to net-next. The driver depends on 64BIT so this is harmless.
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index fc765e86988e..9f3d6715748e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -1239,7 +1239,7 @@ int otx2_sq_aura_pool_init(struct otx2_nic *pfvf) sq = &qset->sq[qidx]; sq->sqb_count = 0; - sq->sqb_ptrs = kcalloc(num_sqbs, sizeof(u64 *), GFP_KERNEL); + sq->sqb_ptrs = kcalloc(num_sqbs, sizeof(*sq->sqb_ptrs), GFP_KERNEL); if (!sq->sqb_ptrs) return -ENOMEM;