public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Cc: linux-media@vger.kernel.org, mchehab@infradead.org
Subject: Re: [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen
Date: Wed, 17 Mar 2010 23:50:08 +0100	[thread overview]
Message-ID: <201003172350.09212.arnout@mind.be> (raw)
In-Reply-To: <4BA1422E.4030601@maxwell.research.nokia.com>


On Wednesday 17 March 2010 21:57:18, Sakari Ailus wrote:
> Arnout Vandecappelle wrote:
> > diff --git a/drivers/media/video/videobuf-dma-sg.c
> > b/drivers/media/video/videobuf-dma-sg.c index da1790e..3b6f1b8 100644
> > --- a/drivers/media/video/videobuf-dma-sg.c
> > +++ b/drivers/media/video/videobuf-dma-sg.c
> > @@ -244,7 +244,7 @@ int videobuf_dma_map(struct videobuf_queue* q,
> > struct videobuf_dmabuf *dma)
> > 
> >  	}
> >  	if (!dma->bus_addr) {
> >  	
> >  		dma->sglen = dma_map_sg(q->dev, dma->sglist,
> > 
> > -					dma->nr_pages, dma->direction);
> > +					dma->sglen, dma->direction);
> > 
> >  		if (0 == dma->sglen) {
> >  		
> >  			printk(KERN_WARNING
> >  			
> >  			       "%s: videobuf_map_sg failed\n",__func__);
> 
> Where is dma->sglen actually set?
> 
> videobuf_dma_map() is used in __videobuf_iolock
> (drivers/media/video/videobuf-dma-sg.c) but neither
> videobuf_dma_init_kernel() nor videobuf_dma_init_user() seem to set it.
> This apparently leaves the value uninitialised.
> 
> I definitely think it should be assigned somewhere. :-)

 It's assigned there exactly - nr_pages shouldn't have been replaced there.

 Updated patches follow.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  31BB CF53 8660 6F88 345D  54CC A836 5879 20D7 CF43

  reply	other threads:[~2010-03-17 22:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03 14:12 Support for zerocopy to DSP on OMAP3 Arnout Vandecappelle
2010-03-03 19:11 ` [PATCH RFCv1] " Arnout Vandecappelle
2010-03-04  9:52   ` Laurent Pinchart
2010-03-04 16:00 ` [PATCHv2] " Arnout Vandecappelle
2010-03-04 16:00 ` [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen Arnout Vandecappelle
2010-03-17 20:57   ` Sakari Ailus
2010-03-17 22:50     ` Arnout Vandecappelle [this message]
2010-03-04 16:00 ` [PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory Arnout Vandecappelle
  -- strict thread matches above, loose matches on Subject: below --
2010-03-17 22:53 [PATCH v3] Support for zerocopy to DMA buffers Arnout Vandecappelle
2010-03-17 22:53 ` [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen Arnout Vandecappelle
2010-03-24  5:43   ` Sakari Ailus
2010-03-30 10:27     ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201003172350.09212.arnout@mind.be \
    --to=arnout@mind.be \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=sakari.ailus@maxwell.research.nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox