video: rockchip: rga3: fix the error report of Coverity

1. Fix the issue of scheduler and hardware maximum count mismatch.
2. Fix the issue of potential GCD returning 0.

Change-Id: I083553e69ab60549b26465b5d1437e817575856f
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
This commit is contained in:
Yu Qiaowei
2023-11-09 10:15:05 +08:00
committed by Tao Huang
parent 9a4ab40b64
commit 4ddda80541
2 changed files with 2 additions and 2 deletions

View File

@@ -97,7 +97,7 @@
#define RGA_JOB_TIMEOUT_DELAY HZ
#define RGA_RESET_TIMEOUT 1000
#define RGA_MAX_SCHEDULER 3
#define RGA_MAX_SCHEDULER RGA_HW_SIZE
#define RGA_MAX_BUS_CLK 10
#define RGA_BUFFER_POOL_MAX_SIZE 64

View File

@@ -15,7 +15,7 @@
#define GET_GCD(n1, n2) \
({ \
int i; \
int gcd = 0; \
int gcd = 1; \
for (i = 1; i <= (n1) && i <= (n2); i++) { \
if ((n1) % i == 0 && (n2) % i == 0) \
gcd = i; \