Re: [PATCH 2/3] Prepare pid_nr() etc functions to work with not-NULL pids

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matt Mackall wrote:
> On Thu, Oct 04, 2007 at 12:54:17PM +0400, Pavel Emelyanov wrote:
>> Matt Mackall wrote:
>>> On Wed, Oct 03, 2007 at 06:20:43PM +0400, Pavel Emelyanov wrote:
>>>> Just make the __pid_nr() etc functions that expect the argument
>>>> to always be not NULL.
>>>>
>>>> Signed-off-by: Pavel Emelyanov <[email protected]>
>>>>  static inline pid_t pid_nr(struct pid *pid)
>>>>  {
>>>>  	pid_t nr = 0;
>>>>  	if (pid)
>>>> -		nr = pid->numbers[0].nr;
>>>> +		nr = __pid_nr(pid);
>>>>  	return nr;
>>>>  }
>>> Is there a patch that removes these inlines? Otherwise this looks good
>>> to me.
>> Not yet. Some of are uninlined already, but others are not. I'd like 
>> to make some testing before uninline them.
> 
> I was asking about the whole function, actually, not the keyword. Is
> this function not equivalent to __pid_nr now?

Oh, I see. I haven't managed to check the whole kernel yet that all
the users of pid_xnr() calls pass not-null pointer there. This is 
in TODO list.

Thanks,
Pavel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux