diff options
author | 2019-05-13 11:15:01 +0000 | |
---|---|---|
committer | 2019-06-05 14:26:52 -0500 | |
commit | 21560067fb1f5e87abedc3ecec5d46f67ac0c019 (patch) | |
tree | 6009697a30935d7b99166a58d9289acf4914bcfb /tools/perf/scripts/python/export-to-postgresql.py | |
parent | soc: fsl: qe: support fsl,qe-snums property (diff) | |
download | linux-dev-21560067fb1f5e87abedc3ecec5d46f67ac0c019.tar.xz linux-dev-21560067fb1f5e87abedc3ecec5d46f67ac0c019.zip |
soc: fsl: qe: fold qe_get_num_of_snums into qe_snums_init
The comment "No QE ever has fewer than 28 SNUMs" is false; e.g. the
MPC8309 has 14. The code path returning -EINVAL is also a recipe for
instant disaster, since the caller (qe_snums_init) uncritically
assigns the return value to the unsigned qe_num_of_snum, and would
thus proceed to attempt to copy 4GB from snum_init_46[] to the snum[]
array.
So fold the handling of the legacy fsl,qe-num-snums into
qe_snums_init, and make sure we do not end up using the snum_init_46
array in cases other than the two where we know it makes sense.
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Qiang Zhao <qiang.zhao@nxp.com>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions