diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-09-18 21:11:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-18 18:17:45 -0700 |
commit | d4602a9f47196dd62deba66ec361b5897f1ae62b (patch) | |
tree | c3720df389760898ab277b698d76040cfc25a28c /drivers/net/netdevsim | |
parent | e14e05e71d106aef973e2cf100e540d911703a6e (diff) | |
download | linux-next-d4602a9f47196dd62deba66ec361b5897f1ae62b.tar.gz |
net: devlink: region: Pass the region ops to the snapshot function
Pass the region to be snapshotted to the function performing the
snapshot. This allows one function to operate on numerous regions.
v4:
Add missing kerneldoc for ICE
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim')
-rw-r--r-- | drivers/net/netdevsim/dev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c index e41f85c75699..e665efd760f8 100644 --- a/drivers/net/netdevsim/dev.c +++ b/drivers/net/netdevsim/dev.c @@ -40,7 +40,9 @@ static struct dentry *nsim_dev_ddir; #define NSIM_DEV_DUMMY_REGION_SIZE (1024 * 32) static int -nsim_dev_take_snapshot(struct devlink *devlink, struct netlink_ext_ack *extack, +nsim_dev_take_snapshot(struct devlink *devlink, + const struct devlink_region_ops *ops, + struct netlink_ext_ack *extack, u8 **data) { void *dummy_data; @@ -68,7 +70,7 @@ static ssize_t nsim_dev_take_snapshot_write(struct file *file, devlink = priv_to_devlink(nsim_dev); - err = nsim_dev_take_snapshot(devlink, NULL, &dummy_data); + err = nsim_dev_take_snapshot(devlink, NULL, NULL, &dummy_data); if (err) return err; |