From patchwork Wed Sep 4 10:41:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 2853592 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 65D23C0AB5 for ; Wed, 4 Sep 2013 10:42:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6096A202B4 for ; Wed, 4 Sep 2013 10:42:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DE942021B for ; Wed, 4 Sep 2013 10:42:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760311Ab3IDKmG (ORCPT ); Wed, 4 Sep 2013 06:42:06 -0400 Received: from mga03.intel.com ([143.182.124.21]:5091 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760087Ab3IDKmG (ORCPT ); Wed, 4 Sep 2013 06:42:06 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 04 Sep 2013 03:42:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,1020,1367996400"; d="scan'208";a="290666290" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.173]) by AZSMGA002.ch.intel.com with ESMTP; 04 Sep 2013 03:42:04 -0700 Received: from andy by smile with local (Exim 4.80) (envelope-from ) id 1VHAX0-0003cN-Me; Wed, 04 Sep 2013 13:41:50 +0300 From: Andy Shevchenko To: Dmitry Torokhov , linux-input@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH] Input: don't push static constants on stack for %*ph Date: Wed, 4 Sep 2013 13:41:49 +0300 Message-Id: <1378291309-13869-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.8.4.rc3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Andy Shevchenko --- drivers/input/mouse/hgpk.c | 7 +++---- drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c index 62be888..27909a1 100644 --- a/drivers/input/mouse/hgpk.c +++ b/drivers/input/mouse/hgpk.c @@ -333,9 +333,8 @@ static bool hgpk_is_byte_valid(struct psmouse *psmouse, unsigned char *packet) } if (!valid) - psmouse_dbg(psmouse, - "bad data, mode %d (%d) %*ph\n", - priv->mode, pktcnt, 6, psmouse->packet); + psmouse_dbg(psmouse, "bad data, mode %d (%d) %6ph\n", + priv->mode, pktcnt, psmouse->packet); return valid; } @@ -1027,7 +1026,7 @@ static enum hgpk_model_t hgpk_get_model(struct psmouse *psmouse) return -EIO; } - psmouse_dbg(psmouse, "ID: %*ph\n", 3, param); + psmouse_dbg(psmouse, "ID: %3ph\n", param); /* HGPK signature: 0x67, 0x00, 0x */ if (param[0] != 0x67 || param[1] != 0x00) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 59aa240..dd44ebf 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -331,8 +331,8 @@ static bool mxt_object_writable(unsigned int type) static void mxt_dump_message(struct device *dev, struct mxt_message *message) { - dev_dbg(dev, "reportid: %u\tmessage: %*ph\n", - message->reportid, 7, message->message); + dev_dbg(dev, "reportid: %u\tmessage: %7ph\n", + message->reportid, message->message); } static int mxt_check_bootloader(struct i2c_client *client,