Commit 1ab6fe64 authored by Su Hui's avatar Su Hui Committed by Jakub Kicinski

octeontx2-pf: remove unused variables req_hdr and rsp_hdr

Clang static checker(scan-buid):
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:503:2: warning:
Value stored to 'rsp_hdr' is never read [deadcode.DeadStores]

Remove these unused variables to save some space.
Signed-off-by: default avatarSu Hui <suhui@nfschina.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240328020723.4071539-1-suhui@nfschina.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e93af722
...@@ -450,7 +450,6 @@ static void otx2_pfvf_mbox_handler(struct work_struct *work) ...@@ -450,7 +450,6 @@ static void otx2_pfvf_mbox_handler(struct work_struct *work)
struct mbox_msghdr *msg = NULL; struct mbox_msghdr *msg = NULL;
int offset, vf_idx, id, err; int offset, vf_idx, id, err;
struct otx2_mbox_dev *mdev; struct otx2_mbox_dev *mdev;
struct mbox_hdr *req_hdr;
struct otx2_mbox *mbox; struct otx2_mbox *mbox;
struct mbox *vf_mbox; struct mbox *vf_mbox;
struct otx2_nic *pf; struct otx2_nic *pf;
...@@ -461,9 +460,8 @@ static void otx2_pfvf_mbox_handler(struct work_struct *work) ...@@ -461,9 +460,8 @@ static void otx2_pfvf_mbox_handler(struct work_struct *work)
mbox = &pf->mbox_pfvf[0].mbox; mbox = &pf->mbox_pfvf[0].mbox;
mdev = &mbox->dev[vf_idx]; mdev = &mbox->dev[vf_idx];
req_hdr = (struct mbox_hdr *)(mdev->mbase + mbox->rx_start);
offset = ALIGN(sizeof(*req_hdr), MBOX_MSG_ALIGN); offset = ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
for (id = 0; id < vf_mbox->num_msgs; id++) { for (id = 0; id < vf_mbox->num_msgs; id++) {
msg = (struct mbox_msghdr *)(mdev->mbase + mbox->rx_start + msg = (struct mbox_msghdr *)(mdev->mbase + mbox->rx_start +
...@@ -494,7 +492,6 @@ static void otx2_pfvf_mbox_up_handler(struct work_struct *work) ...@@ -494,7 +492,6 @@ static void otx2_pfvf_mbox_up_handler(struct work_struct *work)
struct otx2_nic *pf = vf_mbox->pfvf; struct otx2_nic *pf = vf_mbox->pfvf;
struct otx2_mbox_dev *mdev; struct otx2_mbox_dev *mdev;
int offset, id, vf_idx = 0; int offset, id, vf_idx = 0;
struct mbox_hdr *rsp_hdr;
struct mbox_msghdr *msg; struct mbox_msghdr *msg;
struct otx2_mbox *mbox; struct otx2_mbox *mbox;
...@@ -502,8 +499,7 @@ static void otx2_pfvf_mbox_up_handler(struct work_struct *work) ...@@ -502,8 +499,7 @@ static void otx2_pfvf_mbox_up_handler(struct work_struct *work)
mbox = &pf->mbox_pfvf[0].mbox_up; mbox = &pf->mbox_pfvf[0].mbox_up;
mdev = &mbox->dev[vf_idx]; mdev = &mbox->dev[vf_idx];
rsp_hdr = (struct mbox_hdr *)(mdev->mbase + mbox->rx_start); offset = mbox->rx_start + ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
offset = mbox->rx_start + ALIGN(sizeof(*rsp_hdr), MBOX_MSG_ALIGN);
for (id = 0; id < vf_mbox->up_num_msgs; id++) { for (id = 0; id < vf_mbox->up_num_msgs; id++) {
msg = mdev->mbase + offset; msg = mdev->mbase + offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment