rocker: Avoid unnecessary scheduling of work item
authorIdo Schimmel <idosch@nvidia.com>
Tue, 1 Nov 2022 12:39:35 +0000 (14:39 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Nov 2022 03:45:23 +0000 (20:45 -0700)
commit42e51de97cb449aa7d2aa1638cb5fcd2695b8f98
tree6299c109d411603b052c09aac83a59dce94a064d
parent3319dbb3e755398f254c3daa04b9030197137efe
rocker: Avoid unnecessary scheduling of work item

The work item function ofdpa_port_fdb_learn_work() does not do anything
when 'OFDPA_OP_FLAG_LEARNED' is not set in the work item's flags.

Therefore, do not allocate and do not schedule the work item when the
flag is not set.

Suggested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/rocker/rocker_ofdpa.c