Skip to content

Commit 1ab6fe6

Browse files
Su Huikuba-moo
authored andcommitted
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: Su Hui <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e93af72 commit 1ab6fe6

File tree

1 file changed

+2
-6
lines changed
  • drivers/net/ethernet/marvell/octeontx2/nic

1 file changed

+2
-6
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ static void otx2_pfvf_mbox_handler(struct work_struct *work)
450450
struct mbox_msghdr *msg = NULL;
451451
int offset, vf_idx, id, err;
452452
struct otx2_mbox_dev *mdev;
453-
struct mbox_hdr *req_hdr;
454453
struct otx2_mbox *mbox;
455454
struct mbox *vf_mbox;
456455
struct otx2_nic *pf;
@@ -461,9 +460,8 @@ static void otx2_pfvf_mbox_handler(struct work_struct *work)
461460

462461
mbox = &pf->mbox_pfvf[0].mbox;
463462
mdev = &mbox->dev[vf_idx];
464-
req_hdr = (struct mbox_hdr *)(mdev->mbase + mbox->rx_start);
465463

466-
offset = ALIGN(sizeof(*req_hdr), MBOX_MSG_ALIGN);
464+
offset = ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
467465

468466
for (id = 0; id < vf_mbox->num_msgs; id++) {
469467
msg = (struct mbox_msghdr *)(mdev->mbase + mbox->rx_start +
@@ -494,16 +492,14 @@ static void otx2_pfvf_mbox_up_handler(struct work_struct *work)
494492
struct otx2_nic *pf = vf_mbox->pfvf;
495493
struct otx2_mbox_dev *mdev;
496494
int offset, id, vf_idx = 0;
497-
struct mbox_hdr *rsp_hdr;
498495
struct mbox_msghdr *msg;
499496
struct otx2_mbox *mbox;
500497

501498
vf_idx = vf_mbox - pf->mbox_pfvf;
502499
mbox = &pf->mbox_pfvf[0].mbox_up;
503500
mdev = &mbox->dev[vf_idx];
504501

505-
rsp_hdr = (struct mbox_hdr *)(mdev->mbase + mbox->rx_start);
506-
offset = mbox->rx_start + ALIGN(sizeof(*rsp_hdr), MBOX_MSG_ALIGN);
502+
offset = mbox->rx_start + ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
507503

508504
for (id = 0; id < vf_mbox->up_num_msgs; id++) {
509505
msg = mdev->mbase + offset;

0 commit comments

Comments
 (0)