Commit 8fdcd8fb authored by Aya Levin's avatar Aya Levin Committed by David S. Miller

netdevsim: Update dummy reporter's devlink binary interface

Update dummy reporter's output to use updated devlink interface of
binary fmsg pair.
Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d4e82cf4
...@@ -82,18 +82,12 @@ static int nsim_dev_dummy_fmsg_put(struct devlink_fmsg *fmsg, u32 binary_len) ...@@ -82,18 +82,12 @@ static int nsim_dev_dummy_fmsg_put(struct devlink_fmsg *fmsg, u32 binary_len)
if (err) if (err)
return err; return err;
err = devlink_fmsg_arr_pair_nest_start(fmsg, "test_binary");
if (err)
return err;
binary = kmalloc(binary_len, GFP_KERNEL); binary = kmalloc(binary_len, GFP_KERNEL);
if (!binary) if (!binary)
return -ENOMEM; return -ENOMEM;
get_random_bytes(binary, binary_len); get_random_bytes(binary, binary_len);
err = devlink_fmsg_binary_put(fmsg, binary, binary_len); err = devlink_fmsg_binary_pair_put(fmsg, "test_binary", binary, binary_len);
kfree(binary); kfree(binary);
if (err)
return err;
err = devlink_fmsg_arr_pair_nest_end(fmsg);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment