Skip to contentSkip to conversation

acpi: fix printk format warning

PATCH Applied Randy Dunlap 2 participants 2 messages Jun 17, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: fix printk format warning

From: Randy Dunlap <[email protected]>

Fix printk format warning:

linux-next-20080617/drivers/acpi/processor_throttling.c:1258: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

---
 drivers/acpi/processor_throttling.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/processor_throttling.c +1 -1
@@ -1255,7 +1255,7 @@ static ssize_t acpi_processor_write_thro
 	if (state_val >= pr->throttling.state_count)
 		return -EINVAL;
 
-	snprintf(tmpbuf, 5, "%d", state_val);
+	snprintf(tmpbuf, 5, "%zu", state_val);
 
 	if (strcmp(tmpbuf, charp) != 0)
 		return -EINVAL;
reviewer Applied
#1 lore raw

applied,
thanks,
-Len

Quoted 27 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Fix printk format warning:

linux-next-20080617/drivers/acpi/processor_throttling.c:1258: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

---
 drivers/acpi/processor_throttling.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/processor_throttling.c +1 -2
@@ -1255,7 +1255,7 @@ static ssize_t acpi_processor_write_thro
 	if (state_val >= pr->throttling.state_count)
 		return -EINVAL;
 
-	snprintf(tmpbuf, 5, "%d", state_val);
+	snprintf(tmpbuf, 5, "%zu", state_val);
 
 	if (strcmp(tmpbuf, charp) != 0)
 		return -EINVAL;
--

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html