Lines Matching defs:ws

98 static void free_ws(struct wspace *ws)
100 if (!ws)
103 kfree(ws->errlocs);
104 kfree(ws->c);
105 kfree(ws);
111 struct wspace *ws;
114 ws = kzalloc(sizeof(*ws), GFP_KERNEL);
115 if (!ws)
118 ws->c = kmalloc_array(2 * (nn + nroots),
120 if (!ws->c)
123 ws->r = ws->c + nn;
124 ws->s = ws->r + nn;
125 ws->corr = ws->s + nroots;
127 ws->errlocs = kmalloc_array(nn + nroots, sizeof(int), GFP_KERNEL);
128 if (!ws->errlocs)
131 ws->derrlocs = ws->errlocs + nn;
132 return ws;
135 free_ws(ws);
151 static int get_rcw_we(struct rs_control *rs, struct wspace *ws,
155 int *derrlocs = ws->derrlocs;
156 int *errlocs = ws->errlocs;
159 uint16_t *c = ws->c;
160 uint16_t *r = ws->r;
262 struct wspace *ws, int method)
265 int *derrlocs = ws->derrlocs;
266 int *errlocs = ws->errlocs;
267 uint16_t *corr = ws->corr;
268 uint16_t *c = ws->c;
269 uint16_t *r = ws->r;
270 uint16_t *s = ws->s;
275 nerrs = get_rcw_we(rs, ws, len, errs, eras);
313 static int ex_rs_helper(struct rs_control *rs, struct wspace *ws,
331 test_uc(rs, len, errs, eras, trials, &stat, ws, method);
349 static int exercise_rs(struct rs_control *rs, struct wspace *ws,
360 retval |= ex_rs_helper(rs, ws, len, trials, i);
368 struct wspace *ws)
372 int *derrlocs = ws->derrlocs;
373 uint16_t *corr = ws->corr;
374 uint16_t *r = ws->r;
378 get_rcw_we(rs, ws, len, errs, eras);
407 static int exercise_rs_bc(struct rs_control *rs, struct wspace *ws,
424 test_bc(rs, len, errs, eras, trials, &stat, ws);
450 struct wspace *ws;
457 ws = alloc_ws(rsc->codec);
458 if (!ws)
475 retval |= exercise_rs(rsc, ws, len, e->ntrials);
477 retval |= exercise_rs_bc(rsc, ws, len, e->ntrials);
480 free_ws(ws);