Skip to content

Commit 03d7955

Browse files
soda0289jic23
authored andcommitted
iio: hid-sensor-magn-3d: Fix build warning
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> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent e010a2a commit 03d7955

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎drivers/iio/magnetometer/hid-sensor-magn-3d.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ static const struct iio_info magn_3d_info = {
246246
};
247247

248248
/* Function to push data to buffer */
249-
static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data,
250-
int len)
249+
static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data)
251250
{
252251
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
253252
iio_push_to_buffers(indio_dev, data);
@@ -263,9 +262,7 @@ static int magn_3d_proc_event(struct hid_sensor_hub_device *hsdev,
263262

264263
dev_dbg(&indio_dev->dev, "magn_3d_proc_event\n");
265264
if (atomic_read(&magn_state->common_attributes.data_ready))
266-
hid_sensor_push_data(indio_dev,
267-
magn_state->iio_vals,
268-
sizeof(magn_state->iio_vals));
265+
hid_sensor_push_data(indio_dev, magn_state->iio_vals);
269266

270267
return 0;
271268
}

0 commit comments

Comments
 (0)