Skip to contentSkip to conversation

media: ti-vpe: vpe: use r2y instead of y2r, copy-paste error

PATCH In review Colin King 2 participants 2 messages Oct 11, 2019

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 media: ti-vpe: vpe: use r2y instead of y2r, copy-paste error

From: Colin Ian King <[email protected]>

There appears to be a copy-paste error on the access of csc_coeffs.y2r.r601.full.coeff, I believe csc_coeffs.2yr.r601.full.coeff should be used instead. This is a moot point as the code is never reached, but at least use the correct structure element.

Addresses-Coverity: ("Copy-paste error")

Fixes 3ff3a712a9ea ("media: ti-vpe: vpe: don't rely on colorspace member for conversion")
---
 drivers/media/platform/ti-vpe/csc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/ti-vpe/csc.c +1 -1
index bd923bee4a31..834114a4eebe 100644
@@ -238,7 +238,7 @@ void csc_set_coeff(struct csc_data *csc, u32 *csc_reg0,
 				coeff = csc_coeffs.r2y.r709.limited.coeff;
 		} else {
 			/* Should never reach this, but it keeps gcc happy */
-			coeff = csc_coeffs.y2r.r601.full.coeff;
+			coeff = csc_coeffs.r2y.r601.full.coeff;
 		}
 	} else {
 		*csc_reg5 |= CSC_BYPASS;
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Colin King <[email protected]> wrote on Fri [2019-Oct-11 14:29:40 +0100]:

Quoted 19 lines

From: Colin Ian King <[email protected]>

There appears to be a copy-paste error on the access of csc_coeffs.y2r.r601.full.coeff, I believe csc_coeffs.2yr.r601.full.coeff should be used instead. This is a moot point as the code is never reached, but at least use the correct structure element.

Addresses-Coverity: ("Copy-paste error")

Fixes 3ff3a712a9ea ("media: ti-vpe: vpe: don't rely on colorspace member for conversion")
---
 drivers/media/platform/ti-vpe/csc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/ti-vpe/csc.c +0 -0
index bd923bee4a31..834114a4eebe 100644

drivers/media/platform/ti-vpe/csc.c void csc_set_coeff(struct csc_data *csc, u32 *csc_reg0, · line 244

Quoted 8 lines
drivers/media/platform/ti-vpe/csc.c +1 -1
@@ -238,7 +238,7 @@ void csc_set_coeff(struct csc_data *csc, u32 *csc_reg0,
 				coeff = csc_coeffs.r2y.r709.limited.coeff;
 		} else {
 			/* Should never reach this, but it keeps gcc happy */
-			coeff = csc_coeffs.y2r.r601.full.coeff;
+			coeff = csc_coeffs.r2y.r601.full.coeff;
 		}
 	} else {
 		*csc_reg5 |= CSC_BYPASS;
Reviewed-by Benoit Parrot <bparrot.ti.com>
Quoted 3 lines
Signature · 1 line
2.20.1