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

Configure Feed

Select the types of activity you want to include in your feed.

iio: imu: st_lsm6dsx: drop casting to void in dev_set_drvdata

The C standard specifies that there is no need to cast from a pointer to
void [1]. Therefore, it can be safely dropped.

[1] C Standard Committee: https://c0x.shape-of-code.com/6.3.2.3.html

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240303-void_in_dev_set_drvdata-v1-4-ae39027d740b@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Javier Carrasco and committed by
Jonathan Cameron
cb98410d 8c5b0ea6

+1 -1
+1 -1
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
··· 2726 2726 if (!hw) 2727 2727 return -ENOMEM; 2728 2728 2729 - dev_set_drvdata(dev, (void *)hw); 2729 + dev_set_drvdata(dev, hw); 2730 2730 2731 2731 mutex_init(&hw->fifo_lock); 2732 2732 mutex_init(&hw->conf_lock);