]> git.baikalelectronics.ru Git - kernel.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)
commitd6420d9df1ff84cc6ecf865e207a2f236d398430
treea942132a2f1e8366f333c07ccbfe6b4fd7d4edee
parent6675a44c25316dac49c1d8c7c606fe947d6f8afa
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