Message ID | 20200405180321.1737310-6-jic23@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | IIO: Tidy up parameters to regmap_bulk_* calls | expand |
On Sun, 2020-04-05 at 19:03 +0100, jic23@kernel.org wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Given the parameter is void *, casting to u8 * is unnecessary. > Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Cc: Daniel Baluta <daniel.baluta@gmail.com> > --- > drivers/iio/magnetometer/mmc35240.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/magnetometer/mmc35240.c > b/drivers/iio/magnetometer/mmc35240.c > index 425cdd07b4e5..1787d656d009 100644 > --- a/drivers/iio/magnetometer/mmc35240.c > +++ b/drivers/iio/magnetometer/mmc35240.c > @@ -239,7 +239,7 @@ static int mmc35240_init(struct mmc35240_data *data) > return ret; > > ret = regmap_bulk_read(data->regmap, MMC35240_OTP_START_ADDR, > - (u8 *)otp_data, sizeof(otp_data)); > + otp_data, sizeof(otp_data)); > if (ret < 0) > return ret; > > @@ -295,7 +295,7 @@ static int mmc35240_read_measurement(struct mmc35240_data > *data, __le16 buf[3]) > if (ret < 0) > return ret; > > - return regmap_bulk_read(data->regmap, MMC35240_REG_XOUT_L, (u8 *)buf, > + return regmap_bulk_read(data->regmap, MMC35240_REG_XOUT_L, buf, > 3 * sizeof(__le16)); > } >
diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c index 425cdd07b4e5..1787d656d009 100644 --- a/drivers/iio/magnetometer/mmc35240.c +++ b/drivers/iio/magnetometer/mmc35240.c @@ -239,7 +239,7 @@ static int mmc35240_init(struct mmc35240_data *data) return ret; ret = regmap_bulk_read(data->regmap, MMC35240_OTP_START_ADDR, - (u8 *)otp_data, sizeof(otp_data)); + otp_data, sizeof(otp_data)); if (ret < 0) return ret; @@ -295,7 +295,7 @@ static int mmc35240_read_measurement(struct mmc35240_data *data, __le16 buf[3]) if (ret < 0) return ret; - return regmap_bulk_read(data->regmap, MMC35240_REG_XOUT_L, (u8 *)buf, + return regmap_bulk_read(data->regmap, MMC35240_REG_XOUT_L, buf, 3 * sizeof(__le16)); }