event/sw: fix get of single xstat value
authorHarry van Haaren <harry.van.haaren@intel.com>
Tue, 10 Oct 2017 15:47:57 +0000 (16:47 +0100)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Wed, 25 Oct 2017 12:03:43 +0000 (14:03 +0200)
commit8747b239296e7ee3731ac48e9a55e3d9e6d001a6
tree6323c431135cfcb4107a0953a2dd4e9d0b78e93c
parent6cf86202630e754b2182bdc812dc153e04a78b5c
event/sw: fix get of single xstat value

This commit allows the xstats_get() API to return just a single
value based on its ID. Previously, the "ret_n_lt_stats" value
set to 1 ensured a check to take place that the array was larger
than the available xstats.

The xstats_get() API allows retriving of individual stats - hence
this check should be removed - by setting "ret_n_lt_stats" to zero.

Fixes: c1ad03df7ad5 ("event/sw: support xstats")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
drivers/event/sw/sw_evdev_xstats.c