From: Leon Romanovsky <leon@kernel.org>
To: Selvin Xavier <selvin.xavier@broadcom.com>
Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
jgg@ziepe.ca, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH -next] RDMA/bnxt_re: Remove the unused variable en_dev
Date: Sun, 22 Sep 2024 16:52:43 +0300 [thread overview]
Message-ID: <20240922135243.GB11337@unreal> (raw)
In-Reply-To: <CA+sbYW0zy=kD1JyYbG--keYAv146+SXvuxdQh6dHnvbVCHd9kw@mail.gmail.com>
On Thu, Sep 19, 2024 at 02:16:11PM +0530, Selvin Xavier wrote:
> On Wed, Sep 18, 2024 at 7:46 AM Jiapeng Chong
> <jiapeng.chong@linux.alibaba.com> wrote:
> >
> > Variable en_dev is not effectively used, so delete it.
> >
> > drivers/infiniband/hw/bnxt_re/main.c:1980:22: warning: variable ‘en_dev’ set but not used.
>
> Not sure if you are applying v1 of a previous patch series. A similar
> issue was reported by kernel test robot and i fixed in v2. I dont see
> this code in the latest driver code.
Similar but not the same, I applied your v2 series, but Jiapeng's patch
is valid:
1977 static void bnxt_re_remove(struct auxiliary_device *adev)
1978 {
1979 struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(adev);
1980 struct bnxt_en_dev *en_dev;
1981 struct bnxt_re_dev *rdev;
1982
1983 mutex_lock(&bnxt_re_mutex);
1984 if (!en_info) {
1985 mutex_unlock(&bnxt_re_mutex);
1986 return;
1987 }
1988 en_dev = en_info->en_dev;
1989 rdev = en_info->rdev;
1990
1991 if (rdev)
1992 bnxt_re_remove_device(rdev, BNXT_RE_COMPLETE_REMOVE, adev);
1993 kfree(en_info);
1994 mutex_unlock(&bnxt_re_mutex);
1995 }
Thanks
next prev parent reply other threads:[~2024-09-22 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-18 2:16 [PATCH -next] RDMA/bnxt_re: Remove the unused variable en_dev Jiapeng Chong
2024-09-19 8:46 ` Selvin Xavier
2024-09-22 13:52 ` Leon Romanovsky [this message]
2024-09-22 13:54 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240922135243.GB11337@unreal \
--to=leon@kernel.org \
--cc=abaci@linux.alibaba.com \
--cc=jgg@ziepe.ca \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox