diff mbox series

i2c: imx-lpi2c: fix build warning "function defined but not used"

Message ID 20241228090852.2049321-1-carlos.song@nxp.com
State New
Headers show
Series i2c: imx-lpi2c: fix build warning "function defined but not used" | expand

Commit Message

Carlos Song Dec. 28, 2024, 9:08 a.m. UTC
lpi2c_resume_noirq() and lpi2c_suspend_noirq() are defined but it maybe
unused, so should add __maybe_unused to both functions to avoid build
warning.

Fixes: fa89723f7a78 ("i2c: imx-lpi2c: add target mode support")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412280835.LRAV3z0g-lkp@intel.com/
Signed-off-by: Carlos Song <carlos.song@nxp.com>
---
 drivers/i2c/busses/i2c-imx-lpi2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 02361274fcaa..dc25d7dfe1ab 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -1422,12 +1422,12 @@  static int __maybe_unused lpi2c_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int lpi2c_suspend_noirq(struct device *dev)
+static int __maybe_unused lpi2c_suspend_noirq(struct device *dev)
 {
 	return pm_runtime_force_suspend(dev);
 }
 
-static int lpi2c_resume_noirq(struct device *dev)
+static int __maybe_unused lpi2c_resume_noirq(struct device *dev)
 {
 	struct lpi2c_imx_struct *lpi2c_imx = dev_get_drvdata(dev);
 	int ret;