• Home
  • Raw
  • Download

Lines Matching refs:arr

33 	struct sdb_array *arr, *sub;  in __fmc_scan_sdb_tree()  local
48 arr = kzalloc(sizeof(*arr), GFP_KERNEL); in __fmc_scan_sdb_tree()
49 if (!arr) in __fmc_scan_sdb_tree()
51 arr->record = kzalloc(sizeof(arr->record[0]) * n, GFP_KERNEL); in __fmc_scan_sdb_tree()
52 arr->subtree = kzalloc(sizeof(arr->subtree[0]) * n, GFP_KERNEL); in __fmc_scan_sdb_tree()
53 if (!arr->record || !arr->subtree) { in __fmc_scan_sdb_tree()
54 kfree(arr->record); in __fmc_scan_sdb_tree()
55 kfree(arr->subtree); in __fmc_scan_sdb_tree()
56 kfree(arr); in __fmc_scan_sdb_tree()
60 arr->len = n; in __fmc_scan_sdb_tree()
61 arr->level = level; in __fmc_scan_sdb_tree()
62 arr->fmc = fmc; in __fmc_scan_sdb_tree()
66 for (j = 0; j < sizeof(arr->record[0]); j += 4) { in __fmc_scan_sdb_tree()
67 *(uint32_t *)((void *)(arr->record + i) + j) = in __fmc_scan_sdb_tree()
70 r = &arr->record[i]; in __fmc_scan_sdb_tree()
71 arr->subtree[i] = ERR_PTR(-ENODEV); in __fmc_scan_sdb_tree()
81 arr->subtree[i] = sub; /* may be error */ in __fmc_scan_sdb_tree()
84 sub->parent = arr; in __fmc_scan_sdb_tree()
88 return arr; in __fmc_scan_sdb_tree()
104 static void __fmc_sdb_free(struct sdb_array *arr) in __fmc_sdb_free() argument
108 if (!arr) in __fmc_sdb_free()
110 n = arr->len; in __fmc_sdb_free()
112 if (IS_ERR(arr->subtree[i])) in __fmc_sdb_free()
114 __fmc_sdb_free(arr->subtree[i]); in __fmc_sdb_free()
116 kfree(arr->record); in __fmc_sdb_free()
117 kfree(arr->subtree); in __fmc_sdb_free()
118 kfree(arr); in __fmc_sdb_free()
169 const struct sdb_array *arr) in __fmc_show_sdb_tree() argument
171 unsigned long base = arr->baseaddr; in __fmc_show_sdb_tree()
172 int i, j, n = arr->len, level = arr->level; in __fmc_show_sdb_tree()
179 r = &arr->record[i]; in __fmc_show_sdb_tree()
208 if (IS_ERR(arr->subtree[i])) { in __fmc_show_sdb_tree()
210 PTR_ERR(arr->subtree[i])); in __fmc_show_sdb_tree()
213 __fmc_show_sdb_tree(fmc, arr->subtree[i]); in __fmc_show_sdb_tree()