Commit 7477fb6fbc339469ea945e007f3f7b3bb13b25f7

Authored by Geert Uytterhoeven
Committed by Linus Torvalds
1 parent 998aaf01c6

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>

Showing 2 changed files with 6 additions and 6 deletions Side-by-side Diff

drivers/input/misc/hp_sdc_rtc.c
... ... @@ -458,35 +458,35 @@
458 458 p += sprintf(p, "i8042 rtc\t: READ FAILED!\n");
459 459 } else {
460 460 p += sprintf(p, "i8042 rtc\t: %ld.%02d seconds\n",
461   - tv.tv_sec, tv.tv_usec/1000);
  461 + tv.tv_sec, (int)tv.tv_usec/1000);
462 462 }
463 463  
464 464 if (hp_sdc_rtc_read_fhs(&tv)) {
465 465 p += sprintf(p, "handshake\t: READ FAILED!\n");
466 466 } else {
467 467 p += sprintf(p, "handshake\t: %ld.%02d seconds\n",
468   - tv.tv_sec, tv.tv_usec/1000);
  468 + tv.tv_sec, (int)tv.tv_usec/1000);
469 469 }
470 470  
471 471 if (hp_sdc_rtc_read_mt(&tv)) {
472 472 p += sprintf(p, "alarm\t\t: READ FAILED!\n");
473 473 } else {
474 474 p += sprintf(p, "alarm\t\t: %ld.%02d seconds\n",
475   - tv.tv_sec, tv.tv_usec/1000);
  475 + tv.tv_sec, (int)tv.tv_usec/1000);
476 476 }
477 477  
478 478 if (hp_sdc_rtc_read_dt(&tv)) {
479 479 p += sprintf(p, "delay\t\t: READ FAILED!\n");
480 480 } else {
481 481 p += sprintf(p, "delay\t\t: %ld.%02d seconds\n",
482   - tv.tv_sec, tv.tv_usec/1000);
  482 + tv.tv_sec, (int)tv.tv_usec/1000);
483 483 }
484 484  
485 485 if (hp_sdc_rtc_read_ct(&tv)) {
486 486 p += sprintf(p, "periodic\t: READ FAILED!\n");
487 487 } else {
488 488 p += sprintf(p, "periodic\t: %ld.%02d seconds\n",
489   - tv.tv_sec, tv.tv_usec/1000);
  489 + tv.tv_sec, (int)tv.tv_usec/1000);
490 490 }
491 491  
492 492 p += sprintf(p,
drivers/input/serio/hp_sdc.c
... ... @@ -323,7 +323,7 @@
323 323 * it back to the application. and be less verbose.
324 324 */
325 325 printk(KERN_WARNING PREFIX "read timeout (%ius)!\n",
326   - tv.tv_usec - hp_sdc.rtv.tv_usec);
  326 + (int)(tv.tv_usec - hp_sdc.rtv.tv_usec));
327 327 curr->idx += hp_sdc.rqty;
328 328 hp_sdc.rqty = 0;
329 329 tmp = curr->seq[curr->actidx];