drivers/i2c/busses/i2c-imx-lpi2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
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 --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;
--
2.34.1
Hi Carlos,
On Sat, Dec 28, 2024 at 05:08:52PM +0800, Carlos Song wrote:
> 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>
yeah, I have different PM configuration to catch these kind of
error and I missed this.
Rather than applying a fix over a recent patch, I am going to
remove your original patch and ask you to send a v7 of your
"imx-lpi2c: add target mode support".
Is it OK with you?
Andi
Hi Carlos,
On Sat, Dec 28, 2024 at 09:53:22PM +0100, Andi Shyti wrote:
> On Sat, Dec 28, 2024 at 05:08:52PM +0800, Carlos Song wrote:
> > 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>
>
> yeah, I have different PM configuration to catch these kind of
> error and I missed this.
>
> Rather than applying a fix over a recent patch, I am going to
> remove your original patch and ask you to send a v7 of your
> "imx-lpi2c: add target mode support".
>
> Is it OK with you?
I removed the patch and updated patchwork. I will be waiting for
your v7.
Thanks,
Andi
© 2016 - 2026 Red Hat, Inc.