From: Jarkko Sakkinen <jarkko@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Peter Huewe <peterhuewe@gmx.de>, Li Jun <lijun01@kylinos.cn>,
Arnd Bergmann <arnd@arndb.de>, Jason Gunthorpe <jgg@ziepe.ca>,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: remove extraneous #ifdef
Date: Fri, 18 Sep 2026 04:05:22 +0300 [thread overview]
Message-ID: <aqyOUgIa4lsUwO0I@kernel.org> (raw)
In-Reply-To: <aqyNgA5NdSTdrP_6@kernel.org>
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
next prev parent reply other threads:[~2026-09-18 1:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aqyOUgIa4lsUwO0I@kernel.org \
--to=jarkko@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=jgg@ziepe.ca \
--cc=lijun01@kylinos.cn \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.