summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2023-06-03 16:16:41 -0700
committerMarge Bot <emma+marge@anholt.net>2023-06-05 09:21:34 +0000
commit8bc7d71c2323645cff01b5d9245db6a65c0c7f0b (patch)
treed2d688be671bd591a345daa87aa0f06924511505
parentd75973a1422d86799312d7aa60d0dce846fb3dba (diff)
pvr: Fix signed comparison
Fix defect reported by Coverity Scan. Unsigned compared against 0 (NO_EFFECT) unsigned_compare: This less-than-zero comparison of an unsigned value is never true. val < 0U. unsigned_conversion: val is converted to an unsigned type because it's compared to an unsigned constant. Fixes: 480bdff4b52 ("pvr: Add support to process transfer and blit cmds") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23416>
-rw-r--r--src/imagination/vulkan/pvr_job_transfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imagination/vulkan/pvr_job_transfer.c b/src/imagination/vulkan/pvr_job_transfer.c
index 0afcf36dccd..6c3e350fb8a 100644
--- a/src/imagination/vulkan/pvr_job_transfer.c
+++ b/src/imagination/vulkan/pvr_job_transfer.c
@@ -3504,7 +3504,7 @@ pvr_int32_to_isp_xy_vtx(const struct pvr_device_info *dev_info,
return vk_error(NULL, VK_ERROR_UNKNOWN);
pvr_csb_pack (word_out, IPF_ISP_VERTEX_XY, word) {
- word.sign = val < 0U;
+ word.sign = val < 0;
word.integer = val;
}