From 5f01f7f301db567a7a2b99d012db1c408ce0e9de Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Fri, 10 Feb 2012 21:05:43 +0100 Subject: [PATCH] Staging: quickstart: Fix compilation warning on 64 bit arch MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/quickstart/quickstart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c index 352b7ecd6cbb..cac320738142 100644 --- a/drivers/staging/quickstart/quickstart.c +++ b/drivers/staging/quickstart/quickstart.c @@ -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; } -- 2.39.5