lkml.org 
[lkml]   [2019]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] elf: simpler check for -EEXIST
On Fri 15-03-19 19:05:17, Alexey Dobriyan wrote:
> On Fri, Mar 15, 2019 at 07:02:23AM +0900, Tetsuo Handa wrote:
> > On 2019/03/15 5:42, Alexey Dobriyan wrote:
> > > PTR_ERR((void *)map_addr) == -EEXIST
> > >
> > > is a very complicated way of doing the obvious.
> >
> > Michal suggested me to explicitly use PTR_ERR()
>
> without any explanation why...

The return value is ERR_PTR. This code uses unsigned long which is OK
but I thought it is better to call out the return value convention
explicitly. It is not like I would argue about that though.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2019-03-16 09:32    [W:0.038 / U:1.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site