i2c: designware: Drop return value from i2c_dw_acpi_configure()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 19 Aug 2024 18:45:12 +0000 (21:45 +0300)
committerAndi Shyti <andi.shyti@kernel.org>
Mon, 9 Sep 2024 22:33:58 +0000 (00:33 +0200)
i2c_dw_acpi_configure() is called without checking of the returned
value, hence just drop it by converting to void.

Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-designware-common.c
drivers/i2c/busses/i2c-designware-core.h

index 4160c5e57df474ee8a3254b95b0ea576fd1592f9..f0d7cad92f1c0f9aecb8f0d9b23de92be6c72842 100644 (file)
@@ -255,7 +255,7 @@ static void i2c_dw_acpi_params(struct device *device, char method[],
        kfree(buf.pointer);
 }
 
-int i2c_dw_acpi_configure(struct device *device)
+void i2c_dw_acpi_configure(struct device *device)
 {
        struct dw_i2c_dev *dev = dev_get_drvdata(device);
        struct i2c_timings *t = &dev->timings;
@@ -285,8 +285,6 @@ int i2c_dw_acpi_configure(struct device *device)
                dev->sda_hold_time = fs_ht;
                break;
        }
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(i2c_dw_acpi_configure);
 
index 3e48f446ce537570788be8c86137a1642bfb4a9b..ebcf816b731c5e41f8d939f74af1c7eafa50c605 100644 (file)
@@ -420,7 +420,7 @@ int i2c_dw_validate_speed(struct dw_i2c_dev *dev);
 void i2c_dw_adjust_bus_speed(struct dw_i2c_dev *dev);
 
 #if IS_ENABLED(CONFIG_ACPI)
-int i2c_dw_acpi_configure(struct device *device);
+void i2c_dw_acpi_configure(struct device *device);
 #else
-static inline int i2c_dw_acpi_configure(struct device *device) { return -ENODEV; }
+static inline void i2c_dw_acpi_configure(struct device *device) { }
 #endif