1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-25 03:46:19 +00:00
Lakka-LibreELEC/projects/NXP/devices/iMX8/patches/linux/0005-LF-1511-drm-cdn-cec-replace-i-with-i-in-loop.patch

38 lines
1.4 KiB
Diff

From eb19fd99254d6a0aa97bb08c09b9f82ebff306c5 Mon Sep 17 00:00:00 2001
From: Sandor Yu <Sandor.yu@nxp.com>
Date: Fri, 19 Jun 2020 15:32:28 +0800
Subject: [PATCH 05/49] LF-1511: drm: cdn-cec: replace ++i with i++ in loop
replace ++i with i++ in loop to prevent Coverity issue.
Coverity ID 9000767
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
---
drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c
index 5717bb0bcb75..029ad761606a 100644
--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c
@@ -163,13 +163,13 @@ static int mhdp_cec_set_logical_addr(struct cdns_mhdp_cec *cec, u32 la)
if (la == CEC_LOG_ADDR_INVALID)
/* invalid all LA address */
- for (i = 0; i < CEC_MAX_LOG_ADDRS; ++i) {
+ for (i = 0; i < CEC_MAX_LOG_ADDRS; i++) {
mhdp_cec_write(cec, LOGICAL_ADDRESS_LA0 + (i * REG_ADDR_OFF), 0);
return 0;
}
/* In fact cdns mhdp cec could support max 5 La address */
- for (i = 0; i < CEC_MAX_LOG_ADDRS; ++i) {
+ for (i = 0; i < CEC_MAX_LOG_ADDRS; i++) {
la_reg = mhdp_cec_read(cec, LOGICAL_ADDRESS_LA0 + (i * REG_ADDR_OFF));
/* Check LA already used */
if (la_reg & 0x10)
--
2.29.2