: Dan Carpenter
| Closes: https://lore.kernel.org/r/202406100753.38qaqzo9-...@intel.com/
smatch warnings:
drivers/net/ethernet/intel/ice/ice_parser.c:971 __ice_pg_nm_cam_match() error:
memcmp() '&item->key.val' too small (9 vs 13)
vim +971 drivers/net/ethernet/intel
robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202407070634.atz9naa1-...@intel.com/
smatch warnings:
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c:875 ice_vc_fdir_parse_raw()
warn: missing error code 'status'
vim +/status +875 drivers/net/ethernet
idpf_send_dealloc_vectors_msg(adapter);
^^^
Inside this function
418
419 return err;
420 }
regards,
dan carpenter
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "%02X %02X %02X %02X
%02X %02X %02X %02X %02X %02X\n",
141 key[0], key[1], key[2], key[3], key[4],
142 key[5], key[6], key[7], key[8], key[9]);
143 ice_debug(rt->psr->hw, ICE_DBG_PARSER, "\n");
144 }
regards,
dan carpenter
BIT() is unsigned long but ->pu.flg_msk and ->pu.flg_val are u64 type.
On 32 bit systems, unsigned long is a u32 and the mismatch between u32
and u64 will break things for the high 32 bits.
Fixes: 9a4c07aaa0f5 ("ice: add parser execution main loop")
Signed-off-by: Dan Carpenter
n
> + * so IDPF_NUM_FILTERS_PER_MSG entries are
> + * available
> + */
> memset(ma_list, 0, buf_size);
> }
It would be even nicer to move the ma_list allocation outside the loop:
buf_size = struct_size(ma_list, mac_addr_list,
IDPF_NUM_FILTERS_PER_MSG);
ma_list = kmalloc(buf_size, GFP_ATOMIC);
regards,
dan carpenter
Call rtnl_unlock() on this error path, before returning.
Fixes: bc23aa949aeb ("igc: Add pcie error handler support")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/intel/igc/igc_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/intel/igc/igc
/archive/20240104/202401041701.6qktszmx-...@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
_lcd_t_x550em()
> warn: missing error code? 'status'
>
> Fix it by clearly stating returning error code as 0.
>
> Reported-by: kernel test robot
> Reported-by: Dan Carpenter
> Closes: https://lore.kernel.org/r/202401041701.6qktszmx-...@intel.com/
> Fixes: 6ac74
&ice_dpll_rclk_ops,
&pf->dplls.rclk);
1588 }
1589 ice_dpll_release_pins(pin, ICE_DPLL_RCLK_NUM_PER_PF);
--> 1590 return ret;
1591 }
regards,
dan carpenter
g and those have a higher risk of false
positives. Plus the longer the call tree the higher the chance of
false positives. However, I did review it and the warning looks
reasonable.
regards,
dan carpenter
Automatically cleaned up pointers need to be initialized before exiting
their scope. In this case, they need to be initialized to NULL before
any return statement.
Fixes: 90f821d72e11 ("ice: avoid unnecessary devm_ usage")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet
e
> >any return statement.
> >
> >Fixes: 90f821d72e11 ("ice: avoid unnecessary devm_ usage")
> >Signed-off-by: Dan Carpenter
> >---
> > drivers/net/ethernet/intel/ice/ice_common.c | 4 ++--
> > drivers/net/ethernet/intel/ice/ice_ethtool.c | 2 +-
>
On Tue, Mar 19, 2024 at 12:43:17PM -0700, Jakub Kicinski wrote:
> On Sat, 16 Mar 2024 12:44:40 +0300 Dan Carpenter wrote:
> > - struct ice_aqc_get_phy_caps_data *pcaps __free(kfree);
> > - void *mac_buf __free(kfree);
> > + struct ice_aqc_get_phy_caps_data *pcaps
The auto_kfree looks like a variable to my eyes. I'd prefer something
like:
#define __FREE(p) p __free(kfree) = NULL
struct ice_aqc_get_phy_caps_data *__FREE(pcaps);
regards,
dan carpenter
Automatically cleaned up pointers need to be initialized before exiting
their scope. In this case, they need to be initialized to NULL before
any return statement.
Fixes: 90f821d72e11 ("ice: avoid unnecessary devm_ usage")
Signed-off-by: Dan Carpenter
---
v2: I missed a couple poin
On Thu, Mar 21, 2024 at 04:34:37PM +0100, Jiri Pirko wrote:
> >The change to ice_update_link_info() isn't required because it's
> >assigned on the very next line... But I did that because it's harmless
> >and makes __free() stuff easier to verify. I felt like moving the
> >declarations into the c
is. Kent Overstreet has said we should move away from
declarations at the top generally. I don't know if anyone else agrees
with him though.
regards,
dan carpenter
Markus please don't do this. Don't take a controversial opinion and
start trying to force it on everyone via review comments and an
automatic converstion script.
regards,
dan carpenter
* Did you extend detection support in the source code analysis tool “Smatch”
> for a questionable implementation detail?
Yes. Smatch detects this as an uninitialized variable.
regards,
dan carpenter
p->iph, min(sizeof(p.iph), sizeof(kp->iph)));
And this memcpy() doesn't necessarily clear the whole of p.iph.
> +
> + return !copy_to_user(data, &p, sizeof(p));
> +}
regards,
dan carpenter
The ice_repr_create() function returns error pointers. It never returns
NULL. Fix the callers to check for IS_ERR().
Fixes: 977514fb0fa8 ("ice: create port representor for SF")
Fixes: 415db8399d06 ("ice: make representor code generic")
Signed-off-by: Dan Carpenter
---
The ice_allocate_sf() function returns error pointers on error. It
doesn't return NULL. Update the check to match.
Fixes: 177ef7f1e2a0 ("ice: base subfunction aux driver")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/intel/ice/ice_sf_eth.c | 4 ++--
1 file changed, 2 i
ause I don't
view truncating strings as a note worthy bug...
Smatch also gets stuff wrong, but in that case I just always encourage
people to mark the warning as old news and move on. Only new warnings
are interesting.
I feel like as we incorporate more and more static analysis into our
processe
The adapter->vf_mvs.l list needs to be initialized even if the list is
empty. Otherwise it will lead to crashes.
Fixes: c6bda30a06d9 ("ixgbe: Reconfigure SR-IOV Init")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +++--
1 file changed, 3 ins
se is to just set a flag.
Fixes: c1fec890458a ("ethernet/intel: Use list_for_each_entry() helper")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/intel/igb/igb_main.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/ig
for "entry" to be NULL and the comments mention
this. I have updated the comments to match the new code.
Fixes: c1fec890458a ("ethernet/intel: Use list_for_each_entry() helper")
Signed-off-by: Dan Carpenter
---
.../net/ethernet/intel/ixgbe/ixgbe_sriov.c| 19 +++
On Fri, Oct 06, 2023 at 01:16:27PM +0200, Simon Horman wrote:
> On Thu, Oct 05, 2023 at 04:57:02PM +0300, Dan Carpenter wrote:
> > The adapter->vf_mvs.l list needs to be initialized even if the list is
> > empty. Otherwise it will lead to crashes.
> >
> > Fixes: c6b
The adapter->vf_mvs.l list needs to be initialized even if the list is
empty. Otherwise it will lead to crashes.
Fixes: a1cbb15c1397 ("ixgbe: Add macvlan support for VF")
Signed-off-by: Dan Carpenter
---
v2: Use the correct fixes tag. Thanks, Simon.
drivers/net/etherne
rings().
What clean up we need to do depends on vsi->type as well but here
we know the type is vsi->type == I40E_VSI_VMDQ2 so it's needs to call
the i40e_vsi_clear_rings().
regards,
dan carpenter
___
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
On Fri, Oct 20, 2023 at 10:43:09AM +0800, Su Hui wrote:
> check the value of 'ret' after calling 'i40e_vsi_config_rss'.
>
> Signed-off-by: Su Hui
> ---
> v2:
> - call i40e_vsi_clear_rings() to free rings(thank dan carpenter for
> pointing out
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202311270851.ie6aegcs-...@intel.com/
New smatch warnings:
drivers/net/ethernet/intel/i40e/i40e_main.c:14743 i40e_veb_release() error:
potentially dereferencing uninitialized 'vsi'.
Old smatch warnings:
[ low confidence ]
d
Set the "err" variable on this error path.
Fixes: fff292b47ac1 ("ice: add VF representors one by one")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/intel/ice/ice_eswitch.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/ne
-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202410210921.qwq9giqr-...@intel.com/
New smatch warnings:
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2391 ixgbe_clean_rx_irq() error:
uninitialized symbol 'xdp_res'.
vim +/xdp_res +2391 drivers/net/ethernet/intel/ixgbe/ix
/commit), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202411052110.vjxfpzue-...@intel.com/
New smatch warnings:
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2377 ixgbe_clean_rx_irq() error:
uninitialized symbol 'xd
test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202411242101.qlvmbflb-...@intel.com/
smatch warnings:
drivers/net/ethernet/intel/ice/devlink/health.c:95 ice_tx_hang_reporter_dump()
warn: variable dereferenced before check 'event' (see line 93)
vim +/event +
-project
ab51eccf88f5321e7c60591c5546b254b6afab99)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202501050625.ny1c97ex
ould be changed or the function name.
The comment says that ixgbe_aci_get_netlist_node() returns -ENOENT but
actually the only error code it returns is -EOPNOTSUPP.
1126 }
regards,
dan carpenter
eated as success. So here the "return -ENOMEM;" is unreachable code.
Check for negatives instead.
Fixes: 79d97b8cf9a8 ("ice: remove splitting MSI-X between features")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/intel/ice/ice_irq.c | 2 +-
1 file changed, 1 insertion(+
}
2118 __page_frag_cache_drain(rx_buffer->page,
2119 rx_buffer->pagecnt_bias);
2120 }
2121
2122 /* clear contents of rx_buffer */
2123 rx_buffer->page = NULL;
2124 rx_buffer->skb = NULL;
2125 }
regards,
dan carpenter
e: remove splitting MSI-X between features")
Signed-off-by: Dan Carpenter
---
v2: Fix my scripts to say [PATCH net-next]
Propagate the error code.
drivers/net/ethernet/intel/ice/ice_irq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/i
urn -ENOMEM;
+ return vectors;
actually does fall within the scope of the patch so I want to change
that as well. There is no point in really breaking that into a separate
patch from a practical perspective.
regards,
dan carpenter
42 matches
Mail list logo