lkml.org 
[lkml]   [2017]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/21] x86/intel_rdt/cqm: Add mon_data
On Thu, 6 Jul 2017, Shivappa Vikas wrote:
> On Sun, 2 Jul 2017, Thomas Gleixner wrote:
> > > +static bool __mon_event_count(u32 rmid, struct rmid_read *rr)
> > > +{
> > > + u64 tval;
> > > +
> > > + tval = __rmid_read(rmid, rr->evtid);
> > > + if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL)) {
> > > + rr->val = tval;
> > > + return false;
> > > + }
> > > + switch (rr->evtid) {
> > > + case QOS_L3_OCCUP_EVENT_ID:
> > > + rr->val += tval;
> > > + return true;
> > > + default:
> > > + return false;
> >
> > I have no idea what that return code means.
>
> false for the invalid event id and all errors for __rmid_read. (IOW all errors
> for __mon_event-read)

Sure, but why bool? What's wrong with proper error return codes, so issues
can be distinguished and potentially propagated in the callchain?

Thanks,

tglx




\
 
 \ /
  Last update: 2017-07-07 08:23    [W:0.055 / U:1.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site