diff options
| author | Jacob Keller <jacob.e.keller@intel.com> | 2018-04-12 21:15:57 +0300 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-05-09 19:02:39 +0300 |
| commit | 36592d6ce8d38590894fb34329b0786386ee75bc (patch) | |
| tree | 2277966956b4ac5ab81f772cb0cec730d4fe8f85 /tools/perf/scripts/python/intel-pt-events.py | |
| parent | d63bb21a7e722fcaa6cc6a217f21fe25a9e2c89e (diff) | |
| download | linux-36592d6ce8d38590894fb34329b0786386ee75bc.tar.xz | |
fm10k: use macro to avoid passing the array and size separately
Avoid potential bugs with fm10k_add_stat_strings and
fm10k_add_ethtool_stats by using a macro to calculate the ARRAY_SIZE
when passing. This helps ensure that the size is always correct.
Note that it assumes we only pass static const fm10k_stat arrays, and
that evaluation of the argument won't have side effects.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions
