[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190523113613.28342-7-simon@nikanor.nu>
Date: Thu, 23 May 2019 13:36:11 +0200
From: Simon Sandström <simon@...anor.nu>
To: gregkh@...uxfoundation.org
Cc: simon@...anor.nu, jeremy@...zel.net, dan.carpenter@...cle.com,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH 6/8] staging: kpc2000: use kzalloc(sizeof(var)...) in cell_probe.c
Fixes checkpatch.pl warning "Prefer kzalloc(sizeof(*kudev)...) over
kzalloc(sizeof(struct kpc_uio_device)...)"
Signed-off-by: Simon Sandström <simon@...anor.nu>
---
drivers/staging/kpc2000/kpc2000/cell_probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 0da41ca17eb7..8d9254db9498 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -292,7 +292,7 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
dev_dbg(&pcard->pdev->dev, "Found UIO core: type = %02d dma = %02x / %02x offset = 0x%x length = 0x%x (%d regs)\n", cte.type, KPC_OLD_S2C_DMA_CH_NUM(cte), KPC_OLD_C2S_DMA_CH_NUM(cte), cte.offset, cte.length, cte.length / 8);
- kudev = kzalloc(sizeof(struct kpc_uio_device), GFP_KERNEL);
+ kudev = kzalloc(sizeof(*kudev), GFP_KERNEL);
if (!kudev) {
dev_err(&pcard->pdev->dev, "%s: failed to kzalloc kpc_uio_device\n",
__func__);
--
2.20.1
Powered by blists - more mailing lists