Re: linux-next: sched tree build warning

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

 



On Thu, 7 May 2009, Stephen Rothwell wrote:

> Hi all,
> 
> Today's linux-next build (powerpc ppc64_defconfig) produced this warning:
> 
> kernel/sched.c: In function 'sched_show_task':
> kernel/sched.c:6677: warning: format '%08x' expects type 'unsigned int', but argument 5 has type 'long unsigned int'
> 
> Introduced by commit 12b5c43486202dd4ff3cfd59a190984a0dd7f6fd ("sched:
> emit thread info flags with stack trace") from the sched tree.
> 
> thread_info::flags is "unsigned long" on all architectures except alpha
> (where it is "unsigned int"), ia64 and x86 (where it is "__u32").
> 

Thanks Stephen.  There's a hacky way around this if Ingo will put up with 
it.



No architecture uses more than 32 bits for thread info flags, yet most 
declare it with type `unsigned long'.  Thus, we only show 32 bits but cast 
the variable to unsigned long for all architectures.

Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
---
diff --git a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6490,9 +6490,9 @@ void sched_show_task(struct task_struct *p)
 #ifdef CONFIG_DEBUG_STACK_USAGE
 	free = stack_not_used(p);
 #endif
-	printk(KERN_CONT "%5lu %5d %6d 0x%08x\n", free,
+	printk(KERN_CONT "%5lu %5d %6d 0x%08lx\n", free,
 		task_pid_nr(p), task_pid_nr(p->real_parent),
-		task_thread_info(p)->flags);
+		(unsigned long)task_thread_info(p)->flags);
 
 	show_stack(p, NULL);
 }
--
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