Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-08-03 Thread Viresh Kumar
On 03-08-15, 17:38, Steven Rostedt wrote: > On Fri, 31 Jul 2015 13:23:10 +0300 > "Kirill A. Shutemov" wrote: > > We have two cases in code: > > > > drivers/rtc/rtc-gemini.c: if (likely(IS_ERR(rtc->rtc_dev))) > > drivers/staging/lustre/lustre/obdclass/lu_object.c: if > >

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-08-03 Thread Steven Rostedt
On Fri, 31 Jul 2015 13:23:10 +0300 "Kirill A. Shutemov" wrote: > On Fri, Jul 31, 2015 at 11:41:09AM +0200, Vlastimil Babka wrote: > > On 07/31/2015 10:38 AM, Viresh Kumar wrote: > > >Hi, > > > > > >This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have > > >added additional

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-08-03 Thread Viresh Kumar
On 03-08-15, 17:38, Steven Rostedt wrote: On Fri, 31 Jul 2015 13:23:10 +0300 Kirill A. Shutemov kir...@shutemov.name wrote: We have two cases in code: drivers/rtc/rtc-gemini.c: if (likely(IS_ERR(rtc-rtc_dev))) drivers/staging/lustre/lustre/obdclass/lu_object.c: if

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-08-03 Thread Steven Rostedt
On Fri, 31 Jul 2015 13:23:10 +0300 Kirill A. Shutemov kir...@shutemov.name wrote: On Fri, Jul 31, 2015 at 11:41:09AM +0200, Vlastimil Babka wrote: On 07/31/2015 10:38 AM, Viresh Kumar wrote: Hi, This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have added additional

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Viresh Kumar
On 31-07-15, 13:23, Kirill A. Shutemov wrote: > On Fri, Jul 31, 2015 at 11:41:09AM +0200, Vlastimil Babka wrote: > > On 07/31/2015 10:38 AM, Viresh Kumar wrote: > > >Hi, > > > > > >This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have > > >added additional unlikely compiler flag

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Kirill A. Shutemov
On Fri, Jul 31, 2015 at 11:41:09AM +0200, Vlastimil Babka wrote: > On 07/31/2015 10:38 AM, Viresh Kumar wrote: > >Hi, > > > >This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have > >added additional unlikely compiler flag to them. It also fixes the > >definition of

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Viresh Kumar
On 31-07-15, 11:41, Vlastimil Babka wrote: > [+CC Steven Rostedt] > > Any idea what the compiler does in the case of > "if (likely(IS_ERR(...)))"? There are apparently such cases in the source. > > does the "likely" somehow override the "unlikely" of IS_ERR, or is > the resulting code a mess?

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Vlastimil Babka
On 07/31/2015 10:38 AM, Viresh Kumar wrote: Hi, This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have added additional unlikely compiler flag to them. It also fixes the definition of IS_ERR_OR_NULL(), to use unlikely for all checks it does. [+CC Steven Rostedt] Any idea what

[PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Viresh Kumar
Hi, This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have added additional unlikely compiler flag to them. It also fixes the definition of IS_ERR_OR_NULL(), to use unlikely for all checks it does. Viresh Kumar (15): err.h: add (missing) unlikely() to IS_ERR_OR_NULL() PM /

[PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Viresh Kumar
Hi, This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have added additional unlikely compiler flag to them. It also fixes the definition of IS_ERR_OR_NULL(), to use unlikely for all checks it does. Viresh Kumar (15): err.h: add (missing) unlikely() to IS_ERR_OR_NULL() PM /

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Vlastimil Babka
On 07/31/2015 10:38 AM, Viresh Kumar wrote: Hi, This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have added additional unlikely compiler flag to them. It also fixes the definition of IS_ERR_OR_NULL(), to use unlikely for all checks it does. [+CC Steven Rostedt] Any idea what

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Viresh Kumar
On 31-07-15, 11:41, Vlastimil Babka wrote: [+CC Steven Rostedt] Any idea what the compiler does in the case of if (likely(IS_ERR(...)))? There are apparently such cases in the source. does the likely somehow override the unlikely of IS_ERR, or is the resulting code a mess? Good point.

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Viresh Kumar
On 31-07-15, 13:23, Kirill A. Shutemov wrote: On Fri, Jul 31, 2015 at 11:41:09AM +0200, Vlastimil Babka wrote: On 07/31/2015 10:38 AM, Viresh Kumar wrote: Hi, This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have added additional unlikely compiler flag to them. It also

Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)

2015-07-31 Thread Kirill A. Shutemov
On Fri, Jul 31, 2015 at 11:41:09AM +0200, Vlastimil Babka wrote: On 07/31/2015 10:38 AM, Viresh Kumar wrote: Hi, This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have added additional unlikely compiler flag to them. It also fixes the definition of IS_ERR_OR_NULL(), to use