Hello Mauro, Please pull fixed patch from: http://udev.netup.ru/cgi-bin/hgwebdir.cgi/v4l-dvb-aospan/rev/1d956b581b02 I have fixed pointed issues. Strange that ./v4l/scripts/checkpatch.pl don't show me this errors before. Now checkpatch shows 0 errors/warnings. P.S. In some stripped environments running additiona user-level programs is difficult. In this case this debug possibility very useful. On Saturday 31 October 2009 13:45:17 Mauro Carvalho Chehab wrote: > Em Sun, 11 Oct 2009 21:09:24 +0400 > > "aospan@xxxxxxxx" <aospan@xxxxxxxx> escreveu: > > Hello Mauro, > > > > On Friday 09 October 2009 16:01:58 Mauro Carvalho Chehab wrote: > > > Wouldn't be be better to just use dvbtraffic userspace apps for it? > > > > this feature very usable for debugging. Please add it. > > > > > Also, > > > your patch has some coding style issues. > > > > please point to this issues. I will fix. > > > > > > > > # HG changeset patch > > # User Abylay Ospan <aospan@xxxxxxxx> > > # Date 1253802277 -14400 > > # Node ID 711d9630876ffd81196c1032ce77825d5b433cc8 > > # Parent a798c751f06d60335fbbad9fdca8c41f1298d228 > > TS speed check. Logging transport stream speed in Kbits per second > > > > Signed-off-by: Abylay Ospan <aospan@xxxxxxxx> > > > > --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c Wed Sep 23 10:21:53 > > 2009 +0200 +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c Thu Sep 24 > > 18:24:37 2009 +0400 @@ -42,6 +42,11 @@ > > module_param(dvb_demux_tscheck, int, 0644); > > MODULE_PARM_DESC(dvb_demux_tscheck, > > "enable transport stream continuity and TEI check"); > > + > > +static int dvb_demux_speedcheck; > > +module_param(dvb_demux_speedcheck, int, 0644); > > +MODULE_PARM_DESC(dvb_demux_speedcheck, > > + "enable transport stream speed check"); > > > > #define dprintk_tscheck(x...) do { \ > > if (dvb_demux_tscheck && printk_ratelimit()) \ > > @@ -385,6 +390,37 @@ > > struct dvb_demux_feed *feed; > > u16 pid = ts_pid(buf); > > int dvr_done = 0; > > + struct timespec cur_time, delta_time; > > + u64 speed_bytes, speed_timedelta; > > + > > + if (dvb_demux_speedcheck) { > > + demux->speed_pkts_cnt++; > > + > > + /* show speed every SPEED_PKTS_INTERVAL packets */ > > + if (!(demux->speed_pkts_cnt%SPEED_PKTS_INTERVAL)) { > > You need to add spaces between each argument of the % operator > > > + cur_time = current_kernel_time(); > > + > > + if (demux->speed_last_time.tv_sec != 0 && > > + demux->speed_last_time.tv_nsec != 0) { > > + delta_time = timespec_sub(cur_time, > > + demux->speed_last_time); > > + speed_bytes = (u64)demux->speed_pkts_cnt*188*8; > > You need to add spaces between each argument of the * operator > > > + /* convert to 1024 basis */ > > + speed_bytes = 1000*div64_u64(speed_bytes, > > + 1024); > > You need to add spaces between each argument of the * operator > > > + speed_timedelta = > > + (u64)timespec_to_ns(&delta_time); > > + speed_timedelta = div64_u64(speed_timedelta, > > + 1000000); /* nsec -> usec */ > > + printk(KERN_INFO "TS speed %llu Kbits/sec \n", > > + div64_u64(speed_bytes, > > + speed_timedelta)); > > + }; > > + > > + demux->speed_last_time = cur_time; > > + demux->speed_pkts_cnt = 0; > > + }; > > + }; > > > > if (dvb_demux_tscheck) { > > if (!demux->cnt_storage) > > --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.h Wed Sep 23 10:21:53 > > 2009 +0200 +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.h Thu Sep 24 > > 18:24:37 2009 +0400 @@ -44,6 +44,7 @@ > > #define DVB_DEMUX_MASK_MAX 18 > > > > #define MAX_PID 0x1fff > > +#define SPEED_PKTS_INTERVAL 50000 > > > > struct dvb_demux_filter { > > struct dmx_section_filter filter; > > @@ -132,6 +133,9 @@ > > spinlock_t lock; > > > > uint8_t *cnt_storage; /* for TS continuity check */ > > + > > + struct timespec speed_last_time; /* for TS speed check */ > > + uint32_t speed_pkts_cnt; /* for TS speed check */ > > }; > > > > int dvb_dmx_init(struct dvb_demux *dvbdemux); > > Cheers, > Mauro > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html