]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bnxt_en: Refactor bnxt_dl_info_get().
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 12 Oct 2020 09:10:53 +0000 (05:10 -0400)
committerJakub Kicinski <kuba@kernel.org>
Mon, 12 Oct 2020 21:27:03 +0000 (14:27 -0700)
commit7154917a12b20ea46b09097a22342bcdf6adac66
treea942132a2f1e8366f333c07ccbfe6b4fd7d4edee
parent4933f6753b50367b581084927bf19efa1bcaac86
bnxt_en: Refactor bnxt_dl_info_get().

Add a new function bnxt_dl_info_put() to simplify the code, as there
are more stored firmware version fields to be added in the next patch.

Also, rename fw_ver variable name to ncsi_ver for better naming while
copying to devlink info_get cb.

v2:
Ensure active_pkg_name string is NULL terminated when copied to
devlink.

Return directly from the last call to bnxt_dl_info_put().

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/1602493854-29283-9-git-send-email-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h