On 28 January 2016 at 08:42, Alexander Shishkin
wrote:
> Mathieu Poirier writes:
>
>>> I'd like to understand all the potential failures here, because it's
>>> really a good idea to keep those to a minimum for the sake of
>>> consistency. That is, if the user succeeded in creating an event, about
Mathieu Poirier writes:
>> I'd like to understand all the potential failures here, because it's
>> really a good idea to keep those to a minimum for the sake of
>> consistency. That is, if the user succeeded in creating an event, about
>> the only good reason for the event not starting is a fille
On 26 January 2016 at 08:27, Alexander Shishkin
wrote:
> Mathieu Poirier writes:
>
>> +static int etm_event_init(struct perf_event *event)
>> +{
>> + if (event->attr.type != etm_pmu.type)
>> + return -ENOENT;
>> +
>> + if (event->cpu >= nr_cpu_ids)
>> + return -EIN
Mathieu Poirier writes:
> +static int etm_event_init(struct perf_event *event)
> +{
> + if (event->attr.type != etm_pmu.type)
> + return -ENOENT;
> +
> + if (event->cpu >= nr_cpu_ids)
> + return -EINVAL;
perf_event_alloc() already does this. Except for this one do