]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: common: scmi_iio: Remove unnecessary u64 type cast
authorThorsten Blum <thorsten.blum@toblux.com>
Thu, 11 Jul 2024 13:45:03 +0000 (15:45 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 3 Aug 2024 09:13:37 +0000 (10:13 +0100)
The variable uHz already has the type u64 and casting it to u64 is
unnecessary. Remove the redundant type cast.

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Link: https://patch.msgid.link/20240711134502.168484-1-thorsten.blum@toblux.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/common/scmi_sensors/scmi_iio.c

index 7190eaede7fbe891d67ff0469874bb9f650dd9bd..ed15dcbf4cf6b1e49eb506972f00d40e0c3dd6c4 100644 (file)
@@ -158,7 +158,7 @@ static int scmi_iio_set_odr_val(struct iio_dev *iio_dev, int val, int val2)
         * To calculate the multiplier,we convert the sf into char string  and
         * count the number of characters
         */
-       sf = (u64)uHz * 0xFFFF;
+       sf = uHz * 0xFFFF;
        do_div(sf,  MICROHZ_PER_HZ);
        mult = scnprintf(buf, sizeof(buf), "%llu", sf) - 1;