Skip to content

Commit

Permalink
Staging: quickstart: Fix compilation warning on 64 bit arch
Browse files Browse the repository at this point in the history
acpi_size is u32 or u64 depending on architecture. Cast it to
unsigned long and use %lu for printing.

This fix following build warning:
drivers/staging/quickstart/quickstart.c: In function ‘quickstart_acpi_ghid’:
drivers/staging/quickstart/quickstart.c:212:5: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘acpi_size’ [-Wformat]

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Szymon Janc authored and Greg Kroah-Hartman committed Feb 14, 2012
1 parent af5728e commit 5f01f7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/quickstart/quickstart.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ static int quickstart_acpi_ghid(struct quickstart_acpi *quickstart)
quickstart->button->id = *(uint64_t *)buffer.pointer;
break;
default:
pr_err("%s GHID method returned buffer of unexpected length %u\n",
quickstart->button->name, buffer.length);
pr_err("%s GHID method returned buffer of unexpected length %lu\n",
quickstart->button->name,
(unsigned long)buffer.length);
ret = -EINVAL;
break;
}
Expand Down

0 comments on commit 5f01f7f

Please sign in to comment.