소스 검색

HP input: kill warnings due to suseconds_t differences

Kill compiler warnings related to printf() formats in the input drivers for
various HP9000 machines, which are shared between PA-RISC (suseconds_t is int)
and m68k (suseconds_t is long). As both are 32-bit, it's safe to cast to int.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven 16 년 전
부모
커밋
7477fb6fbc
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 5 5
      drivers/input/misc/hp_sdc_rtc.c
  2. 1 1
      drivers/input/serio/hp_sdc.c

+ 5 - 5
drivers/input/misc/hp_sdc_rtc.c

@@ -458,35 +458,35 @@ static int hp_sdc_rtc_proc_output (char *buf)
 		p += sprintf(p, "i8042 rtc\t: READ FAILED!\n");
 		p += sprintf(p, "i8042 rtc\t: READ FAILED!\n");
 	} else {
 	} else {
 		p += sprintf(p, "i8042 rtc\t: %ld.%02d seconds\n", 
 		p += sprintf(p, "i8042 rtc\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 	}
 
 
 	if (hp_sdc_rtc_read_fhs(&tv)) {
 	if (hp_sdc_rtc_read_fhs(&tv)) {
 		p += sprintf(p, "handshake\t: READ FAILED!\n");
 		p += sprintf(p, "handshake\t: READ FAILED!\n");
 	} else {
 	} else {
         	p += sprintf(p, "handshake\t: %ld.%02d seconds\n", 
         	p += sprintf(p, "handshake\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 	}
 
 
 	if (hp_sdc_rtc_read_mt(&tv)) {
 	if (hp_sdc_rtc_read_mt(&tv)) {
 		p += sprintf(p, "alarm\t\t: READ FAILED!\n");
 		p += sprintf(p, "alarm\t\t: READ FAILED!\n");
 	} else {
 	} else {
 		p += sprintf(p, "alarm\t\t: %ld.%02d seconds\n", 
 		p += sprintf(p, "alarm\t\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 	}
 
 
 	if (hp_sdc_rtc_read_dt(&tv)) {
 	if (hp_sdc_rtc_read_dt(&tv)) {
 		p += sprintf(p, "delay\t\t: READ FAILED!\n");
 		p += sprintf(p, "delay\t\t: READ FAILED!\n");
 	} else {
 	} else {
 		p += sprintf(p, "delay\t\t: %ld.%02d seconds\n", 
 		p += sprintf(p, "delay\t\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 	}
 
 
 	if (hp_sdc_rtc_read_ct(&tv)) {
 	if (hp_sdc_rtc_read_ct(&tv)) {
 		p += sprintf(p, "periodic\t: READ FAILED!\n");
 		p += sprintf(p, "periodic\t: READ FAILED!\n");
 	} else {
 	} else {
 		p += sprintf(p, "periodic\t: %ld.%02d seconds\n", 
 		p += sprintf(p, "periodic\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 	}
 
 
         p += sprintf(p,
         p += sprintf(p,

+ 1 - 1
drivers/input/serio/hp_sdc.c

@@ -323,7 +323,7 @@ static void hp_sdc_tasklet(unsigned long foo)
 			 * it back to the application. and be less verbose.
 			 * it back to the application. and be less verbose.
 			 */
 			 */
 			printk(KERN_WARNING PREFIX "read timeout (%ius)!\n",
 			printk(KERN_WARNING PREFIX "read timeout (%ius)!\n",
-			       tv.tv_usec - hp_sdc.rtv.tv_usec);
+			       (int)(tv.tv_usec - hp_sdc.rtv.tv_usec));
 			curr->idx += hp_sdc.rqty;
 			curr->idx += hp_sdc.rqty;
 			hp_sdc.rqty = 0;
 			hp_sdc.rqty = 0;
 			tmp = curr->seq[curr->actidx];
 			tmp = curr->seq[curr->actidx];