lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: 
 <CO1PR18MB466675E232FA99415D766F68A1362@CO1PR18MB4666.namprd18.prod.outlook.com>
Date: Mon, 25 Mar 2024 12:44:44 +0000
From: Subbaraya Sundeep Bhatta <sbhatta@...vell.com>
To: Su Hui <suhui@...china.com>, Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Geethasowjanya Akula <gakula@...vell.com>,
        Hariprasad Kelam
	<hkelam@...vell.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org"
	<kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "nathan@...nel.org" <nathan@...nel.org>,
        "ndesaulniers@...gle.com"
	<ndesaulniers@...gle.com>,
        "morbo@...gle.com" <morbo@...gle.com>,
        "justinstitt@...gle.com" <justinstitt@...gle.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [EXTERNAL] [PATCH 2/2] octeontx2-pf: remove unused variables
 req_hdr and rsp_hdr

Hi,

>-----Original Message-----
>From: Su Hui <suhui@...china.com>
>Sent: Monday, March 25, 2024 1:06 PM
>To: Sunil Kovvuri Goutham <sgoutham@...vell.com>; Geethasowjanya Akula
><gakula@...vell.com>; Subbaraya Sundeep Bhatta <sbhatta@...vell.com>;
>Hariprasad Kelam <hkelam@...vell.com>; davem@...emloft.net;
>edumazet@...gle.com; kuba@...nel.org; pabeni@...hat.com;
>nathan@...nel.org; ndesaulniers@...gle.com; morbo@...gle.com;
>justinstitt@...gle.com
>Cc: Su Hui <suhui@...china.com>; netdev@...r.kernel.org; linux-
>kernel@...r.kernel.org; llvm@...ts.linux.dev; kernel-janitors@...r.kernel.org
>Subject: [PATCH 2/2] 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]
>
Consider this also as a fix and add Fixes tag. Also please add "net" in subject to
easily identify whether this patch as net or net-next material.

Thanks,
Sundeep

>Remove these unused variables to save some space.
>
>Signed-off-by: Su Hui <suhui@...china.com>
>---
> drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
>diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
>b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
>index 3f46d5e0fb2e..637b05c79c42 100644
>--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
>+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
>@@ -450,7 +450,6 @@ static void otx2_pfvf_mbox_handler(struct
>work_struct *work)
> 	struct mbox_msghdr *msg = NULL;
> 	int offset, vf_idx, id, err;
> 	struct otx2_mbox_dev *mdev;
>-	struct mbox_hdr *req_hdr;
> 	struct otx2_mbox *mbox;
> 	struct mbox *vf_mbox;
> 	struct otx2_nic *pf;
>@@ -461,9 +460,8 @@ static void otx2_pfvf_mbox_handler(struct
>work_struct *work)
>
> 	mbox = &pf->mbox_pfvf[0].mbox;
> 	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++) {
> 		msg = (struct mbox_msghdr *)(mdev->mbase + mbox->rx_start
>+
>@@ -494,7 +492,6 @@ static void otx2_pfvf_mbox_up_handler(struct
>work_struct *work)
> 	struct otx2_nic *pf = vf_mbox->pfvf;
> 	struct otx2_mbox_dev *mdev;
> 	int offset, id, vf_idx = 0;
>-	struct mbox_hdr *rsp_hdr;
> 	struct mbox_msghdr *msg;
> 	struct otx2_mbox *mbox;
>
>@@ -502,8 +499,7 @@ static void otx2_pfvf_mbox_up_handler(struct
>work_struct *work)
> 	mbox = &pf->mbox_pfvf[0].mbox_up;
> 	mdev = &mbox->dev[vf_idx];
>
>-	rsp_hdr = (struct mbox_hdr *)(mdev->mbase + mbox->rx_start);
>-	offset = mbox->rx_start + ALIGN(sizeof(*rsp_hdr),
>MBOX_MSG_ALIGN);
>+	offset = mbox->rx_start + ALIGN(sizeof(struct mbox_hdr),
>MBOX_MSG_ALIGN);
>
> 	for (id = 0; id < vf_mbox->up_num_msgs; id++) {
> 		msg = mdev->mbase + offset;
>--
>2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ