Skip to contentSkip to conversation

ide-acpi: use %*ph to print small buffer

PATCH Applied Andy Shevchenko 2 participants 2 messages Jul 30, 2020 – Aug 4, 2020 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ide-acpi: use %*ph to print small buffer

Use %*ph format to print small buffer as hex string.

---
 drivers/ide/ide-acpi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/ide/ide-acpi.c +1 -4
index 05e18d658141..9a4ec281b985 100644
@@ -320,10 +320,7 @@ static int do_drive_set_taskfiles(ide_drive_t *drive,
 		u8 *gtf = (u8 *)(gtf_address + ix * REGS_PER_GTF);
 		struct ide_cmd cmd;
 
-		DEBPRINT("(0x1f1-1f7): "
-			 "hex: %02x %02x %02x %02x %02x %02x %02x\n",
-			 gtf[0], gtf[1], gtf[2],
-			 gtf[3], gtf[4], gtf[5], gtf[6]);
+		DEBPRINT("(0x1f1-1f7): hex: %7ph\n", gtf);
 
 		if (!ide_acpigtf) {
 			DEBPRINT("_GTF execution disabled\n");
Signature · 1 line
2.27.0