summaryrefslogtreecommitdiff
path: root/drivers/message
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2021-03-12 10:18:03 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-24 22:33:31 -0400
commit690209d5ebefc8a2f05b8edb1af7769f1bf15440 (patch)
treee700b66c65bab9a54d8bd3504d8f0667cd7066b8 /drivers/message
parentdfd35e1d5934ca5fb6a8f30cdaa24d919c23d7a3 (diff)
downloadlwn-690209d5ebefc8a2f05b8edb1af7769f1bf15440.tar.gz
lwn-690209d5ebefc8a2f05b8edb1af7769f1bf15440.zip
scsi: message: fusion: Remove unnecessary cast
Fix the following coccicheck warning: WARNING: casting value returned by memory allocation function is useless. Link: https://lore.kernel.org/r/1615515483-777-1-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptbase.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 549797d0301d..fa9b1223c9de 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -4974,7 +4974,7 @@ GetLanConfigPages(MPT_ADAPTER *ioc)
if (hdr.PageLength > 0) {
data_sz = hdr.PageLength * 4;
- ppage0_alloc = (LANPage0_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page0_dma);
+ ppage0_alloc = pci_alloc_consistent(ioc->pcidev, data_sz, &page0_dma);
rc = -ENOMEM;
if (ppage0_alloc) {
memset((u8 *)ppage0_alloc, 0, data_sz);
@@ -5020,7 +5020,7 @@ GetLanConfigPages(MPT_ADAPTER *ioc)
data_sz = hdr.PageLength * 4;
rc = -ENOMEM;
- ppage1_alloc = (LANPage1_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page1_dma);
+ ppage1_alloc = pci_alloc_consistent(ioc->pcidev, data_sz, &page1_dma);
if (ppage1_alloc) {
memset((u8 *)ppage1_alloc, 0, data_sz);
cfg.physAddr = page1_dma;
@@ -5321,7 +5321,7 @@ GetIoUnitPage2(MPT_ADAPTER *ioc)
/* Read the config page */
data_sz = hdr.PageLength * 4;
rc = -ENOMEM;
- ppage_alloc = (IOUnitPage2_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page_dma);
+ ppage_alloc = pci_alloc_consistent(ioc->pcidev, data_sz, &page_dma);
if (ppage_alloc) {
memset((u8 *)ppage_alloc, 0, data_sz);
cfg.physAddr = page_dma;