Re: [linuxtv-commits] [hg:v4l-dvb] DVB: negative internal->sub_range won't get noticed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mauro,

Please revert this patch as it is incorrect. A correct version is
available at http://jusst.de/hg/v4l-dvb which is undergoing tests.
http://jusst.de/hg/v4l-dvb/rev/368dc6078295

Why did you have to hastily apply this patch, especially when i
mentioned this earlier ?

Regards,
Manu


Patch from Roel Kluin wrote:
> The patch number 10393 was added via Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> to http://linuxtv.org/hg/v4l-dvb master development tree.
> 
> Kernel patches in this development tree may be modified to be backward
> compatible with older kernels. Compatibility modifications will be
> removed before inclusion into the mainstream Kernel
> 
> If anyone has any objections, please let us know by sending a message to:
> 	Linux Media Mailing List <linux-media@xxxxxxxxxxxxxxx>
> 
> ------
> 
> From: Roel Kluin  <roel.kluin@xxxxxxxxx>
> DVB: negative internal->sub_range won't get noticed
> 
> 
> internal->sub_range is unsigned, a negative won't get noticed.
> 
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> 
> 
> ---
> 
>  linux/drivers/media/dvb/frontends/stb0899_algo.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff -r 6ca70bcb4972 -r d3bfc53d0b67 linux/drivers/media/dvb/frontends/stb0899_algo.c
> --- a/linux/drivers/media/dvb/frontends/stb0899_algo.c	Wed Jan 14 16:17:59 2009 +0000
> +++ b/linux/drivers/media/dvb/frontends/stb0899_algo.c	Sun Jan 18 23:31:26 2009 +0000
> @@ -467,12 +467,13 @@ static void next_sub_range(struct stb089
>  
>  	if (internal->sub_dir > 0) {
>  		old_sub_range = internal->sub_range;
> -		internal->sub_range = MIN((internal->srch_range / 2) -
> +		if (internal->tuner_offst + internal->sub_range / 2 >=
> +				internal->srch_range / 2)
> +			internal->sub_range = 0;
> +		else
> +			internal->sub_range = MIN((internal->srch_range / 2) -
>  					  (internal->tuner_offst + internal->sub_range / 2),
>  					   internal->sub_range);
> -
> -		if (internal->sub_range < 0)
> -			internal->sub_range = 0;
>  
>  		internal->tuner_offst += (old_sub_range + internal->sub_range) / 2;
>  	}
> 
> 
> ---
> 
> Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/d3bfc53d0b678da495fd2b559e154c5e95584079
> 
> _______________________________________________
> linuxtv-commits mailing list
> linuxtv-commits@xxxxxxxxxxx
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
> 

--
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

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux