drm/tegra: Fix compile errors with clang

Fix build errors encountered when building the modules with android
common kernel(ACK) using clang.

Bug 3974840

Change-Id: Ie12d5143c3c13a66dcd5f0ee06035593d5bec6a6
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921068
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Jian-Min Liu <jianminl@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Ankita Garg
2023-06-14 07:32:13 +00:00
committed by mobile promotions
parent c59b9a9a26
commit 1360c38cf4
2 changed files with 5 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2020 NVIDIA Corporation */
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved.
*/
#include <linux/dma-fence-array.h>
#include <linux/dma-mapping.h>
@@ -425,7 +427,7 @@ submit_create_job(struct tegra_drm_context *context, struct gather_bo *bo,
needed_cmds = args->num_cmds;
if (job_data->timestamps.virt) {
/* Space for TSP method commands */
err = check_add_overflow(needed_cmds, 2, &needed_cmds);
err = check_add_overflow(needed_cmds, (u32)2U, &needed_cmds);
if (err) {
SUBMIT_ERR(context, "num_cmds too high");
job = ERR_PTR(-EINVAL);