All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: don't push static constants on stack for %*ph
Date: Thu, 10 Dec 2015 15:46:57 +0200	[thread overview]
Message-ID: <1449755217.30729.99.camel@linux.intel.com> (raw)
In-Reply-To: <1378291309-13869-1-git-send-email-andriy.shevchenko@linux.intel.com>

On Wed, 2013-09-04 at 13:41 +0300, Andy Shevchenko wrote:
> There is no need to pass constants via stack. The width may be
> explicitly
> specified in the format.

Dmitry, any comments on this?

> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  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<model> */
>  	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,

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

--
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

  parent reply	other threads:[~2015-12-10 13:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 10:41 [PATCH] Input: don't push static constants on stack for %*ph Andy Shevchenko
2013-11-14 15:07 ` Andy Shevchenko
2015-12-10 13:46 ` Andy Shevchenko [this message]
2015-12-15  7:31   ` Dmitry Torokhov
2015-12-17 17:16   ` Nick Dyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449755217.30729.99.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.