diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2022-09-20 00:08:40 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-09-20 15:52:27 +0300 |
commit | 259cee1c2422bcff7ba6bb4e8179faadb52ebdee (patch) | |
tree | 5d47c73acc263f2cc9d45557c20fa2effae4a2eb /drivers/misc/habanalabs/common/memory.c | |
parent | e403856468456aeaff68a5cb0a851d945c133ed9 (diff) | |
download | linux-259cee1c2422bcff7ba6bb4e8179faadb52ebdee.tar.xz |
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/memory.c')
-rw-r--r-- | drivers/misc/habanalabs/common/memory.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index 096fa3c1ae95..ef28f3b37b93 100644 --- a/drivers/misc/habanalabs/common/memory.c +++ b/drivers/misc/habanalabs/common/memory.c @@ -2308,8 +2308,7 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size, return -EFAULT; } - userptr->pages = kvmalloc_array(npages, sizeof(*userptr->pages), - GFP_KERNEL); + userptr->pages = kvmalloc_array(npages, sizeof(struct page *), GFP_KERNEL); if (!userptr->pages) return -ENOMEM; |