comparison warning fixes
Subsystems (3)
PATCH 1/1 comparison warning fixes
Various "comparison always true/false" fixes. The coda one is in 2.6 iirc, AM53C974.c and pcmcia ones may need review.
fs/coda/dir.c +1 -2
@@ -589,8 +589,7 @@break ; }/* validate whether the directory file actually makes sense */ -if (vdir->d_reclen < vdir_size + vdir->d_namlen || - vdir->d_namlen >CODA_MAXNAMLEN ) { +if (vdir->d_reclen < vdir_size + vdir->d_namlen) {printk ("coda_venus_readdir: Invalid dir: %ld\n" , filp->f_dentry->d_inode->i_ino); ret = -EBADF ;
drivers/scsi/AM53C974.c +1 -1
@@ -1612,7 +1612,7 @@for (i =0 ; i <sizeof (hostdata->last_message); i++) hostdata->last_message[i] = hostdata->msgout[i];if ((hostdata->msgout[0 ] ==0 ) ||INSIDE (hostdata->msgout[0 ],0x02 ,0x1F ) || -INSIDE (hostdata->msgout[0 ],0x80 ,0xFF )) + (hostdata->msgout[0 ] >=0x80 )) len =1 ;else {if (hostdata->msgout[0 ] ==EXTENDED_MESSAGE ) {
drivers/pcmcia/i82092.c +1 -1
@@ -788,7 +788,7 @@leave ("i82092aa_set_io_map with invalid map" );return -EINVAL ; } -if ((io->start >0xffff ) || (io->stop >0xffff ) || (io->stop < io->start)){ +if (io->stop < io->start){leave ("i82092aa_set_io_map with invalid io" );return -EINVAL ; }
drivers/pcmcia/i82365.c +1 -2
@@ -1225,8 +1225,7 @@"%#4.4x-%#4.4x)\n" , sock, io->map, io->flags, io->speed, io->start, io->stop); map = io->map; -if ((map >1 ) || (io->start >0xffff ) || (io->stop >0xffff ) || - (io->stop < io->start))return -EINVAL ; +if ((map >1 ) || (io->stop < io->start))return -EINVAL ;/* Turn off the window before changing anything */ if (i365_get (sock,I365_ADDRWIN ) &I365_ENA_IO (map))i365_bclr (sock,I365_ADDRWIN ,I365_ENA_IO (map));
drivers/pcmcia/tcic.c +1 -2
@@ -844,8 +844,7 @@DEBUG (1 ,"tcic: SetIOMap(%d, %d, %#2.2x, %d ns, " "%#4.4x-%#4.4x)\n" , lsock, io->map, io->flags, io->speed, io->start, io->stop); -if ((io->map >1 ) || (io->start >0xffff ) || (io->stop >0xffff ) || - (io->stop < io->start))return -EINVAL ; +if ((io->map >1 ) || (io->stop < io->start))return -EINVAL ;tcic_setw (TCIC_ADDR +2 ,TCIC_ADR2_INDREG | (psock <<TCIC_SS_SHFT )); addr =TCIC_IWIN (psock, io->map);