summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/common/device.c
diff options
context:
space:
mode:
authorOded Gabbay <ogabbay@kernel.org>2022-09-19 23:08:40 +0200
committerOded Gabbay <ogabbay@kernel.org>2022-09-20 14:52:27 +0200
commit259cee1c2422bcff7ba6bb4e8179faadb52ebdee (patch)
tree5d47c73acc263f2cc9d45557c20fa2effae4a2eb /drivers/misc/habanalabs/common/device.c
parenthabanalabs/gaudi: use 8KB aligned address for TPC kernels (diff)
downloadlinux-259cee1c2422bcff7ba6bb4e8179faadb52ebdee.tar.xz
linux-259cee1c2422bcff7ba6bb4e8179faadb52ebdee.zip
habanalabs: eliminate aggregate use warning
When doing sizeof() and giving as argument a dereference of a pointer-to-a-pointer object, clang will issue a warning. Eliminate the warning by passing struct <name>* Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/device.c')
-rw-r--r--drivers/misc/habanalabs/common/device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c
index c6a00bb259fb..233d8b46c831 100644
--- a/drivers/misc/habanalabs/common/device.c
+++ b/drivers/misc/habanalabs/common/device.c
@@ -719,7 +719,7 @@ static int device_early_init(struct hl_device *hdev)
if (hdev->asic_prop.completion_queues_count) {
hdev->cq_wq = kcalloc(hdev->asic_prop.completion_queues_count,
- sizeof(*hdev->cq_wq),
+ sizeof(struct workqueue_struct *),
GFP_KERNEL);
if (!hdev->cq_wq) {
rc = -ENOMEM;
@@ -1863,7 +1863,7 @@ int hl_device_init(struct hl_device *hdev, struct class *hclass)
}
hdev->shadow_cs_queue = kcalloc(hdev->asic_prop.max_pending_cs,
- sizeof(*hdev->shadow_cs_queue), GFP_KERNEL);
+ sizeof(struct hl_cs *), GFP_KERNEL);
if (!hdev->shadow_cs_queue) {
rc = -ENOMEM;
goto cq_fini;