On Wed, 22 Apr 2009, Matthew Wilcox wrote: > On Wed, Apr 22, 2009 at 10:42:36AM -0400, Alan Stern wrote: > > + /* If the capacity is unknown, we can't test anything */ > > + if (sdkp->capacity <= 0) > > + return rc; > > sector_t is unsigned, so this should be just == 0. It doesn't make any difference. > > + /* One test should be enough (unless it's inconclusive) */ > > + sdp->check_capacity = 0; > > + > > + /* If the device doesn't use READ(10), assume we're okay */ > > + if (!sdp->use_10_for_rw) > > + return rc; > > + > > + /* If the capacity is too big for READ(10), assume we're okay */ > > + if (sdkp->capacity > 0xffffffff) > > + return rc; > > Won't gcc warn about this when sector_t is 32 bits? My version of gcc doesn't emit a warning (and I don't have CONFIG_LBD defined). Maybe other versions will. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html