> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of Jacob > Keller > Sent: 02 June 2026 05:44 > To: Intel Wired LAN <[email protected]>; > [email protected]; Nguyen, Anthony L <[email protected]> > Cc: Kitszel, Przemyslaw <[email protected]>; Loktionov, Aleksandr > <[email protected]>; Keller, Jacob E <[email protected]>; > Loktionov, Aleksandr <[email protected]> > Subject: [Intel-wired-lan] [PATCH iwl-next 6/6] ice: refactor > ice_sched_cfg_agg to take agg_info pointer > > The ice_sched_cfg_agg() function is called with an aggregator ID and type. > It performs a lookup of the aggregator info structure by ID. If the lookup > fails, it calls ice_alloc_agg_info to allocate a new aggregator structure for > that ID. > > This behavior used to make sense when ice_cfg_agg() was exported and intended > to create a new aggregator node for a specific ID. This is no longer true, > and all three callers of ice_sched_cfg_agg() already have a valid agg_info > structure. > > Refactor the function to take the agg_info pointer directly, dropping the > unnecessary lookup and allocation fallback. This simplifies the function, and > keeps its scope targeted at traffic class configuration. > > This removes essentially dead code, and prevents the need for adding > additional error cleanup for failures that are impossible. > > Suggested-by: Aleksandr Loktionov <[email protected]> > Signed-off-by: Jacob Keller <[email protected]> > Reviewed-by: Aleksandr Loktionov <[email protected]> > --- > drivers/net/ethernet/intel/ice/ice_sched.c | 49 ++++++++++-------------------- > 1 file changed, 16 insertions(+), 33 deletions(-) >
Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
