[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200419154444.21977-1-aishwaryarj100@gmail.com>
Date: Sun, 19 Apr 2020 21:14:43 +0530
From: Aishwarya Ramakrishnan <aishwaryarj100@...il.com>
To: "David S. Miller" <davem@...emloft.net>,
Heiner Kallweit <hkallweit1@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Martin Habets <mhabets@...arflare.com>,
Aishwarya Ramakrishnan <aishwaryarj100@...il.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] net: sun: Remove unneeded cast from memory allocation
Remove casting the values returned by memory allocation function.
Coccinelle emits WARNING: casting value returned by memory allocation
function to (struct cas_init_block *) is useless.
This issue was detected by using the Coccinelle software.
Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@...il.com>
---
drivers/net/ethernet/sun/cassini.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index e6d1aa882fa5..3ee6ab104cb9 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -5059,7 +5059,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (cp->cas_flags & CAS_FLAG_SATURN)
cas_saturn_firmware_init(cp);
- cp->init_block = (struct cas_init_block *)
+ cp->init_block =
pci_alloc_consistent(pdev, sizeof(struct cas_init_block),
&cp->block_dvma);
if (!cp->init_block) {
--
2.17.1
Powered by blists - more mailing lists