Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Reyad Attiyat and committed by
Jonathan Cameron
03d79558 e010a2a0

+2 -5
+2 -5
drivers/iio/magnetometer/hid-sensor-magn-3d.c
··· 246 246 }; 247 247 248 248 /* 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) 251 250 { 252 251 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); 253 252 iio_push_to_buffers(indio_dev, data); ··· 262 263 263 264 dev_dbg(&indio_dev->dev, "magn_3d_proc_event\n"); 264 265 if (atomic_read(&magn_state->common_attributes.data_ready)) 265 - hid_sensor_push_data(indio_dev, 266 - magn_state->iio_vals, 267 - sizeof(magn_state->iio_vals)); 266 + hid_sensor_push_data(indio_dev, magn_state->iio_vals); 268 267 269 268 return 0; 270 269 }