>-----Original Message----- >From: Jiri Olsa [mailto:jo...@redhat.com] >Sent: Saturday, November 4, 2017 6:25 AM >To: Megha Dey <megha....@linux.intel.com> >Cc: x...@kernel.org; linux-ker...@vger.kernel.org; linux- >d...@vger.kernel.org; t...@linutronix.de; mi...@redhat.com; >h...@zytor.com; andriy.shevche...@linux.intel.com; >kstew...@linuxfoundation.org; Yu, Yu-cheng <yu-cheng...@intel.com>; >Brown, Len <len.br...@intel.com>; gre...@linuxfoundation.org; >pet...@infradead.org; a...@kernel.org; >alexander.shish...@linux.intel.com; namhy...@kernel.org; >vikas.shiva...@linux.intel.com; pombreda...@nexb.com; >m...@kylehuey.com; b...@suse.de; Andrejczuk, Grzegorz ><grzegorz.andrejc...@intel.com>; Luck, Tony <tony.l...@intel.com>; >cor...@lwn.net; Shankar, Ravi V <ravi.v.shan...@intel.com>; Dey, Megha ><megha....@intel.com> >Subject: Re: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch >Monitoring support > >On Fri, Nov 03, 2017 at 11:00:05AM -0700, Megha Dey wrote: > >SNIP > >> + event->event_caps |= PERF_EV_CAP_BM; >> + /* >> + * cfg contains one of the 6 possible Branch Monitoring events >> + */ >> + cfg = event->attr.config; >> + if (cfg < 0 || cfg > (BM_MAX_EVENTS - 1)) >> + return -EINVAL; >> + >> + if (event->attr.sample_period) /* no sampling */ >> + return -EINVAL; > >you can use the 'is_sampling_event' function
Will make the change. > >jirka -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html