[lkml]   [2011]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] drivers: video: Remove useless checks

On Wed, May 25, 2011 at 1:47 PM, Tim Gardner <> wrote:
> On 05/19/2011 12:27 PM, Maxin B John wrote:
>> Comparing unsigned less than zero will never be true.
>> Removing similar checks from 'fbmem.c' and 'fbcmap.c'.
> Looks right to me, though there are other places that suffer from the same
> issue. See fb_set_cmap() and its use of 'int start' and cmap->start.

Thank you very much for reviewing the patch. As per your suggestion, I
have checked
the scenario is fb_set_cmap() and the use of 'int start' and 'cmap->start'.

IMHO, that scenario doesn't fall under the comparison of unsigned int
< 0. That scenario
looks similar to the below given code to me:
#include <stdio.h>
main ()
unsigned int u_int = -1;
int s_int = 0;
s_int = u_int;
if (s_int < 0)
printf ("s_int is less than 0\n");
return 0;
Please let me know your comments.

Best Regards,

 \ /
  Last update: 2011-05-26 11:33    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean