mirror of
https://github.com/torvalds/linux.git
synced 2026-11-18 01:13:59 +01:00
bnxt_en: Remove unnecessary VF check in bnxt_hwrm_nvm_req()
The driver registers the supported configuration parameters with the devlink stack only on the PF using devlink_params_register(). Hence there is no need for a VF check inside bnxt_hwrm_nvm_req(). Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20250917040839.1924698-3-michael.chan@broadcom.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
3b46a9e404
commit
e23c40d41b
|
|
@ -1074,16 +1074,9 @@ static int __bnxt_hwrm_nvm_req(struct bnxt *bp,
|
|||
static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
|
||||
union devlink_param_value *val)
|
||||
{
|
||||
struct hwrm_nvm_get_variable_input *req = msg;
|
||||
const struct bnxt_dl_nvm_param *nvm_param;
|
||||
int i;
|
||||
|
||||
/* Get/Set NVM CFG parameter is supported only on PFs */
|
||||
if (BNXT_VF(bp)) {
|
||||
hwrm_req_drop(bp, req);
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(nvm_params); i++) {
|
||||
nvm_param = &nvm_params[i];
|
||||
if (nvm_param->id == param_id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user