Skip to contentSkip to conversation

include/media: fix missing | operator when setting cfg

PATCH In review Colin King 2 participants 5 messages Apr 18, 2018

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 include/media: fix missing | operator when setting cfg

From: Colin Ian King <[email protected]>

The value from a readl is being masked with ITE_REG_CIOCAN_MASK however this is not being used and cfg is being re-assigned. I believe the assignment operator should actually be instead the |= operator.

Detected by CoverityScan, CID#1467987 ("Unused value")

---
 drivers/media/platform/exynos4-is/fimc-lite-reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/exynos4-is/fimc-lite-reg.c +1 -1
index f0acc550d065..16565a0b4bf1 100644
@@ -254,7 +254,7 @@ void flite_hw_set_dma_window(struct fimc_lite *dev, struct flite_frame *f)
 	/* Maximum output pixel size */
 	cfg = readl(dev->regs + FLITE_REG_CIOCAN);
 	cfg &= ~FLITE_REG_CIOCAN_MASK;
-	cfg = (f->f_height << 16) | f->f_width;
+	cfg |= (f->f_height << 16) | f->f_width;
 	writel(cfg, dev->regs + FLITE_REG_CIOCAN);
 
 	/* DMA offsets */
Signature · 1 line
2.17.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Colin King

From: Colin Ian King <[email protected]>

The value from a readl is being masked with ITE_REG_CIOCAN_MASK however this is not being used and cfg is being re-assigned. I believe the assignment operator should actually be instead the |= operator.

Detected by CoverityScan, CID#1467987 ("Unused value")

Thanks for the patch.

#2 lore raw
Quoted 7 lines · Sylwester Nawrocki
Quoted 6 lines · Colin King

From: Colin Ian King <[email protected]>

The value from a readl is being masked with ITE_REG_CIOCAN_MASK however this is not being used and cfg is being re-assigned. I believe the assignment operator should actually be instead the |= operator.

Quoted 6 lines
Quoted 3 lines

Detected by CoverityScan, CID#1467987 ("Unused value")

Thanks for the patch.

I forgot to mention that the subject should rather looks something like:

"exynos4-is: fimc-lite: : fix missing | operator when setting cfg"

Signature · 2 lines
Regards,
Sylwester
#3 lore raw
Quoted 11 lines · Sylwester Nawrocki
Quoted 10 lines · Sylwester Nawrocki
Quoted 9 lines · Colin King

From: Colin Ian King <[email protected]>

The value from a readl is being masked with ITE_REG_CIOCAN_MASK however this is not being used and cfg is being re-assigned. I believe the assignment operator should actually be instead the |= operator.

Detected by CoverityScan, CID#1467987 ("Unused value")

Quoted 9 lines
Quoted 3 lines

Thanks for the patch.

I forgot to mention that the subject should rather looks something like:

"exynos4-is: fimc-lite: : fix missing | operator when setting cfg"

Oops, shall I re-send?

#4 lore raw
Quoted 1 line · Colin Ian King

Oops, shall I re-send?

There is no need to, thanks.