Message ID | 20200405180321.1737310-1-jic23@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | IIO: Tidy up parameters to regmap_bulk_* calls | expand |
If anyone is bored and fancies sanity checking the ones in this series that have had no eyes on them yet, it would be much appreciated! Thanks, Jonathan On Sun, 5 Apr 2020 19:03:15 +0100 jic23@kernel.org wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > One of Andy Shevchenko's recent patches tidied a case of this up > and a quick grep showed we had some more. > > The main focus of this set is calls to regmap_bulk_read / > regmap_bulk_write. Both are used with buffers of many and varied type, > but as they take a void * there is never any need to cast a pointer > to said buffers to anything explicitly. > > Whilst I was here I used sizeof(buf) in various places to reduce > the use of explicit values when we could derive it from the source > / destination buffer. > > This isn't remotely urgent, but I'd like to clean these out to avoid > replication in future. Not I didn't go after any other unnecessary > casts in the files because that would have take thought and its Sunday > evening and about time for a beer. > > Jonathan Cameron (6): > iio:accel:mxc4005: Drop unnecessary explicit casts in regmap_bulk_read > calls > iio:chemical:atlas-sensor: Drop unnecessary explicit casts in > regmap_bulk_read calls > iio:chemical:bme680: Tidy up parameters to regmap_bulk_read > iio:imu:mpu6050: Tidy up parameters to regmap_bulk functions. > iio:magn:mmc35240: Drop unnecessary casts of val parameter in > regmap_bulk* > iio:light:ltr501: Drop unnecessary cast of parameter in > regmap_bulk_read > > drivers/iio/accel/mxc4005.c | 4 +-- > drivers/iio/chemical/atlas-sensor.c | 7 ++--- > drivers/iio/chemical/bme680_core.c | 36 +++++++++++++--------- > drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 +-- > drivers/iio/light/ltr501.c | 2 +- > drivers/iio/magnetometer/mmc35240.c | 4 +-- > 6 files changed, 32 insertions(+), 25 deletions(-) >
On Sun, Apr 12, 2020 at 4:48 PM Jonathan Cameron <jic23@jic23.retrosnub.co.uk> wrote: > > If anyone is bored and fancies sanity checking the ones in this series > that have had no eyes on them yet, it would be much appreciated! The series makes sense to me. Feel free to add my Rb tag to it if you like. > On Sun, 5 Apr 2020 19:03:15 +0100 > jic23@kernel.org wrote: > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > One of Andy Shevchenko's recent patches tidied a case of this up > > and a quick grep showed we had some more. > > > > The main focus of this set is calls to regmap_bulk_read / > > regmap_bulk_write. Both are used with buffers of many and varied type, > > but as they take a void * there is never any need to cast a pointer > > to said buffers to anything explicitly. > > > > Whilst I was here I used sizeof(buf) in various places to reduce > > the use of explicit values when we could derive it from the source > > / destination buffer. > > > > This isn't remotely urgent, but I'd like to clean these out to avoid > > replication in future. Not I didn't go after any other unnecessary > > casts in the files because that would have take thought and its Sunday > > evening and about time for a beer. > > > > Jonathan Cameron (6): > > iio:accel:mxc4005: Drop unnecessary explicit casts in regmap_bulk_read > > calls > > iio:chemical:atlas-sensor: Drop unnecessary explicit casts in > > regmap_bulk_read calls > > iio:chemical:bme680: Tidy up parameters to regmap_bulk_read > > iio:imu:mpu6050: Tidy up parameters to regmap_bulk functions. > > iio:magn:mmc35240: Drop unnecessary casts of val parameter in > > regmap_bulk* > > iio:light:ltr501: Drop unnecessary cast of parameter in > > regmap_bulk_read > > > > drivers/iio/accel/mxc4005.c | 4 +-- > > drivers/iio/chemical/atlas-sensor.c | 7 ++--- > > drivers/iio/chemical/bme680_core.c | 36 +++++++++++++--------- > > drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 +-- > > drivers/iio/light/ltr501.c | 2 +- > > drivers/iio/magnetometer/mmc35240.c | 4 +-- > > 6 files changed, 32 insertions(+), 25 deletions(-) > > >
On Sun, 2020-04-12 at 23:59 +0300, Andy Shevchenko wrote: > On Sun, Apr 12, 2020 at 4:48 PM Jonathan Cameron > <jic23@jic23.retrosnub.co.uk> wrote: > > If anyone is bored and fancies sanity checking the ones in this series > > that have had no eyes on them yet, it would be much appreciated! > > The series makes sense to me. Feel free to add my Rb tag to it if you like. > Same from my side. I added my tag on the patches. I waited a bit until some driver authors replied back. > > On Sun, 5 Apr 2020 19:03:15 +0100 > > jic23@kernel.org wrote: > > > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > > > One of Andy Shevchenko's recent patches tidied a case of this up > > > and a quick grep showed we had some more. > > > > > > The main focus of this set is calls to regmap_bulk_read / > > > regmap_bulk_write. Both are used with buffers of many and varied type, > > > but as they take a void * there is never any need to cast a pointer > > > to said buffers to anything explicitly. > > > > > > Whilst I was here I used sizeof(buf) in various places to reduce > > > the use of explicit values when we could derive it from the source > > > / destination buffer. > > > > > > This isn't remotely urgent, but I'd like to clean these out to avoid > > > replication in future. Not I didn't go after any other unnecessary > > > casts in the files because that would have take thought and its Sunday > > > evening and about time for a beer. > > > > > > Jonathan Cameron (6): > > > iio:accel:mxc4005: Drop unnecessary explicit casts in regmap_bulk_read > > > calls > > > iio:chemical:atlas-sensor: Drop unnecessary explicit casts in > > > regmap_bulk_read calls > > > iio:chemical:bme680: Tidy up parameters to regmap_bulk_read > > > iio:imu:mpu6050: Tidy up parameters to regmap_bulk functions. > > > iio:magn:mmc35240: Drop unnecessary casts of val parameter in > > > regmap_bulk* > > > iio:light:ltr501: Drop unnecessary cast of parameter in > > > regmap_bulk_read > > > > > > drivers/iio/accel/mxc4005.c | 4 +-- > > > drivers/iio/chemical/atlas-sensor.c | 7 ++--- > > > drivers/iio/chemical/bme680_core.c | 36 +++++++++++++--------- > > > drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 +-- > > > drivers/iio/light/ltr501.c | 2 +- > > > drivers/iio/magnetometer/mmc35240.c | 4 +-- > > > 6 files changed, 32 insertions(+), 25 deletions(-) > > > > >
On Mon, 13 Apr 2020 04:34:50 +0000 "Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote: > On Sun, 2020-04-12 at 23:59 +0300, Andy Shevchenko wrote: > > On Sun, Apr 12, 2020 at 4:48 PM Jonathan Cameron > > <jic23@jic23.retrosnub.co.uk> wrote: > > > If anyone is bored and fancies sanity checking the ones in this series > > > that have had no eyes on them yet, it would be much appreciated! > > > > The series makes sense to me. Feel free to add my Rb tag to it if you like. > > > > Same from my side. > I added my tag on the patches. > I waited a bit until some driver authors replied back. Thanks to both of you! Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > > > > > On Sun, 5 Apr 2020 19:03:15 +0100 > > > jic23@kernel.org wrote: > > > > > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > > > > > One of Andy Shevchenko's recent patches tidied a case of this up > > > > and a quick grep showed we had some more. > > > > > > > > The main focus of this set is calls to regmap_bulk_read / > > > > regmap_bulk_write. Both are used with buffers of many and varied type, > > > > but as they take a void * there is never any need to cast a pointer > > > > to said buffers to anything explicitly. > > > > > > > > Whilst I was here I used sizeof(buf) in various places to reduce > > > > the use of explicit values when we could derive it from the source > > > > / destination buffer. > > > > > > > > This isn't remotely urgent, but I'd like to clean these out to avoid > > > > replication in future. Not I didn't go after any other unnecessary > > > > casts in the files because that would have take thought and its Sunday > > > > evening and about time for a beer. > > > > > > > > Jonathan Cameron (6): > > > > iio:accel:mxc4005: Drop unnecessary explicit casts in regmap_bulk_read > > > > calls > > > > iio:chemical:atlas-sensor: Drop unnecessary explicit casts in > > > > regmap_bulk_read calls > > > > iio:chemical:bme680: Tidy up parameters to regmap_bulk_read > > > > iio:imu:mpu6050: Tidy up parameters to regmap_bulk functions. > > > > iio:magn:mmc35240: Drop unnecessary casts of val parameter in > > > > regmap_bulk* > > > > iio:light:ltr501: Drop unnecessary cast of parameter in > > > > regmap_bulk_read > > > > > > > > drivers/iio/accel/mxc4005.c | 4 +-- > > > > drivers/iio/chemical/atlas-sensor.c | 7 ++--- > > > > drivers/iio/chemical/bme680_core.c | 36 +++++++++++++--------- > > > > drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 +-- > > > > drivers/iio/light/ltr501.c | 2 +- > > > > drivers/iio/magnetometer/mmc35240.c | 4 +-- > > > > 6 files changed, 32 insertions(+), 25 deletions(-) > > > > > > > >
From: Jonathan Cameron <Jonathan.Cameron@huawei.com> One of Andy Shevchenko's recent patches tidied a case of this up and a quick grep showed we had some more. The main focus of this set is calls to regmap_bulk_read / regmap_bulk_write. Both are used with buffers of many and varied type, but as they take a void * there is never any need to cast a pointer to said buffers to anything explicitly. Whilst I was here I used sizeof(buf) in various places to reduce the use of explicit values when we could derive it from the source / destination buffer. This isn't remotely urgent, but I'd like to clean these out to avoid replication in future. Not I didn't go after any other unnecessary casts in the files because that would have take thought and its Sunday evening and about time for a beer. Jonathan Cameron (6): iio:accel:mxc4005: Drop unnecessary explicit casts in regmap_bulk_read calls iio:chemical:atlas-sensor: Drop unnecessary explicit casts in regmap_bulk_read calls iio:chemical:bme680: Tidy up parameters to regmap_bulk_read iio:imu:mpu6050: Tidy up parameters to regmap_bulk functions. iio:magn:mmc35240: Drop unnecessary casts of val parameter in regmap_bulk* iio:light:ltr501: Drop unnecessary cast of parameter in regmap_bulk_read drivers/iio/accel/mxc4005.c | 4 +-- drivers/iio/chemical/atlas-sensor.c | 7 ++--- drivers/iio/chemical/bme680_core.c | 36 +++++++++++++--------- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 +-- drivers/iio/light/ltr501.c | 2 +- drivers/iio/magnetometer/mmc35240.c | 4 +-- 6 files changed, 32 insertions(+), 25 deletions(-)