From: Jonathan Cameron <jic23@kernel.org>
To: Jean-Baptiste Maneyrol <JManeyrol@invensense.com>
Cc: linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v2 2/7] iio: imu: inv_mpu6050: replace sprintf with scnprintf
Date: Sun, 11 Jun 2017 13:45:48 +0100 [thread overview]
Message-ID: <20170611134548.72e0d499@kernel.org> (raw)
In-Reply-To: <BLUPR12MB065777243F5CD0574B4B19B1C4C80@BLUPR12MB0657.namprd12.prod.outlook.com>
On Wed, 7 Jun 2017 13:42:26 +0000
Jean-Baptiste Maneyrol <JManeyrol@invensense.com> wrote:
> Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Jonathan
> ---
> drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> index 37fb18f..64af12c 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> @@ -684,7 +684,8 @@ static ssize_t inv_attr_show(struct device *dev, struct device_attribute *attr,
> case ATTR_ACCL_MATRIX:
> m = st->plat_data.orientation;
>
> - return sprintf(buf, "%d, %d, %d; %d, %d, %d; %d, %d, %d\n",
> + return scnprintf(buf, PAGE_SIZE,
> + "%d, %d, %d; %d, %d, %d; %d, %d, %d\n",
> m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8]);
> default:
> return -EINVAL;
prev parent reply other threads:[~2017-06-11 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 13:42 [PATCH v2 2/7] iio: imu: inv_mpu6050: replace sprintf with scnprintf Jean-Baptiste Maneyrol
2017-06-11 12:45 ` Jonathan Cameron [this message]
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=20170611134548.72e0d499@kernel.org \
--to=jic23@kernel.org \
--cc=JManeyrol@invensense.com \
--cc=linux-iio@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).