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. > + /* 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? -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- 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