Re: [PATCH 1/2] elf: simpler check for -EEXIST
From: Michal Hocko
Date: Sat Mar 16 2019 - 04:31:40 EST
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