Commit 8d3b093a authored by Christoph Mallon's avatar Christoph Mallon
Browse files

bescripts: Only fetch the backend_info_t, when it is used.

parent ffa8d6f7
......@@ -256,10 +256,11 @@ EOF
my $idx = 0;
for my $req (@$out_reqs) {
if ($idx == 0) {
$set_out_reqs .= "\treg_out_info_t *const out_infos = be_get_info(res)->out_infos;\n";
}
my $reqstruct = generate_requirements($req, $n, "${arch}_${op}", $idx, 0);
$set_out_reqs .= <<EOF;
info->out_infos[${idx}].req = &${reqstruct};
EOF
$set_out_reqs .= "\tout_infos[$idx].req = &$reqstruct;\n";
++$idx;
}
}
......@@ -357,11 +358,7 @@ EOF
${custominit}
EOF
}
$temp .= <<EOF;
backend_info_t *info = be_get_info(res);
(void) info; /* avoid potential warning */
${set_out_reqs}
EOF
$temp .= "$set_out_reqs\n";
if (exists($n->{"init_attr"})) {
$temp .= "\t".$n->{"init_attr"}."\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment