bnxt_en: Refactor coredump functions
authorEdwin Peer <edwin.peer@broadcom.com>
Fri, 29 Oct 2021 07:47:47 +0000 (03:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:03 +0000 (11:04 +0100)
commita2037e7e4d02c0b9d8714ab1a712b4e57792b22f
treede49890b6af7313bf88349de33bf28357f20b7fa
parent57214d92a69f6cc8eaf466b65be25eba495a96b8
bnxt_en: Refactor coredump functions

[ Upstream commit 9a575c8c25ae2372112db6d6b3e553cd90e9f02b ]

The coredump functionality will be used by devlink health. Refactor
these functions that get coredump and coredump length. There is no
functional change, but the following checkpatch warnings were
addressed:

  - strscpy is preferred over strlcpy.
  - sscanf results should be checked, with an additional warning.

Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c