[PATCH] percpu: __percpu_depopulate_mask can take a const mask

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

 



This eliminates a compiler warning:

mm/allocpercpu.c: In function 'free_percpu':
mm/allocpercpu.c:146: warning: passing argument 2 of '__percpu_depopulate_mask' discards qualifiers from pointer target type

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 mm/allocpercpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

On Tue, 31 Mar 2009 16:22:34 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> Today's linux-next build (powerpc ppc64_defconfig) produced this warning:
> 
> mm/allocpercpu.c: In function 'free_percpu':
> mm/allocpercpu.c:146: warning: passing argument 2 of '__percpu_depopulate_mask' discards qualifiers from pointer target type
> 
> Caused by commit c36dd4785de7e87979e0c27aa53dff116ddf37c5
> ("cpumask:core-use-new-functions").
> 
> The "cpumask_t *" argument to __percpu_depopulate_mask() could be marked
> "const".

The above commit is now in mainline.

diff --git a/mm/allocpercpu.c b/mm/allocpercpu.c
index 139d5b7..dfdee6a 100644
--- a/mm/allocpercpu.c
+++ b/mm/allocpercpu.c
@@ -31,7 +31,7 @@ static void percpu_depopulate(void *__pdata, int cpu)
  * @__pdata: per-cpu data to depopulate
  * @mask: depopulate per-cpu data for cpu's selected through mask bits
  */
-static void __percpu_depopulate_mask(void *__pdata, cpumask_t *mask)
+static void __percpu_depopulate_mask(void *__pdata, const cpumask_t *mask)
 {
 	int cpu;
 	for_each_cpu_mask_nr(cpu, *mask)
-- 
1.6.2.1

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux