Thread (12 messages) 12 messages, 3 authors, 2017-08-14

[PATCH 4/5] media: platform: s5p-jpeg: fix number of components macro

From: s.nawrocki@samsung.com (Sylwester Nawrocki)
Date: 2017-08-10 14:09:53
Also in: linux-media, linux-samsung-soc

On 08/08/2017 01:27 PM, Andrzej Pietrasiewicz wrote:
quoted hunk ↗ jump to hunk
The value to be processed must be first masked and then shifted,
not the other way round.

Signed-off-by: Andrzej Pietrasiewicz <redacted>
---
  drivers/media/platform/s5p-jpeg/jpeg-regs.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-regs.h b/drivers/media/platform/s5p-jpeg/jpeg-regs.h
index 1870400..df790b1 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-regs.h
+++ b/drivers/media/platform/s5p-jpeg/jpeg-regs.h
@@ -371,7 +371,7 @@
  #define EXYNOS4_NF_SHIFT			16
  #define EXYNOS4_NF_MASK				0xff
  #define EXYNOS4_NF(x)				\
-	(((x) << EXYNOS4_NF_SHIFT) & EXYNOS4_NF_MASK)
+	(((x) & EXYNOS4_NF_MASK) << EXYNOS4_NF_SHIFT)
I'm going to add below tag when applying this patch.

Fixes: 6c96dbbc2aa9f5b4a ("[media] s5p-jpeg: add support for 5433")

-- 
Regards,
Sylwester
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help