#include #include "evsel.h" #include "counts.h" struct perf_counts *perf_counts__new(int ncpus, int nthreads) { struct perf_counts *counts = zalloc(sizeof(*counts)); if (counts) { struct xyarray *values; values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); if (!values) { free(counts); return NULL; } counts->values = values; } return counts; } void perf_counts__delete(struct perf_counts *counts) { if (counts) { xyarray__delete(counts->values); free(counts); } } static void perf_counts__reset(struct perf_counts *counts) { xyarray__reset(counts->values); } void perf_evsel__reset_counts(struct perf_evsel *evsel) { perf_counts__reset(evsel->counts); } int perf_evsel__alloc_counts(struct perf_evsel *evsel, int ncpus, int nthreads) { evsel->counts = perf_counts__new(ncpus, nthreads); return evsel->counts != NULL ? 0 : -ENOMEM; } void perf_evsel__free_counts(struct perf_evsel *evsel) { perf_counts__delete(evsel->counts); evsel->counts = NULL; } name='id' value='79b11b6437bd31b315f5fda72fe1a00baf98e804'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-sm501.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2017-01-10 10:10:22 +0200
committerJani Nikula <jani.nikula@intel.com>2017-01-10 10:10:31 +0200
commit79b11b6437bd31b315f5fda72fe1a00baf98e804 (patch)
treeeb54c123e2c0c4257ee5b9cc0fe5e8e580afa66d /drivers/usb/host/ohci-sm501.c
parenta121103c922847ba5010819a3f250f1f7fc84ab8 (diff)
parent9631739f8196ec80b5d9bf955f79b711490c0205 (diff)
Merge tag 'gvt-fixes-2017-01-10' of https://github.com/01org/gvt-linux into drm-intel-fixes
GVT-g fixes from Zhenya, "Please pull GVT-g device model fixes for rc4. This is based on rc3 with new vfio/mdev interface change." Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/usb/host/ohci-sm501.c')