lkml.org 
[lkml]   [2019]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()
From
Date
On Mon, 2019-06-10 at 08:09 +0530, Anshuman Khandual wrote:
> > > + /*
> > > + * To be potentially processing a kprobe fault and to be allowed
> > > + * to call kprobe_running(), we have to be non-preemptible.
> > > + */
> > > + if (kprobes_built_in() && !preemptible() && !user_mode(regs)) {
> > > + if (kprobe_running() && kprobe_fault_handler(regs, trap))
> >
> > don't need an 'if A if B', can do 'if A && B'
>
> Which will make it a very lengthy condition check.

Well, is there any problem line-breaking the if condition?

if (A && B && C &&
D && E )

Also, if it's used only to decide the return value, maybe would be fine
to do somethink like that:

return (A && B && C &&
D && E );

Regards,
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-06-10 17:28    [W:0.058 / U:4.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site