Commit 1a7fcdf7 authored by Jiri Pirko's avatar Jiri Pirko Committed by Jakub Kicinski

mlxsw: reg: Allow to pass NULL pointer to mlxsw_reg_ralue_pack4/6()

In preparation for the change that is going to be done in the next
patch, allow to pass NULL pointer to mlxsw_reg_ralue_pack4() and
mlxsw_reg_ralue_pack6() helpers.
Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0c1d6b26
......@@ -7282,6 +7282,7 @@ static inline void mlxsw_reg_ralue_pack4(char *payload,
u32 *dip)
{
mlxsw_reg_ralue_pack(payload, protocol, op, virtual_router, prefix_len);
if (dip)
mlxsw_reg_ralue_dip4_set(payload, *dip);
}
......@@ -7292,6 +7293,7 @@ static inline void mlxsw_reg_ralue_pack6(char *payload,
const void *dip)
{
mlxsw_reg_ralue_pack(payload, protocol, op, virtual_router, prefix_len);
if (dip)
mlxsw_reg_ralue_dip6_memcpy_to(payload, dip);
}
......
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