Re: [PATCH] trivial - constify sched.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Satyam Sharma
Date: Thursday, August 30, 2007 - 1:41 pm

On Thu, 30 Aug 2007, Jan Engelhardt wrote:

... which makes zero sense, because ...


... exactly.


That commit const-ified struct timespec * or struct timeval * arguments,
which made sense because: (1) those functions really did not modify the
passed structs, and, (2) callers that pass in const struct timeval *
or const struct timespec * are indeed plausible (because one can plausibly
have const timeval/timespec structs). As the changelog suggested, those
callers were having to cast away the const qualifier before passing to
these functions to avoid seeing "passing argument discards qualifiers"
warnings. While (1) holds true for the sched.h case here, (2) does not
(and there are no warnings to shut up either).

If one really wants to go about "constifying" the kernel, then I think
there's a lot of _data_ out there that should first be made const-
qualified. xxx_ops function tables, and the like.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] trivial - constify sched.h, Joe Perches, (Mon Aug 27, 1:40 pm)
Re: [PATCH] trivial - constify sched.h, Jiri Slaby, (Mon Aug 27, 1:59 pm)
Re: [PATCH] trivial - constify sched.h, Alexey Dobriyan, (Mon Aug 27, 2:33 pm)
Re: [PATCH] trivial - constify sched.h, Jan Engelhardt, (Thu Aug 30, 12:24 pm)
Re: [PATCH] trivial - constify sched.h, Satyam Sharma, (Thu Aug 30, 1:41 pm)
Re: [PATCH] trivial - constify sched.h, Jan Engelhardt, (Thu Aug 30, 1:55 pm)
Re: [PATCH] trivial - constify sched.h, Satyam Sharma, (Thu Aug 30, 2:21 pm)
Re: [PATCH] trivial - constify sched.h, Christoph Hellwig, (Fri Aug 31, 6:53 am)
Re: [PATCH] trivial - constify sched.h, Matthew Wilcox, (Fri Aug 31, 7:03 am)