OSDN Git Service

devlink: don't use strcpy() to copy param value
authorJiri Pirko <jiri@nvidia.com>
Fri, 10 Feb 2023 10:01:25 +0000 (11:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2023 09:49:14 +0000 (09:49 +0000)
commitfa2f921f3bf1ed98956ad341b920a55aab69bc35
treecf9aafcbb3c177bd5a3d80452a02b30efc1a6972
parent170677fee45baa955b3f7c1f41e6031d1d1e2272
devlink: don't use strcpy() to copy param value

No need to treat string params any different comparing to other types.
Rely on the struct assign to copy the whole struct, including the
string.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/devlink/leftover.c