[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/6] edac, mce_amd_inj: Modify flags attrigute to use string arguments
On Fri, May 29, 2015 at 01:20:31PM -0500, Aravind Gopalakrishnan wrote:
> Hmm. That should work. Will simplify it in the next version.
> I think I had a NULL in flags_options[] to denote the invalid option.

Still a good thing to have it as a terminator. But the loop I proposed
doesn't even touch it: i < N_INJ_TYPES. I'd leave the NULL array

> Shall I make err = -EINVAL by default and return that here if the
> condition is not satisfied?

We have to make sure to not be overeager to error out - this'll make
using this facility a bit more cumbersome.

So I think your approach was correct to trim it to MAX_FLAG_OPT_SIZE.
__set_inj() will catch any string mismatches anyway.


ECO tip #101: Trim your mails when you reply.

 \ /
  Last update: 2015-05-29 21:41    [W:0.042 / U:55.760 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site