Bug #3020 ยป 0001-Avoid-checking-negativeness-of-unsigned-variable.patch
sys/dev/disk/nvme/nvme_admin.c | ||
---|---|---|
{
|
||
nvme_request_t *req;
|
||
nvme_ident_ns_list_t *rp;
|
||
int status;
|
||
int status, not_enough_room = 0;
|
||
uint32_t i;
|
||
uint32_t j;
|
||
... | ... | |
if (j == NVME_MAX_NAMESPACES) {
|
||
j = i;
|
||
if (sc->nscary[j] != NULL) {
|
||
for (j = NVME_MAX_NAMESPACES - 1; j >= 0; --j) {
|
||
for (j = NVME_MAX_NAMESPACES - 1; j > 0; --j) {
|
||
if (sc->nscary[j] == NULL)
|
||
break;
|
||
}
|
||
/* At this point, either room was found, or j == 0. */
|
||
if (j == 0 && sc->nscary[j] != NULL)
|
||
not_enough_room = 1;
|
||
}
|
||
}
|
||
if (j < 0) {
|
||
if (not_enough_room) {
|
||
not_enough_room = 0;
|
||
device_printf(sc->dev, "not enough room in nscary for "
|
||
"namespace %08x\n", rp->nsids[i]);
|
||
nvme_put_request(req);
|