]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: qdiscs: Unite all handle checks
authorNogah Frankel <nogahf@mellanox.com>
Wed, 10 Jan 2018 14:00:03 +0000 (15:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jan 2018 21:07:41 +0000 (16:07 -0500)
commitb111edf9deceb20e0bea2da478d03e21d53e8d93
tree56dca9ce69bf6f63c08d2d787fb515dbe83a63d5
parentd4fd73d2a6d59c3b06f533891eca8c0744da8465
mlxsw: spectrum: qdiscs: Unite all handle checks

Every qdisc op gets the qdisc handle ID as well as its location.  Each one
of them, beside replace, checks if the handle doesn't match the qdisc in
the given location, and if so, it returns without running the actual op.
Unite these checks to one comparison function and avoid sending the handle
id to these ops.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Reviewed-by: Yuval Mintz <yuvalm@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c