lkml.org 
[lkml]   [2015]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 5/5] firmware: add an extensible system data helpers
On Thu, Oct 08, 2015 at 01:59:11PM -0400, Josh Boyer wrote:
> On Thu, Oct 1, 2015 at 1:44 PM, Luis R. Rodriguez
> > +static inline int desc_sync_found_call_cb(const struct sysdata_file_desc *desc,
> > + const struct sysdata_file *sysdata)
> > +{
> > + BUG_ON(desc->sync_reqs.mode != SYNCDATA_SYNC);
>
> ngh... Why do these inline functions all have BUG_ONs in them? If it
> is to catch a programming error, why can't you just return EINVAL like
> you do in the async function case? (Even that WARN_ON seems
> excessive).

Sure, I've replaced the pesky BUG_ON() with returning -EINVAL's.
Let me know if there is anything else.

Luis


\
 
 \ /
  Last update: 2015-10-09 01:21    [W:0.045 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site