linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerry Snitselaar <jsnitsel@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-integrity@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] tpm: Switch to platform_get_irq_optional()
Date: Fri, 25 Oct 2019 07:12:05 -0700	[thread overview]
Message-ID: <20191025141205.vejqamwsppvdmp7a@cantor> (raw)
In-Reply-To: <20191025091448.4424-1-hdegoede@redhat.com>

On Fri Oct 25 19, Hans de Goede wrote:
>platform_get_irq() calls dev_err() on an error. As the IRQ usage in the
>tpm_tis driver is optional, this is undesirable.
>
>Specifically this leads to this new false-positive error being logged:
>[    5.135413] tpm_tis MSFT0101:00: IRQ index 0 not found
>
>This commit switches to platform_get_irq_optional(), which does not log
>an error, fixing this.
>
>Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()"
>Cc: <stable@vger.kernel.org> # 5.4.x
>Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>

>---
>Changes in v2:
>- Slightly reword commit msg, add Fixes tag
>---
> drivers/char/tpm/tpm_tis.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
>index e4fdde93ed4c..e7df342a317d 100644
>--- a/drivers/char/tpm/tpm_tis.c
>+++ b/drivers/char/tpm/tpm_tis.c
>@@ -286,7 +286,7 @@ static int tpm_tis_plat_probe(struct platform_device *pdev)
> 	}
> 	tpm_info.res = *res;
>
>-	tpm_info.irq = platform_get_irq(pdev, 0);
>+	tpm_info.irq = platform_get_irq_optional(pdev, 0);
> 	if (tpm_info.irq <= 0) {
> 		if (pdev != force_pdev)
> 			tpm_info.irq = -1;
>-- 
>2.23.0
>


  reply	other threads:[~2019-10-25 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  9:14 [PATCH v2] tpm: Switch to platform_get_irq_optional() Hans de Goede
2019-10-25 14:12 ` Jerry Snitselaar [this message]
2019-10-28 20:47 ` 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=20191025141205.vejqamwsppvdmp7a@cantor \
    --to=jsnitsel@redhat.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).