From: Simon Horman <horms@kernel.org>
To: Michal Kubiak <michal.kubiak@intel.com>
Cc: Chen Ni <nichen@iscas.ac.cn>,
manishc@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] qed: remove cast to pointers passed to kfree
Date: Mon, 17 Mar 2025 18:56:22 +0000 [thread overview]
Message-ID: <20250317185622.GK688833@kernel.org> (raw)
In-Reply-To: <Z9Bv+cjkxlVHsKAd@localhost.localdomain>
On Tue, Mar 11, 2025 at 06:16:41PM +0100, Michal Kubiak wrote:
> On Tue, Mar 11, 2025 at 06:08:24PM +0100, Michal Kubiak wrote:
> > On Tue, Mar 11, 2025 at 03:06:24PM +0800, Chen Ni wrote:
> > > Remove unnecessary casts to pointer types passed to kfree.
> > > Issue detected by coccinelle:
> > > @@
> > > type t1;
> > > expression *e;
> > > @@
> > >
> > > -kfree((t1 *)e);
> > > +kfree(e);
> > >
> > > Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> > > ---
> > > drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
> > > index f915c423fe70..886061d7351a 100644
> > > --- a/drivers/net/ethernet/qlogic/qed/qed_main.c
> > > +++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
> > > @@ -454,7 +454,7 @@ int qed_fill_dev_info(struct qed_dev *cdev,
> > >
> > > static void qed_free_cdev(struct qed_dev *cdev)
> > > {
> > > - kfree((void *)cdev);
> > > + kfree(cdev);
> > > }
> > >
> > > static struct qed_dev *qed_alloc_cdev(struct pci_dev *pdev)
> > > --
> > > 2.25.1
> > >
> > >
> >
> >
> > LGTM.
> >
> > Thanks,
> > Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
> >
>
> I'm sorry I missed that the patch is addressed to "net-next".
> It rather looks like as a candidate for the "net" tree.
>
> Please resend it to the "net" tree with an appropriate "Fixes" tag.
>
> My apologies for the noise.
Hi Michal,
I'm unclear what bug this fixes.
It seems to me that this is a clean-up.
That as such it should only be considered in the context
of more material changes to this driver.
next prev parent reply other threads:[~2025-03-17 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 7:06 [PATCH net-next] qed: remove cast to pointers passed to kfree Chen Ni
2025-03-11 17:08 ` Michal Kubiak
2025-03-11 17:16 ` Michal Kubiak
2025-03-17 18:56 ` Simon Horman [this message]
2025-03-18 9:26 ` Michal Kubiak
2025-03-18 10:10 ` patchwork-bot+netdevbpf
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=20250317185622.GK688833@kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nichen@iscas.ac.cn \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).