* re: [media] s5p-csis: Add support for non-image data packets capture
@ 2013-08-23 9:35 Dan Carpenter
2013-08-23 9:54 ` Sylwester Nawrocki
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-08-23 9:35 UTC (permalink / raw)
To: s.nawrocki; +Cc: linux-media, linux-samsung-soc
Hello Sylwester Nawrocki,
I had a question about 36fa80927638: "[media] s5p-csis: Add support for
non-image data packets capture" from Sep 21, 2012.
S5PCSIS_INTSRC_NON_IMAGE_DATA is defined in mipi-csis.c:
#define S5PCSIS_INTSRC_NON_IMAGE_DATA (0xff << 28)
And it's only used in one place.
drivers/media/platform/exynos4-is/mipi-csis.c
692 u32 status;
693
694 status = s5pcsis_read(state, S5PCSIS_INTSRC);
695 spin_lock_irqsave(&state->slock, flags);
696
697 if ((status & S5PCSIS_INTSRC_NON_IMAGE_DATA) && pktbuf->data) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"status" is a u32 so 0xff0000000 is 4 bits too much. In other words,
the mask is effectively "(0xf << 28)". Was that intended or should it
be (0xff << 24)?
698 u32 offset;
699
700 if (status & S5PCSIS_INTSRC_EVEN)
701 offset = S5PCSIS_PKTDATA_EVEN;
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [media] s5p-csis: Add support for non-image data packets capture
2013-08-23 9:35 [media] s5p-csis: Add support for non-image data packets capture Dan Carpenter
@ 2013-08-23 9:54 ` Sylwester Nawrocki
0 siblings, 0 replies; 2+ messages in thread
From: Sylwester Nawrocki @ 2013-08-23 9:54 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-media, linux-samsung-soc
On 08/23/2013 11:35 AM, Dan Carpenter wrote:
> Hello Sylwester Nawrocki,
>
> I had a question about 36fa80927638: "[media] s5p-csis: Add support for
> non-image data packets capture" from Sep 21, 2012.
>
> S5PCSIS_INTSRC_NON_IMAGE_DATA is defined in mipi-csis.c:
>
> #define S5PCSIS_INTSRC_NON_IMAGE_DATA (0xff << 28)
This is supposed to be a mask for bits [31:28], so (0xf << 28)
> And it's only used in one place.
>
> drivers/media/platform/exynos4-is/mipi-csis.c
> 692 u32 status;
> 693
> 694 status = s5pcsis_read(state, S5PCSIS_INTSRC);
> 695 spin_lock_irqsave(&state->slock, flags);
> 696
> 697 if ((status & S5PCSIS_INTSRC_NON_IMAGE_DATA) && pktbuf->data) {
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> "status" is a u32 so 0xff0000000 is 4 bits too much. In other words,
> the mask is effectively "(0xf << 28)". Was that intended or should it
> be (0xff << 24)?
It should be (0xf << 28). Thanks for looking into this.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-23 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23 9:35 [media] s5p-csis: Add support for non-image data packets capture Dan Carpenter
2013-08-23 9:54 ` Sylwester Nawrocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.