lkml.org 
[lkml]   [2014]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 1/8] x86: allow to handle errors in text_poke function family
On Tue, 21 Jan 2014 14:00:37 +0100
Petr Mladek <pmladek@suse.cz> wrote:

> > > There are some situations where it is hard to recover from an error. Masami
> > > Hiramatsu <masami.hiramatsu.pt@hitachi.com> suggested to create
> > > text_poke*_or_die() variants for this purpose.
> >
> > I don't like the "_or_die()". Although I don't care much about it, I'm
> > thinking the x86 maintainers might not like it either.
> >
> > What about just doing the test in the places that would call "or_die"?
> >
> > ret = text_poke*();
> > BUG_ON(ret);
>
> Exactly this solution has been used in v5 of this patch set, see
> https://lkml.org/lkml/2013/12/3/258
>
> Masami suggested to use the "or_die()" because BUG_ON() was used on most
> locations, see https://lkml.org/lkml/2013/12/6/1107

If BUG_ON() is used in most locations, then we can make text_poke()
default to bug, and the just have a text_poke_safe() function that does
not bug. Or some similar name.

The "_die" has a bad taste in several developers mouth ;-)

-- Steve


\
 
 \ /
  Last update: 2014-01-21 16:41    [W:0.286 / U:5.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site