Message ID | 06bf50688ac75f5ee7af2cd2a9ae0d292f3002b9.1519404222.git.mchehab@s-opensource.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Mauro, Thank you for the patch. On Friday, 23 February 2018 18:43:48 EET Mauro Carvalho Chehab wrote: > The filter callbaks now have an optional extra argument, > meant to allow reporting statistics to userspace via mmap. > > Set those to NULL, in order to avoid those build errors: > + drivers/media/pci/ttpci/av7110.c: error: too few arguments to function > 'dvbdmxfilter->feed->cb.sec': => 325:10 + > drivers/media/pci/ttpci/av7110.c: error: too few arguments to function > 'dvbdmxfilter->feed->cb.ts': => 332:11 + > drivers/media/pci/ttpci/av7110_av.c: error: too few arguments to function > 'feed->cb.ts': => 817:3 > I think this misses a Fixes: line. Apart from that it looks good to me. With the Fixes: line, Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> > --- > drivers/media/pci/ttpci/av7110.c | 5 +++-- > drivers/media/pci/ttpci/av7110_av.c | 6 +++--- > drivers/media/usb/ttusb-dec/ttusb_dec.c | 10 +++++----- > 3 files changed, 11 insertions(+), 10 deletions(-) > > diff --git a/drivers/media/pci/ttpci/av7110.c > b/drivers/media/pci/ttpci/av7110.c index dc8e577b2f74..d6816effb878 100644 > --- a/drivers/media/pci/ttpci/av7110.c > +++ b/drivers/media/pci/ttpci/av7110.c > @@ -324,14 +324,15 @@ static int DvbDmxFilterCallback(u8 *buffer1, size_t > buffer1_len, } > return dvbdmxfilter->feed->cb.sec(buffer1, buffer1_len, > buffer2, buffer2_len, > - &dvbdmxfilter->filter); > + &dvbdmxfilter->filter, NULL); > case DMX_TYPE_TS: > if (!(dvbdmxfilter->feed->ts_type & TS_PACKET)) > return 0; > if (dvbdmxfilter->feed->ts_type & TS_PAYLOAD_ONLY) > return dvbdmxfilter->feed->cb.ts(buffer1, buffer1_len, > buffer2, buffer2_len, > - &dvbdmxfilter->feed->feed.ts); > + &dvbdmxfilter->feed->feed.ts, > + NULL); > else > av7110_p2t_write(buffer1, buffer1_len, > dvbdmxfilter->feed->pid, > diff --git a/drivers/media/pci/ttpci/av7110_av.c > b/drivers/media/pci/ttpci/av7110_av.c index 4daba76ec240..ef1bc17cdc4d > 100644 > --- a/drivers/media/pci/ttpci/av7110_av.c > +++ b/drivers/media/pci/ttpci/av7110_av.c > @@ -99,7 +99,7 @@ int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 > *buf, size_t len) buf[4] = buf[5] = 0; > if (dvbdmxfeed->ts_type & TS_PAYLOAD_ONLY) > return dvbdmxfeed->cb.ts(buf, len, NULL, 0, > - &dvbdmxfeed->feed.ts); > + &dvbdmxfeed->feed.ts, NULL); > else > return dvb_filter_pes2ts(p2t, buf, len, 1); > } > @@ -109,7 +109,7 @@ static int dvb_filter_pes2ts_cb(void *priv, unsigned > char *data) struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) > priv; > > dvbdmxfeed->cb.ts(data, 188, NULL, 0, > - &dvbdmxfeed->feed.ts); > + &dvbdmxfeed->feed.ts, NULL); > return 0; > } > > @@ -814,7 +814,7 @@ static void p_to_t(u8 const *buf, long int length, u16 > pid, u8 *counter, memcpy(obuf + l, buf + c, TS_SIZE - l); > c = length; > } > - feed->cb.ts(obuf, 188, NULL, 0, &feed->feed.ts); > + feed->cb.ts(obuf, 188, NULL, 0, &feed->feed.ts, NULL); > pes_start = 0; > } > } > diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c > b/drivers/media/usb/ttusb-dec/ttusb_dec.c index a8900f5571f7..44ca66cb9b8f > 100644 > --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c > +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c > @@ -428,7 +428,7 @@ static int ttusb_dec_audio_pes2ts_cb(void *priv, > unsigned char *data) struct ttusb_dec *dec = priv; > > dec->audio_filter->feed->cb.ts(data, 188, NULL, 0, > - &dec->audio_filter->feed->feed.ts); > + &dec->audio_filter->feed->feed.ts, NULL); > > return 0; > } > @@ -438,7 +438,7 @@ static int ttusb_dec_video_pes2ts_cb(void *priv, > unsigned char *data) struct ttusb_dec *dec = priv; > > dec->video_filter->feed->cb.ts(data, 188, NULL, 0, > - &dec->video_filter->feed->feed.ts); > + &dec->video_filter->feed->feed.ts, NULL); > > return 0; > } > @@ -490,7 +490,7 @@ static void ttusb_dec_process_pva(struct ttusb_dec *dec, > u8 *pva, int length) > > if (output_pva) { > dec->video_filter->feed->cb.ts(pva, length, NULL, 0, > - &dec->video_filter->feed->feed.ts); > + &dec->video_filter->feed->feed.ts, NULL); > return; > } > > @@ -551,7 +551,7 @@ static void ttusb_dec_process_pva(struct ttusb_dec *dec, > u8 *pva, int length) case 0x02: /* MainAudioStream */ > if (output_pva) { > dec->audio_filter->feed->cb.ts(pva, length, NULL, 0, > - &dec->audio_filter->feed->feed.ts); > + &dec->audio_filter->feed->feed.ts, NULL); > return; > } > > @@ -589,7 +589,7 @@ static void ttusb_dec_process_filter(struct ttusb_dec > *dec, u8 *packet, > > if (filter) > filter->feed->cb.sec(&packet[2], length - 2, NULL, 0, > - &filter->filter); > + &filter->filter, NULL); > } > > static void ttusb_dec_process_packet(struct ttusb_dec *dec)
Em Fri, 23 Feb 2018 19:52:48 +0200 Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu: > Hi Mauro, > > Thank you for the patch. > > On Friday, 23 February 2018 18:43:48 EET Mauro Carvalho Chehab wrote: > > The filter callbaks now have an optional extra argument, > > meant to allow reporting statistics to userspace via mmap. > > > > Set those to NULL, in order to avoid those build errors: > > + drivers/media/pci/ttpci/av7110.c: error: too few arguments to function > > 'dvbdmxfilter->feed->cb.sec': => 325:10 + > > drivers/media/pci/ttpci/av7110.c: error: too few arguments to function > > 'dvbdmxfilter->feed->cb.ts': => 332:11 + > > drivers/media/pci/ttpci/av7110_av.c: error: too few arguments to function > > 'feed->cb.ts': => 817:3 > > > > I think this misses a Fixes: line. Apart from that it looks good to me. > > With the Fixes: line, > > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Thanks for review. While not too late, I actually decided in favor of merging it with the original patch, in order to avoid git bisect issues, as the other patch was applied today on my fixes branch. Regards, Mauro
Hi Mauro, I love your patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.16-rc3 next-20180223] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-ttpci-ttusb-add-extra-parameter-to-filter-callbacks/20180226-144150 base: git://linuxtv.org/media_tree.git master config: x86_64-randconfig-x004-201808 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/media/pci/ttpci/av7110_av.c: In function 'av7110_record_cb': >> drivers/media/pci/ttpci/av7110_av.c:101:10: error: too many arguments to function 'dvbdmxfeed->cb.ts' return dvbdmxfeed->cb.ts(buf, len, NULL, 0, ^~~~~~~~~~ drivers/media/pci/ttpci/av7110_av.c: In function 'dvb_filter_pes2ts_cb': drivers/media/pci/ttpci/av7110_av.c:111:2: error: too many arguments to function 'dvbdmxfeed->cb.ts' dvbdmxfeed->cb.ts(data, 188, NULL, 0, ^~~~~~~~~~ drivers/media/pci/ttpci/av7110_av.c: In function 'p_to_t': >> drivers/media/pci/ttpci/av7110_av.c:817:3: error: too many arguments to function 'feed->cb.ts' feed->cb.ts(obuf, 188, NULL, 0, &feed->feed.ts, NULL); ^~~~ -- drivers/media/pci/ttpci/av7110.c: In function 'DvbDmxFilterCallback': >> drivers/media/pci/ttpci/av7110.c:325:10: error: too many arguments to function 'dvbdmxfilter->feed->cb.sec' return dvbdmxfilter->feed->cb.sec(buffer1, buffer1_len, ^~~~~~~~~~~~ >> drivers/media/pci/ttpci/av7110.c:332:11: error: too many arguments to function 'dvbdmxfilter->feed->cb.ts' return dvbdmxfilter->feed->cb.ts(buffer1, buffer1_len, ^~~~~~~~~~~~ vim +101 drivers/media/pci/ttpci/av7110_av.c ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 90 ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 91 ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 92 int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len) ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 93 { ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 94 struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) p2t->priv; ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 95 ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 96 if (!(dvbdmxfeed->ts_type & TS_PACKET)) ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 97 return 0; ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 98 if (buf[3] == 0xe0) // video PES do not have a length in TS ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 99 buf[4] = buf[5] = 0; ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 100 if (dvbdmxfeed->ts_type & TS_PAYLOAD_ONLY) ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 @101 return dvbdmxfeed->cb.ts(buf, len, NULL, 0, daaf9302 drivers/media/pci/ttpci/av7110_av.c Mauro Carvalho Chehab 2018-02-23 102 &dvbdmxfeed->feed.ts, NULL); ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 103 else ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 104 return dvb_filter_pes2ts(p2t, buf, len, 1); ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 105 } ^1da177e drivers/media/dvb/ttpci/av7110_av.c Linus Torvalds 2005-04-16 106 :::::: The code at line 101 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org> :::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Mauro, I love your patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.16-rc3 next-20180223] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-ttpci-ttusb-add-extra-parameter-to-filter-callbacks/20180226-144150 base: git://linuxtv.org/media_tree.git master config: i386-randconfig-x019-201808 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/media/usb/ttusb-dec/ttusb_dec.c: In function 'ttusb_dec_audio_pes2ts_cb': >> drivers/media/usb/ttusb-dec/ttusb_dec.c:430:2: error: too many arguments to function 'dec->audio_filter->feed->cb.ts' dec->audio_filter->feed->cb.ts(data, 188, NULL, 0, ^~~ drivers/media/usb/ttusb-dec/ttusb_dec.c: In function 'ttusb_dec_video_pes2ts_cb': >> drivers/media/usb/ttusb-dec/ttusb_dec.c:440:2: error: too many arguments to function 'dec->video_filter->feed->cb.ts' dec->video_filter->feed->cb.ts(data, 188, NULL, 0, ^~~ drivers/media/usb/ttusb-dec/ttusb_dec.c: In function 'ttusb_dec_process_pva': drivers/media/usb/ttusb-dec/ttusb_dec.c:492:4: error: too many arguments to function 'dec->video_filter->feed->cb.ts' dec->video_filter->feed->cb.ts(pva, length, NULL, 0, ^~~ drivers/media/usb/ttusb-dec/ttusb_dec.c:553:4: error: too many arguments to function 'dec->audio_filter->feed->cb.ts' dec->audio_filter->feed->cb.ts(pva, length, NULL, 0, ^~~ drivers/media/usb/ttusb-dec/ttusb_dec.c: In function 'ttusb_dec_process_filter': >> drivers/media/usb/ttusb-dec/ttusb_dec.c:591:3: error: too many arguments to function 'filter->feed->cb.sec' filter->feed->cb.sec(&packet[2], length - 2, NULL, 0, ^~~~~~ vim +430 drivers/media/usb/ttusb-dec/ttusb_dec.c ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 425 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 426 static int ttusb_dec_audio_pes2ts_cb(void *priv, unsigned char *data) ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 427 { f961e71a0 drivers/media/dvb/ttusb-dec/ttusb_dec.c Alex Woods 2006-01-09 428 struct ttusb_dec *dec = priv; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 429 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 @430 dec->audio_filter->feed->cb.ts(data, 188, NULL, 0, daaf93025 drivers/media/usb/ttusb-dec/ttusb_dec.c Mauro Carvalho Chehab 2018-02-23 431 &dec->audio_filter->feed->feed.ts, NULL); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 432 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 433 return 0; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 434 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 435 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 436 static int ttusb_dec_video_pes2ts_cb(void *priv, unsigned char *data) ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 437 { f961e71a0 drivers/media/dvb/ttusb-dec/ttusb_dec.c Alex Woods 2006-01-09 438 struct ttusb_dec *dec = priv; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 439 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 @440 dec->video_filter->feed->cb.ts(data, 188, NULL, 0, daaf93025 drivers/media/usb/ttusb-dec/ttusb_dec.c Mauro Carvalho Chehab 2018-02-23 441 &dec->video_filter->feed->feed.ts, NULL); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 442 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 443 return 0; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 444 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 445 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 446 static void ttusb_dec_set_pids(struct ttusb_dec *dec) ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 447 { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 448 u8 b[] = { 0x00, 0x00, 0x00, 0x00, ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 449 0x00, 0x00, 0xff, 0xff, ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 450 0xff, 0xff, 0xff, 0xff }; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 451 d4f979a9e drivers/media/dvb/ttusb-dec/ttusb_dec.c Al Viro 2008-05-21 452 __be16 pcr = htons(dec->pid[DMX_PES_PCR]); d4f979a9e drivers/media/dvb/ttusb-dec/ttusb_dec.c Al Viro 2008-05-21 453 __be16 audio = htons(dec->pid[DMX_PES_AUDIO]); d4f979a9e drivers/media/dvb/ttusb-dec/ttusb_dec.c Al Viro 2008-05-21 454 __be16 video = htons(dec->pid[DMX_PES_VIDEO]); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 455 e9815ceea drivers/media/dvb/ttusb-dec/ttusb_dec.c Harvey Harrison 2008-04-08 456 dprintk("%s\n", __func__); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 457 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 458 memcpy(&b[0], &pcr, 2); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 459 memcpy(&b[2], &audio, 2); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 460 memcpy(&b[4], &video, 2); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 461 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 462 ttusb_dec_send_command(dec, 0x50, sizeof(b), b, NULL, NULL); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 463 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 464 dvb_filter_pes2ts_init(&dec->a_pes2ts, dec->pid[DMX_PES_AUDIO], ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 465 ttusb_dec_audio_pes2ts_cb, dec); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 466 dvb_filter_pes2ts_init(&dec->v_pes2ts, dec->pid[DMX_PES_VIDEO], ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 467 ttusb_dec_video_pes2ts_cb, dec); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 468 dec->v_pes_length = 0; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 469 dec->v_pes_postbytes = 0; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 470 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 471 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 472 static void ttusb_dec_process_pva(struct ttusb_dec *dec, u8 *pva, int length) ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 473 { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 474 if (length < 8) { e9815ceea drivers/media/dvb/ttusb-dec/ttusb_dec.c Harvey Harrison 2008-04-08 475 printk("%s: packet too short - discarding\n", __func__); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 476 return; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 477 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 478 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 479 if (length > 8 + MAX_PVA_LENGTH) { e9815ceea drivers/media/dvb/ttusb-dec/ttusb_dec.c Harvey Harrison 2008-04-08 480 printk("%s: packet too long - discarding\n", __func__); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 481 return; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 482 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 483 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 484 switch (pva[2]) { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 485 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 486 case 0x01: { /* VideoStream */ ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 487 int prebytes = pva[5] & 0x03; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 488 int postbytes = (pva[5] & 0x0c) >> 2; d4f979a9e drivers/media/dvb/ttusb-dec/ttusb_dec.c Al Viro 2008-05-21 489 __be16 v_pes_payload_length; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 490 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 491 if (output_pva) { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 @492 dec->video_filter->feed->cb.ts(pva, length, NULL, 0, daaf93025 drivers/media/usb/ttusb-dec/ttusb_dec.c Mauro Carvalho Chehab 2018-02-23 493 &dec->video_filter->feed->feed.ts, NULL); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 494 return; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 495 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 496 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 497 if (dec->v_pes_postbytes > 0 && ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 498 dec->v_pes_postbytes == prebytes) { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 499 memcpy(&dec->v_pes[dec->v_pes_length], ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 500 &pva[12], prebytes); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 501 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 502 dvb_filter_pes2ts(&dec->v_pes2ts, dec->v_pes, ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 503 dec->v_pes_length + prebytes, 1); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 504 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 505 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 506 if (pva[5] & 0x10) { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 507 dec->v_pes[7] = 0x80; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 508 dec->v_pes[8] = 0x05; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 509 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 510 dec->v_pes[9] = 0x21 | ((pva[8] & 0xc0) >> 5); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 511 dec->v_pes[10] = ((pva[8] & 0x3f) << 2) | ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 512 ((pva[9] & 0xc0) >> 6); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 513 dec->v_pes[11] = 0x01 | ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 514 ((pva[9] & 0x3f) << 2) | ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 515 ((pva[10] & 0x80) >> 6); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 516 dec->v_pes[12] = ((pva[10] & 0x7f) << 1) | ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 517 ((pva[11] & 0xc0) >> 7); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 518 dec->v_pes[13] = 0x01 | ((pva[11] & 0x7f) << 1); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 519 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 520 memcpy(&dec->v_pes[14], &pva[12 + prebytes], ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 521 length - 12 - prebytes); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 522 dec->v_pes_length = 14 + length - 12 - prebytes; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 523 } else { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 524 dec->v_pes[7] = 0x00; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 525 dec->v_pes[8] = 0x00; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 526 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 527 memcpy(&dec->v_pes[9], &pva[8], length - 8); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 528 dec->v_pes_length = 9 + length - 8; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 529 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 530 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 531 dec->v_pes_postbytes = postbytes; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 532 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 533 if (dec->v_pes[9 + dec->v_pes[8]] == 0x00 && ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 534 dec->v_pes[10 + dec->v_pes[8]] == 0x00 && ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 535 dec->v_pes[11 + dec->v_pes[8]] == 0x01) ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 536 dec->v_pes[6] = 0x84; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 537 else ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 538 dec->v_pes[6] = 0x80; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 539 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 540 v_pes_payload_length = htons(dec->v_pes_length - 6 + ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 541 postbytes); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 542 memcpy(&dec->v_pes[4], &v_pes_payload_length, 2); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 543 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 544 if (postbytes == 0) ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 545 dvb_filter_pes2ts(&dec->v_pes2ts, dec->v_pes, ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 546 dec->v_pes_length, 1); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 547 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 548 break; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 549 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 550 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 551 case 0x02: /* MainAudioStream */ ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 552 if (output_pva) { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 553 dec->audio_filter->feed->cb.ts(pva, length, NULL, 0, daaf93025 drivers/media/usb/ttusb-dec/ttusb_dec.c Mauro Carvalho Chehab 2018-02-23 554 &dec->audio_filter->feed->feed.ts, NULL); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 555 return; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 556 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 557 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 558 dvb_filter_pes2ts(&dec->a_pes2ts, &pva[8], length - 8, ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 559 pva[5] & 0x10); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 560 break; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 561 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 562 default: e9815ceea drivers/media/dvb/ttusb-dec/ttusb_dec.c Harvey Harrison 2008-04-08 563 printk("%s: unknown PVA type: %02x.\n", __func__, ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 564 pva[2]); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 565 break; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 566 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 567 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 568 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 569 static void ttusb_dec_process_filter(struct ttusb_dec *dec, u8 *packet, ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 570 int length) ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 571 { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 572 struct list_head *item; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 573 struct filter_info *finfo; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 574 struct dvb_demux_filter *filter = NULL; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 575 unsigned long flags; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 576 u8 sid; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 577 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 578 sid = packet[1]; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 579 spin_lock_irqsave(&dec->filter_info_list_lock, flags); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 580 for (item = dec->filter_info_list.next; item != &dec->filter_info_list; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 581 item = item->next) { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 582 finfo = list_entry(item, struct filter_info, filter_info_list); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 583 if (finfo->stream_id == sid) { ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 584 filter = finfo->filter; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 585 break; ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 586 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 587 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 588 spin_unlock_irqrestore(&dec->filter_info_list_lock, flags); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 589 ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 590 if (filter) ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 @591 filter->feed->cb.sec(&packet[2], length - 2, NULL, 0, daaf93025 drivers/media/usb/ttusb-dec/ttusb_dec.c Mauro Carvalho Chehab 2018-02-23 592 &filter->filter, NULL); ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 593 } ^1da177e4 drivers/media/dvb/ttusb-dec/ttusb_dec.c Linus Torvalds 2005-04-16 594 :::::: The code at line 430 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org> :::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c index dc8e577b2f74..d6816effb878 100644 --- a/drivers/media/pci/ttpci/av7110.c +++ b/drivers/media/pci/ttpci/av7110.c @@ -324,14 +324,15 @@ static int DvbDmxFilterCallback(u8 *buffer1, size_t buffer1_len, } return dvbdmxfilter->feed->cb.sec(buffer1, buffer1_len, buffer2, buffer2_len, - &dvbdmxfilter->filter); + &dvbdmxfilter->filter, NULL); case DMX_TYPE_TS: if (!(dvbdmxfilter->feed->ts_type & TS_PACKET)) return 0; if (dvbdmxfilter->feed->ts_type & TS_PAYLOAD_ONLY) return dvbdmxfilter->feed->cb.ts(buffer1, buffer1_len, buffer2, buffer2_len, - &dvbdmxfilter->feed->feed.ts); + &dvbdmxfilter->feed->feed.ts, + NULL); else av7110_p2t_write(buffer1, buffer1_len, dvbdmxfilter->feed->pid, diff --git a/drivers/media/pci/ttpci/av7110_av.c b/drivers/media/pci/ttpci/av7110_av.c index 4daba76ec240..ef1bc17cdc4d 100644 --- a/drivers/media/pci/ttpci/av7110_av.c +++ b/drivers/media/pci/ttpci/av7110_av.c @@ -99,7 +99,7 @@ int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len) buf[4] = buf[5] = 0; if (dvbdmxfeed->ts_type & TS_PAYLOAD_ONLY) return dvbdmxfeed->cb.ts(buf, len, NULL, 0, - &dvbdmxfeed->feed.ts); + &dvbdmxfeed->feed.ts, NULL); else return dvb_filter_pes2ts(p2t, buf, len, 1); } @@ -109,7 +109,7 @@ static int dvb_filter_pes2ts_cb(void *priv, unsigned char *data) struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) priv; dvbdmxfeed->cb.ts(data, 188, NULL, 0, - &dvbdmxfeed->feed.ts); + &dvbdmxfeed->feed.ts, NULL); return 0; } @@ -814,7 +814,7 @@ static void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter, memcpy(obuf + l, buf + c, TS_SIZE - l); c = length; } - feed->cb.ts(obuf, 188, NULL, 0, &feed->feed.ts); + feed->cb.ts(obuf, 188, NULL, 0, &feed->feed.ts, NULL); pes_start = 0; } } diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index a8900f5571f7..44ca66cb9b8f 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c @@ -428,7 +428,7 @@ static int ttusb_dec_audio_pes2ts_cb(void *priv, unsigned char *data) struct ttusb_dec *dec = priv; dec->audio_filter->feed->cb.ts(data, 188, NULL, 0, - &dec->audio_filter->feed->feed.ts); + &dec->audio_filter->feed->feed.ts, NULL); return 0; } @@ -438,7 +438,7 @@ static int ttusb_dec_video_pes2ts_cb(void *priv, unsigned char *data) struct ttusb_dec *dec = priv; dec->video_filter->feed->cb.ts(data, 188, NULL, 0, - &dec->video_filter->feed->feed.ts); + &dec->video_filter->feed->feed.ts, NULL); return 0; } @@ -490,7 +490,7 @@ static void ttusb_dec_process_pva(struct ttusb_dec *dec, u8 *pva, int length) if (output_pva) { dec->video_filter->feed->cb.ts(pva, length, NULL, 0, - &dec->video_filter->feed->feed.ts); + &dec->video_filter->feed->feed.ts, NULL); return; } @@ -551,7 +551,7 @@ static void ttusb_dec_process_pva(struct ttusb_dec *dec, u8 *pva, int length) case 0x02: /* MainAudioStream */ if (output_pva) { dec->audio_filter->feed->cb.ts(pva, length, NULL, 0, - &dec->audio_filter->feed->feed.ts); + &dec->audio_filter->feed->feed.ts, NULL); return; } @@ -589,7 +589,7 @@ static void ttusb_dec_process_filter(struct ttusb_dec *dec, u8 *packet, if (filter) filter->feed->cb.sec(&packet[2], length - 2, NULL, 0, - &filter->filter); + &filter->filter, NULL); } static void ttusb_dec_process_packet(struct ttusb_dec *dec)
The filter callbaks now have an optional extra argument, meant to allow reporting statistics to userspace via mmap. Set those to NULL, in order to avoid those build errors: + drivers/media/pci/ttpci/av7110.c: error: too few arguments to function 'dvbdmxfilter->feed->cb.sec': => 325:10 + drivers/media/pci/ttpci/av7110.c: error: too few arguments to function 'dvbdmxfilter->feed->cb.ts': => 332:11 + drivers/media/pci/ttpci/av7110_av.c: error: too few arguments to function 'feed->cb.ts': => 817:3 Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> --- drivers/media/pci/ttpci/av7110.c | 5 +++-- drivers/media/pci/ttpci/av7110_av.c | 6 +++--- drivers/media/usb/ttusb-dec/ttusb_dec.c | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-)