From: Valentin Vidic <vvidic@valentin-vidic.from.hr>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Philip Rischel <rischelp@idt.com>,
Florian Fainelli <florian@openwrt.org>,
Roman Yeryomin <roman@advem.lv>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>,
Martin Habets <mhabets@solarflare.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Network Development <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Valentin Vidic <vvidic@valentin-vidic.from.hr>,
kernel test robot <lkp@intel.com>
Subject: [PATCH] net: korina: cast KSEG0 address to pointer in kfree
Date: Sun, 18 Oct 2020 20:42:55 +0200 [thread overview]
Message-ID: <20201018184255.28989-1-vvidic@valentin-vidic.from.hr> (raw)
In-Reply-To: <20201016194611.GK8773@valentin-vidic.from.hr>
Fixes gcc warning:
passing argument 1 of 'kfree' makes pointer from integer without a cast
Fixes: 3af5f0f5c74e ("net: korina: fix kfree of rx/tx descriptor array")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
---
drivers/net/ethernet/korina.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c
index af441d699a57..bf48f0ded9c7 100644
--- a/drivers/net/ethernet/korina.c
+++ b/drivers/net/ethernet/korina.c
@@ -1113,7 +1113,7 @@ static int korina_probe(struct platform_device *pdev)
return rc;
probe_err_register:
- kfree(KSEG0ADDR(lp->td_ring));
+ kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
probe_err_td_ring:
iounmap(lp->tx_dma_regs);
probe_err_dma_tx:
@@ -1133,7 +1133,7 @@ static int korina_remove(struct platform_device *pdev)
iounmap(lp->eth_regs);
iounmap(lp->rx_dma_regs);
iounmap(lp->tx_dma_regs);
- kfree(KSEG0ADDR(lp->td_ring));
+ kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
unregister_netdev(bif->dev);
free_netdev(bif->dev);
--
2.20.1
next parent reply other threads:[~2020-10-18 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201016194611.GK8773@valentin-vidic.from.hr>
2020-10-18 18:42 ` Valentin Vidic [this message]
2020-10-20 0:04 ` [PATCH] net: korina: cast KSEG0 address to pointer in kfree Jakub Kicinski
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=20201018184255.28989-1-vvidic@valentin-vidic.from.hr \
--to=vvidic@valentin-vidic.from.hr \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=florian@openwrt.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mhabets@solarflare.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rischelp@idt.com \
--cc=roman@advem.lv \
--cc=rppt@kernel.org \
--cc=willemdebruijn.kernel@gmail.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).