net: switchdev: pass callback to dump operation
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 29 Sep 2015 16:07:16 +0000 (12:07 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2015 04:31:59 +0000 (21:31 -0700)
commit25f07adc473f05f850efc9414b9da3374563015f
treeff62d9a8e9c63c48abd034b61156c55c6437a36e
parent03d5fb18626aff95426a380aef0d1c6904cac7c9
net: switchdev: pass callback to dump operation

Similar to the notifier_call callback of a notifier_block, change the
function signature of switchdev dump operation to:

    int switchdev_port_obj_dump(struct net_device *dev,
                                enum switchdev_obj_id id, void *obj,
                                int (*cb)(void *obj));

This allows the caller to pass and expect back a specific
switchdev_obj_* structure instead of the generic switchdev_obj one.

Drivers implementation of dump operation can now expect this specific
structure and call the callback with it. Drivers have been changed
accordingly.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker.c
include/net/switchdev.h
net/dsa/slave.c
net/switchdev/switchdev.c