* [PATCH] tpm: remove extraneous #ifdef
@ 2026-09-15 20:12 Arnd Bergmann
2026-09-17 5:53 ` Uwe Kleine-König
2026-09-18 0:58 ` Jarkko Sakkinen
0 siblings, 2 replies; 9+ messages in thread
From: Arnd Bergmann @ 2026-09-15 20:12 UTC (permalink / raw)
To: Peter Huewe, Jarkko Sakkinen, Li Jun
Cc: Arnd Bergmann, Jason Gunthorpe, linux-integrity, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Changing to DEFINE_SIMPLE_DEV_PM_OPS() broke here because the
tpm_inf_resume() function is hidden in an #ifdef:
drivers/char/tpm/tpm_infineon.c:615:61: error: 'tpm_inf_resume' undeclared here (not in a function); did you mean 'tpm_pm_resume'?
615 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume);
| ^~~~~~~~~~~~~~
Remove the #ifdef check.
Fixes: 2249200ee420 ("tpm: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/char/tpm/tpm_infineon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c
index 84a0d3e5f679..d6edd2ca39a5 100644
--- a/drivers/char/tpm/tpm_infineon.c
+++ b/drivers/char/tpm/tpm_infineon.c
@@ -594,7 +594,6 @@ static void tpm_inf_pnp_remove(struct pnp_dev *dev)
}
}
-#ifdef CONFIG_PM_SLEEP
static int tpm_inf_resume(struct device *dev)
{
/* Re-configure TPM after suspending */
@@ -611,7 +610,7 @@ static int tpm_inf_resume(struct device *dev)
tpm_data_out(RESET_LP_IRQC_DISABLE, CMD);
return tpm_pm_resume(dev);
}
-#endif
+
static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume);
static struct pnp_driver tpm_inf_pnp_driver = {
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] tpm: remove extraneous #ifdef 2026-09-15 20:12 [PATCH] tpm: remove extraneous #ifdef Arnd Bergmann @ 2026-09-17 5:53 ` Uwe Kleine-König 2026-09-18 0:58 ` Jarkko Sakkinen 1 sibling, 0 replies; 9+ messages in thread From: Uwe Kleine-König @ 2026-09-17 5:53 UTC (permalink / raw) To: Arnd Bergmann Cc: Peter Huewe, Jarkko Sakkinen, Li Jun, Arnd Bergmann, Jason Gunthorpe, linux-integrity, linux-kernel [-- Attachment #1: Type: text/plain, Size: 854 bytes --] On Tue, Sep 15, 2026 at 10:12:58PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Changing to DEFINE_SIMPLE_DEV_PM_OPS() broke here because the > tpm_inf_resume() function is hidden in an #ifdef: > > drivers/char/tpm/tpm_infineon.c:615:61: error: 'tpm_inf_resume' undeclared here (not in a function); did you mean 'tpm_pm_resume'? > 615 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume); > | ^~~~~~~~~~~~~~ > > Remove the #ifdef check. > > Fixes: 2249200ee420 ("tpm: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> I hit the same issue during my build tests. Thanks for your patch. Tested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Best regards Uwe [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tpm: remove extraneous #ifdef 2026-09-15 20:12 [PATCH] tpm: remove extraneous #ifdef Arnd Bergmann 2026-09-17 5:53 ` Uwe Kleine-König @ 2026-09-18 0:58 ` Jarkko Sakkinen 2026-09-18 1:01 ` Jarkko Sakkinen 1 sibling, 1 reply; 9+ messages in thread From: Jarkko Sakkinen @ 2026-09-18 0:58 UTC (permalink / raw) To: Arnd Bergmann Cc: Peter Huewe, Li Jun, Arnd Bergmann, Jason Gunthorpe, linux-integrity, linux-kernel On Tue, Sep 15, 2026 at 10:12:58PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Changing to DEFINE_SIMPLE_DEV_PM_OPS() broke here because the > tpm_inf_resume() function is hidden in an #ifdef: > > drivers/char/tpm/tpm_infineon.c:615:61: error: 'tpm_inf_resume' undeclared here (not in a function); did you mean 'tpm_pm_resume'? > 615 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume); > | ^~~~~~~~~~~~~~ > > Remove the #ifdef check. > > Fixes: 2249200ee420 ("tpm: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/char/tpm/tpm_infineon.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c > index 84a0d3e5f679..d6edd2ca39a5 100644 > --- a/drivers/char/tpm/tpm_infineon.c > +++ b/drivers/char/tpm/tpm_infineon.c > @@ -594,7 +594,6 @@ static void tpm_inf_pnp_remove(struct pnp_dev *dev) > } > } > > -#ifdef CONFIG_PM_SLEEP > static int tpm_inf_resume(struct device *dev) > { > /* Re-configure TPM after suspending */ > @@ -611,7 +610,7 @@ static int tpm_inf_resume(struct device *dev) > tpm_data_out(RESET_LP_IRQC_DISABLE, CMD); > return tpm_pm_resume(dev); > } > -#endif > + > static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume); > > static struct pnp_driver tpm_inf_pnp_driver = { > -- > 2.53.0 > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> BR, Jarkko ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tpm: remove extraneous #ifdef 2026-09-18 0:58 ` Jarkko Sakkinen @ 2026-09-18 1:01 ` Jarkko Sakkinen 2026-09-18 1:05 ` Jarkko Sakkinen 2026-09-18 5:49 ` Arnd Bergmann 0 siblings, 2 replies; 9+ messages in thread From: Jarkko Sakkinen @ 2026-09-18 1:01 UTC (permalink / raw) To: Arnd Bergmann Cc: Peter Huewe, Li Jun, Arnd Bergmann, Jason Gunthorpe, linux-integrity, linux-kernel On Fri, Sep 18, 2026 at 03:58:11AM +0300, Jarkko Sakkinen wrote: > On Tue, Sep 15, 2026 at 10:12:58PM +0200, Arnd Bergmann wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > > > Changing to DEFINE_SIMPLE_DEV_PM_OPS() broke here because the > > tpm_inf_resume() function is hidden in an #ifdef: > > > > drivers/char/tpm/tpm_infineon.c:615:61: error: 'tpm_inf_resume' undeclared here (not in a function); did you mean 'tpm_pm_resume'? > > 615 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume); > > | ^~~~~~~~~~~~~~ > > > > Remove the #ifdef check. > > > > Fixes: 2249200ee420 ("tpm: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr()") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > --- > > drivers/char/tpm/tpm_infineon.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c > > index 84a0d3e5f679..d6edd2ca39a5 100644 > > --- a/drivers/char/tpm/tpm_infineon.c > > +++ b/drivers/char/tpm/tpm_infineon.c > > @@ -594,7 +594,6 @@ static void tpm_inf_pnp_remove(struct pnp_dev *dev) > > } > > } > > > > -#ifdef CONFIG_PM_SLEEP > > static int tpm_inf_resume(struct device *dev) > > { > > /* Re-configure TPM after suspending */ > > @@ -611,7 +610,7 @@ static int tpm_inf_resume(struct device *dev) > > tpm_data_out(RESET_LP_IRQC_DISABLE, CMD); > > return tpm_pm_resume(dev); > > } > > -#endif > > + > > static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume); > > > > static struct pnp_driver tpm_inf_pnp_driver = { > > -- > > 2.53.0 > > > > > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> I pushed this to for-next-tpm, which mirrors to linux-next. However, since this is -next only bug, I guess I should squash these to the original commit? Just sanity checking before taking action :-) BR, Jarkko ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tpm: remove extraneous #ifdef 2026-09-18 1:01 ` Jarkko Sakkinen @ 2026-09-18 1:05 ` Jarkko Sakkinen 2026-09-18 5:44 ` Uwe Kleine-König 2026-09-18 5:49 ` Arnd Bergmann 1 sibling, 1 reply; 9+ messages in thread From: Jarkko Sakkinen @ 2026-09-18 1:05 UTC (permalink / raw) To: Arnd Bergmann Cc: Peter Huewe, Li Jun, Arnd Bergmann, Jason Gunthorpe, linux-integrity, linux-kernel On Fri, Sep 18, 2026 at 04:01:57AM +0300, Jarkko Sakkinen wrote: > On Fri, Sep 18, 2026 at 03:58:11AM +0300, Jarkko Sakkinen wrote: > > On Tue, Sep 15, 2026 at 10:12:58PM +0200, Arnd Bergmann wrote: > > > From: Arnd Bergmann <arnd@arndb.de> > > > > > > Changing to DEFINE_SIMPLE_DEV_PM_OPS() broke here because the > > > tpm_inf_resume() function is hidden in an #ifdef: > > > > > > drivers/char/tpm/tpm_infineon.c:615:61: error: 'tpm_inf_resume' undeclared here (not in a function); did you mean 'tpm_pm_resume'? > > > 615 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume); > > > | ^~~~~~~~~~~~~~ > > > > > > Remove the #ifdef check. > > > > > > Fixes: 2249200ee420 ("tpm: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr()") > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > --- > > > drivers/char/tpm/tpm_infineon.c | 3 +-- > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > > > diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c > > > index 84a0d3e5f679..d6edd2ca39a5 100644 > > > --- a/drivers/char/tpm/tpm_infineon.c > > > +++ b/drivers/char/tpm/tpm_infineon.c > > > @@ -594,7 +594,6 @@ static void tpm_inf_pnp_remove(struct pnp_dev *dev) > > > } > > > } > > > > > > -#ifdef CONFIG_PM_SLEEP > > > static int tpm_inf_resume(struct device *dev) > > > { > > > /* Re-configure TPM after suspending */ > > > @@ -611,7 +610,7 @@ static int tpm_inf_resume(struct device *dev) > > > tpm_data_out(RESET_LP_IRQC_DISABLE, CMD); > > > return tpm_pm_resume(dev); > > > } > > > -#endif > > > + > > > static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume); > > > > > > static struct pnp_driver tpm_inf_pnp_driver = { > > > -- > > > 2.53.0 > > > > > > > > > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> > > I pushed this to for-next-tpm, which mirrors to linux-next. > > However, since this is -next only bug, I guess I should squash these to > the original commit? > > Just sanity checking before taking action :-) My suggestion would be to amend Co-authored-by to the original commit message as two bug fixes is significant amount of effort to make the change right. BR, Jarkko ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tpm: remove extraneous #ifdef 2026-09-18 1:05 ` Jarkko Sakkinen @ 2026-09-18 5:44 ` Uwe Kleine-König 2026-09-24 11:27 ` Jarkko Sakkinen 0 siblings, 1 reply; 9+ messages in thread From: Uwe Kleine-König @ 2026-09-18 5:44 UTC (permalink / raw) To: Jarkko Sakkinen Cc: Arnd Bergmann, Peter Huewe, Li Jun, Arnd Bergmann, Jason Gunthorpe, linux-integrity, linux-kernel [-- Attachment #1: Type: text/plain, Size: 853 bytes --] Hello Jarkko, On Fri, Sep 18, 2026 at 04:05:22AM +0300, Jarkko Sakkinen wrote: > On Fri, Sep 18, 2026 at 04:01:57AM +0300, Jarkko Sakkinen wrote: > > I pushed this to for-next-tpm, which mirrors to linux-next. I don't spot it in https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git for-next-tpm , do I look at the wrong tree? > > However, since this is -next only bug, I guess I should squash these to > > the original commit? > > > > Just sanity checking before taking action :-) > > My suggestion would be to amend Co-authored-by to the original commit > message as two bug fixes is significant amount of effort to make the > change right. I don't care much about my Tested-by: tag, so feel free to drop it. Promoting that to a Tested-by: on the squashed commit is wrong for sure. Best regards Uwe [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tpm: remove extraneous #ifdef 2026-09-18 5:44 ` Uwe Kleine-König @ 2026-09-24 11:27 ` Jarkko Sakkinen 0 siblings, 0 replies; 9+ messages in thread From: Jarkko Sakkinen @ 2026-09-24 11:27 UTC (permalink / raw) To: Uwe Kleine-König Cc: Arnd Bergmann, Peter Huewe, Li Jun, Arnd Bergmann, Jason Gunthorpe, linux-integrity, linux-kernel On Fri, Sep 18, 2026 at 07:44:30AM +0200, Uwe Kleine-König wrote: > Hello Jarkko, > > On Fri, Sep 18, 2026 at 04:05:22AM +0300, Jarkko Sakkinen wrote: > > On Fri, Sep 18, 2026 at 04:01:57AM +0300, Jarkko Sakkinen wrote: > > > I pushed this to for-next-tpm, which mirrors to linux-next. > > I don't spot it in > > https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git for-next-tpm > > , do I look at the wrong tree? > > > > However, since this is -next only bug, I guess I should squash these to > > > the original commit? > > > > > > Just sanity checking before taking action :-) > > > > My suggestion would be to amend Co-authored-by to the original commit > > message as two bug fixes is significant amount of effort to make the > > change right. > > I don't care much about my Tested-by: tag, so feel free to drop it. > Promoting that to a Tested-by: on the squashed commit is wrong for sure. > > Best regards > Uwe Sorry I had my tree in bad state as per syncing with remotes. I now squashed fix to the original commit from Li. Br, Jarkko ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tpm: remove extraneous #ifdef 2026-09-18 1:01 ` Jarkko Sakkinen 2026-09-18 1:05 ` Jarkko Sakkinen @ 2026-09-18 5:49 ` Arnd Bergmann 2026-09-24 11:28 ` Jarkko Sakkinen 1 sibling, 1 reply; 9+ messages in thread From: Arnd Bergmann @ 2026-09-18 5:49 UTC (permalink / raw) To: Jarkko Sakkinen, Arnd Bergmann Cc: Peter Huewe, Li Jun, Jason Gunthorpe, linux-integrity, linux-kernel On Fri, Sep 18, 2026, at 03:01, Jarkko Sakkinen wrote: > On Fri, Sep 18, 2026 at 03:58:11AM +0300, Jarkko Sakkinen wrote: > I pushed this to for-next-tpm, which mirrors to linux-next. > > However, since this is -next only bug, I guess I should squash these to > the original commit? Yes, please do, it's just a drive-by patch, which I find easier to do than reporting it as a bug. No need for Co-authored-by here either. Arnd ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tpm: remove extraneous #ifdef 2026-09-18 5:49 ` Arnd Bergmann @ 2026-09-24 11:28 ` Jarkko Sakkinen 0 siblings, 0 replies; 9+ messages in thread From: Jarkko Sakkinen @ 2026-09-24 11:28 UTC (permalink / raw) To: Arnd Bergmann Cc: Arnd Bergmann, Peter Huewe, Li Jun, Jason Gunthorpe, linux-integrity, linux-kernel On Fri, Sep 18, 2026 at 07:49:12AM +0200, Arnd Bergmann wrote: > On Fri, Sep 18, 2026, at 03:01, Jarkko Sakkinen wrote: > > On Fri, Sep 18, 2026 at 03:58:11AM +0300, Jarkko Sakkinen wrote: > > > I pushed this to for-next-tpm, which mirrors to linux-next. > > > > However, since this is -next only bug, I guess I should squash these to > > the original commit? > > Yes, please do, it's just a drive-by patch, which I find easier > to do than reporting it as a bug. > > No need for Co-authored-by here either. > > Arnd Thank you. I've updated my tree accordingly. BR, Jarkko ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-09-24 11:28 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-15 20:12 [PATCH] tpm: remove extraneous #ifdef Arnd Bergmann 2026-09-17 5:53 ` Uwe Kleine-König 2026-09-18 0:58 ` Jarkko Sakkinen 2026-09-18 1:01 ` Jarkko Sakkinen 2026-09-18 1:05 ` Jarkko Sakkinen 2026-09-18 5:44 ` Uwe Kleine-König 2026-09-24 11:27 ` Jarkko Sakkinen 2026-09-18 5:49 ` Arnd Bergmann 2026-09-24 11:28 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox