Lines Matching refs:idx

421 	int		idx;
475 for (idx = 0; idx < count; idx++) {
476 drctl_req[idx].res_mem_addr = req_mblks[idx].addr;
477 drctl_req[idx].res_mem_size = req_mblks[idx].size;
513 for (idx = 0; idx < count; idx++) {
520 if (res[idx].result != DR_MEM_RES_OK) {
521 drctl_req[idx].status = DRCTL_STATUS_CONFIG_FAILURE;
532 result = (*dr_fn)(&req_mblks[idx], &status);
535 res[idx].result = result;
536 res[idx].status = status;
537 res[idx].addr = req_mblks[idx].addr; /* for partial case */
538 res[idx].size = req_mblks[idx].size; /* for partial case */
539 res[idx].string = dr_mem_get_errstr(result, subresult);
542 drctl_req[idx].status = (result != DR_MEM_RES_OK) ?
546 __func__, req_mblks[idx].addr, req_mblks[idx].size,
547 drctl_req[idx].status, result,
548 (res[idx].string) ? res[idx].string : "");
582 int idx;
593 for (idx = 0; idx < nrsrc; idx++) {
594 res[idx].addr = rsrc[idx].res_mem_addr;
595 res[idx].size = rsrc[idx].res_mem_size;
596 res[idx].result = DR_MEM_RES_OK;
598 if (rsrc[idx].status == DRCTL_STATUS_ALLOW)
604 res[idx].result = DR_MEM_RES_BLOCKED;
605 res[idx].status = (req->msg_type == DR_MEM_CONFIGURE) ?
614 if (rsrc[idx].offset != NULL) {
615 err_str = (char *)rsrc + rsrc[idx].offset;
618 res[idx].string = kmem_alloc(err_len, KM_SLEEP);
619 bcopy(err_str, res[idx].string, err_len);
629 int idx;
632 for (idx = 0; idx < nres; idx++) {
634 if (res[idx].string) {
635 str_len = strlen(res[idx].string) + 1;
636 kmem_free(res[idx].string, str_len);
652 int idx;
673 for (idx = 0; idx < nstat; idx++) {
674 if (res[idx].string != NULL) {
675 resp_len += strlen(res[idx].string) + 1;
698 for (idx = 0; idx < nstat; idx++) {
699 resp_stat[idx].addr = res[idx].addr;
700 resp_stat[idx].size = res[idx].size;
701 resp_stat[idx].result = res[idx].result;
702 resp_stat[idx].status = res[idx].status;
704 if (res[idx].string != NULL) {
706 str_len = strlen(res[idx].string) + 1;
707 bcopy(res[idx].string, curr_str, str_len);
708 resp_stat[idx].string_off = curr_off;
754 int idx;
799 for (idx = 0, ml = phys_copy; ml; ml = ml->ml_next, idx++) {
802 dr_mem_query(&mb, &stat[idx]);
805 for (idx = 0; idx < req->msg_arg; idx++)
806 dr_mem_query(&req_mblks[idx], &stat[idx]);
1048 int idx;
1074 for (idx = 0; idx < nnodes; idx++) {
1076 if (md_get_prop_val(mdp, listp[idx], "base", &base_prop)) {
1078 idx);
1082 if (md_get_prop_val(mdp, listp[idx], "size", &size_prop)) {
1084 idx);
1093 result = listp[idx];