Skip to content

Commit

Permalink
net/hinic/base: remove some unused variables
Browse files Browse the repository at this point in the history
[ upstream commit b5dedf2 ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: a4957d8 ("net/hinic/base: add mgmt module")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
conorwalsh-intel authored and cpaelzer committed Nov 30, 2021
1 parent 6b92949 commit 962fa4d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/net/hinic/base/hinic_pmd_mgmt.c
Expand Up @@ -133,16 +133,12 @@ static void prepare_header(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
static void prepare_mgmt_cmd(u8 *mgmt_cmd, u64 *header, void *msg,
int msg_len)
{
u32 cmd_buf_max = MAX_PF_MGMT_BUF_SIZE;

memset(mgmt_cmd, 0, MGMT_MSG_RSVD_FOR_DEV);

mgmt_cmd += MGMT_MSG_RSVD_FOR_DEV;
cmd_buf_max -= MGMT_MSG_RSVD_FOR_DEV;
memcpy(mgmt_cmd, header, sizeof(*header));

mgmt_cmd += sizeof(*header);
cmd_buf_max -= sizeof(*header);
memcpy(mgmt_cmd, msg, msg_len);
}

Expand Down Expand Up @@ -615,7 +611,6 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
void *msg_body = header + sizeof(msg_header);
u8 *dest_msg;
u8 seq_id, seq_len;
u32 msg_buf_max = MAX_PF_MGMT_BUF_SIZE;
u8 front_id;
u16 msg_id;

Expand All @@ -635,7 +630,6 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
}

dest_msg = (u8 *)recv_msg->msg + seq_id * HINIC_MSG_SEG_LEN;
msg_buf_max -= seq_id * HINIC_MSG_SEG_LEN;
memcpy(dest_msg, msg_body, seq_len);

if (!HINIC_MSG_HEADER_GET(msg_header, LAST))
Expand Down

0 comments on commit 962fa4d

Please sign in to comment.