From 66cc8d97daef09de8a31377cfab86b1ba45e9b28 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Wed, 8 May 2019 12:52:22 -0700 Subject: [PATCH] gpu: nvgpu: MISRA fix for Rule 10.4 Change 1 (signed) to 1U (unsigned) for macros defined in circ_buf.h JIRA NVGPU-3388 Change-Id: I879ea03755e1e0446dbe55ee01afd58ab3eb8c0f Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/2114873 Reviewed-by: Philip Elcan Reviewed-by: Thomas Fleury Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/posix/circ_buf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/circ_buf.h b/drivers/gpu/nvgpu/include/nvgpu/posix/circ_buf.h index 79b474810..6b28421ff 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/posix/circ_buf.h +++ b/drivers/gpu/nvgpu/include/nvgpu/posix/circ_buf.h @@ -25,7 +25,7 @@ #include -#define CIRC_CNT(head, tail, size) (((head) - (tail)) & ((size)-1)) -#define CIRC_SPACE(head, tail, size) CIRC_CNT((tail), ((head)+1), (size)) +#define CIRC_CNT(head, tail, size) (((head) - (tail)) & ((size)-1U)) +#define CIRC_SPACE(head, tail, size) CIRC_CNT((tail), ((head)+1U), (size)) #endif /* NVGPU_POSIX_CIRC_BUF_H */