public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* em38xx locking question
@ 2015-03-10 13:18 Ezequiel Garcia
  2015-03-10 13:26 ` Hans Verkuil
  0 siblings, 1 reply; 6+ messages in thread
From: Ezequiel Garcia @ 2015-03-10 13:18 UTC (permalink / raw)
  To: linux-media, mchehab, hans.verkuil

Mauro,

Function drivers/media/usb/em28xx/em28xx-video.c:get_next_buf
(copy pasted below for reference) does not take the list spinlock,
yet it modifies the list. Is that correct?

static inline struct em28xx_buffer *get_next_buf(struct em28xx *dev,
                                                 struct em28xx_dmaqueue *dma_q)
{
        struct em28xx_buffer *buf;

        if (list_empty(&dma_q->active)) {
                em28xx_isocdbg("No active queue to serve\n");
                return NULL;
        }
 
        /* Get the next buffer */
        buf = list_entry(dma_q->active.next, struct em28xx_buffer, list);
        /* Cleans up buffer - Useful for testing for frame/URB loss */
        list_del(&buf->list);
        buf->pos = 0; 
        buf->vb_buf = buf->mem;
 
        return buf;
}

Thanks!
-- 
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-10 14:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10 13:18 em38xx locking question Ezequiel Garcia
2015-03-10 13:26 ` Hans Verkuil
2015-03-10 13:29   ` Ezequiel Garcia
2015-03-10 13:46     ` Hans Verkuil
2015-03-10 14:06       ` Ezequiel Garcia
2015-03-10 14:16         ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox