Skip to contentSkip to conversation

hid-holtekff: don't push static constants on stack for %*ph

PATCH Applied Andy Shevchenko 2 participants 2 messages Aug 2, 2013 – Aug 5, 2013 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hid-holtekff: don't push static constants on stack for %*ph

There is no need to pass constants via stack. The width may be explicitly specified in the format.

---
 drivers/hid/hid-holtekff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-holtekff.c +1 -1
index 9a8f051..9325545 100644
@@ -98,7 +98,7 @@ static void holtekff_send(struct holtekff_device *holtekff,
 		holtekff->field->value[i] = data[i];
 	}
 
-	dbg_hid("sending %*ph\n", 7, data);
+	dbg_hid("sending %7ph\n", data);
 
 	hid_hw_request(hid, holtekff->field->report, HID_REQ_SET_REPORT);
 }
Signature · 1 line
1.8.4.rc0
Applied
#1 lore raw
Quoted 13 lines · Andy Shevchenko

There is no need to pass constants via stack. The width may be explicitly specified in the format.

---
 drivers/hid/hid-holtekff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-holtekff.c +0 -0
index 9a8f051..9325545 100644

drivers/hid/hid-holtekff.c static void holtekff_send(struct holtekff_device *holtekff, · line 103

Quoted 7 lines
drivers/hid/hid-holtekff.c +1 -1
@@ -98,7 +98,7 @@ static void holtekff_send(struct holtekff_device *holtekff,
 		holtekff->field->value[i] = data[i];
 	}
 
-	dbg_hid("sending %*ph\n", 7, data);
+	dbg_hid("sending %7ph\n", data);
 
 	hid_hw_request(hid, holtekff->field->report, HID_REQ_SET_REPORT);

Applied, thanks Andy.

Signature · 2 lines
Jiri Kosina
SUSE Labs