aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMichael J. Ruhl <[email protected]>2017-09-26 07:01:16 -0700
committerDoug Ledford <[email protected]>2017-09-27 11:34:13 -0400
commitd59075ad1e091cdb663974b10c8bac5491acc356 (patch)
tree3a4a01a21e117dac7c3ea8d1d64f07e9c7b600a1 /tools/perf/scripts/python/bin
parent442e55661db1d5833b0eb5b85f78a845ace7a7cc (diff)
IB/hfi1: Add a safe wrapper for _rcd_get_by_index
hfi1_rcd_get_by_index assumes that the given index is in the correct range. In most cases this is correct because the index is bounded by a loop. For these cases, adding a range check to the function is redundant. For the use case that is not bounded by the loop range, a _safe wrapper function is needed to validate the index before accessing the rcd array. Add a _safe wrapper to _get_by_index to validate the index range. Update appropriate call sites with the new _safe function. Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Michael J. Ruhl <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions