Re: [PATCH 1/2] cpusets: restructure the function update_cpumask() and update_nodemask()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <miaox@...>
Cc: Linux-Kernel <linux-kernel@...>, Paul Jackson <pj@...>, Paul Menage <menage@...>
Date: Wednesday, July 2, 2008 - 5:19 am

On Mon, 02 Jun 2008 16:31:05 +0800 Miao Xie <miaox@cn.fujitsu.com> wrote:


This patch has problems.

kernel/cpuset.c: In function 'cpuset_write_resmask':
kernel/cpuset.c:1374: warning: passing argument 2 of 'update_nodemask' discards qualifiers from pointer target type

Did you not get this warning also?

I don't know how to fix it.  cftype.write_string() requires a const
char* in the third arg, but we then go on to call update_nodemask(),
which does a strstrip() on this allegedly-const char array.

Taking a copy of the string in update_nodemask() would fix things, but
that's pretty lame.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/2] cpusets: restructure the function update_cpu..., Andrew Morton, (Wed Jul 2, 5:19 am)