diff mbox

[1/2] i2c-hid: don't push static constants on stack for %*ph

Message ID 1375441636-12921-1-git-send-email-andriy.shevchenko@linux.intel.com
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Andy Shevchenko Aug. 2, 2013, 11:07 a.m. UTC
There is no need to pass constants via stack. The width may be explicitly
specified in the format.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/hid/i2c-hid/i2c-hid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Benjamin Tissoires Aug. 2, 2013, 12:51 p.m. UTC | #1
On Fri, Aug 2, 2013 at 1:07 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> There is no need to pass constants via stack. The width may be explicitly
> specified in the format.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Thanks Andy,
Benjamin
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Kosina Aug. 5, 2013, 9:21 a.m. UTC | #2
On Fri, 2 Aug 2013, Benjamin Tissoires wrote:

> <andriy.shevchenko@linux.intel.com> wrote:
> > There is no need to pass constants via stack. The width may be explicitly
> > specified in the format.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index c21e692..05d4f96 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -801,8 +801,8 @@  static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
 	 * bytes 2-3 -> bcdVersion (has to be 1.00) */
 	ret = i2c_hid_command(client, &hid_descr_cmd, ihid->hdesc_buffer, 4);
 
-	i2c_hid_dbg(ihid, "%s, ihid->hdesc_buffer: %*ph\n",
-			__func__, 4, ihid->hdesc_buffer);
+	i2c_hid_dbg(ihid, "%s, ihid->hdesc_buffer: %4ph\n", __func__,
+			ihid->hdesc_buffer);
 
 	if (ret) {
 		dev_err(&client->dev,