瀏覽代碼

[IA64] address compiler warnings perfmon.c/salinfo.c

perfmon.c has a dubious cast directly from "int" to "void *". Add
an intermediate cast to "long" to keep gcc happy.

salinfo.c uses "down_trylock()" in a highly creative way (explained
in the comments in the file) ... but it does kick out this warning:

 arch/ia64/kernel/salinfo.c:195: warning: ignoring return value of 'down_trylock'

which people occasionally try to "fix" in ways that do not work. Use some
casts to keep gcc quiet.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Jan Beulich 16 年之前
父節點
當前提交
fa276f36f3
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      arch/ia64/kernel/perfmon.c
  2. 1 1
      arch/ia64/kernel/salinfo.c

+ 1 - 1
arch/ia64/kernel/perfmon.c

@@ -5603,7 +5603,7 @@ pfm_interrupt_handler(int irq, void *arg)
  * /proc/perfmon interface, for debug only
  * /proc/perfmon interface, for debug only
  */
  */
 
 
-#define PFM_PROC_SHOW_HEADER	((void *)nr_cpu_ids+1)
+#define PFM_PROC_SHOW_HEADER	((void *)(long)nr_cpu_ids+1)
 
 
 static void *
 static void *
 pfm_proc_start(struct seq_file *m, loff_t *pos)
 pfm_proc_start(struct seq_file *m, loff_t *pos)

+ 1 - 1
arch/ia64/kernel/salinfo.c

@@ -192,7 +192,7 @@ struct salinfo_platform_oemdata_parms {
 static void
 static void
 salinfo_work_to_do(struct salinfo_data *data)
 salinfo_work_to_do(struct salinfo_data *data)
 {
 {
-	down_trylock(&data->mutex);
+	(void)(down_trylock(&data->mutex) ?: 0);
 	up(&data->mutex);
 	up(&data->mutex);
 }
 }