From: Jonathan Cameron <jic23@kernel.org>
To: Reyad Attiyat <reyad.attiyat@gmail.com>,
srinivas.pandruvada@linux.intel.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: hid-sensor-magn-3d: Fix build warning
Date: Sun, 27 Jul 2014 14:17:59 +0100 [thread overview]
Message-ID: <53D4FC07.1050007@kernel.org> (raw)
In-Reply-To: <1406322857-12391-1-git-send-email-reyad.attiyat@gmail.com>
On 25/07/14 22:14, Reyad Attiyat wrote:
> Fix build warning, sizeof() called on dynamically
> sized pointer, by removing the call and the dependent
> function parameter. It is not needed or used in this
> driver, when pushing values to an iio buffer.
>
> Changes from v1
> - Fix mistake in varible name
>
> Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
Applied to the togreg branch of iio.git
Thanks for fixing up my mistake!
Jonathan
> ---
> drivers/iio/magnetometer/hid-sensor-magn-3d.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> index 3ec777a..1e717c7 100644
> --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> @@ -246,8 +246,7 @@ static const struct iio_info magn_3d_info = {
> };
>
> /* Function to push data to buffer */
> -static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data,
> - int len)
> +static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data)
> {
> dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
> iio_push_to_buffers(indio_dev, data);
> @@ -263,9 +262,7 @@ static int magn_3d_proc_event(struct hid_sensor_hub_device *hsdev,
>
> dev_dbg(&indio_dev->dev, "magn_3d_proc_event\n");
> if (atomic_read(&magn_state->common_attributes.data_ready))
> - hid_sensor_push_data(indio_dev,
> - magn_state->iio_vals,
> - sizeof(magn_state->iio_vals));
> + hid_sensor_push_data(indio_dev, magn_state->iio_vals);
>
> return 0;
> }
>
prev parent reply other threads:[~2014-07-27 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 21:14 [PATCH v2] iio: hid-sensor-magn-3d: Fix build warning Reyad Attiyat
2014-07-27 13:17 ` 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=53D4FC07.1050007@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=reyad.attiyat@gmail.com \
--cc=srinivas.pandruvada@linux.intel.com \
/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).