All of lore.kernel.org
 help / color / mirror / Atom feed
From: Seungjin Bae <eeodqql09@gmail.com>
To: Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	pip-izony <eeodqql09@gmail.com>
Subject: [PATCH] usb: host: xhci-plat: fix incorrect type for of_match variable in xhci_plat_probe()
Date: Wed, 18 Jun 2025 15:27:14 -0400	[thread overview]
Message-ID: <20250618192713.20668-2-eeodqql09@gmail.com> (raw)
In-Reply-To: <2025061804-existing-taking-1f9c@gregkh>

From: pip-izony <eeodqql09@gmail.com>

The variable `of_match` was incorrectly declared as a `bool`.
It is assigned the return value of of_match_device(), which is a pointer of
type `const struct of_device_id *`.

Fixes: 16b7e0cccb243 ("USB: xhci-plat: fix legacy PHY double init")

Signed-off-by: Seungjin Bae <eeodqql09@gmail.com>
---
 drivers/usb/host/xhci-plat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 6dab142e7278..49eb874b1d81 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -152,7 +152,7 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
 	int			ret;
 	int			irq;
 	struct xhci_plat_priv	*priv = NULL;
-	bool			of_match;
+	const struct of_device_id *of_match;
 
 	if (usb_disabled())
 		return -ENODEV;
-- 
2.43.0

Hello Greg,

Thank you for your review and the helpful feedback.

I've corrected Signed-off-by line to use my real name.
I also updated Fixes tag in the commit.

Regarding the original issue:
I'm not exactly sure why the compiler didn't catch this,
but I assume implicit casting from pointer to bool is allowed in this context.

Thank you for your email!

Best regards,
Seungjin Bae

  reply	other threads:[~2025-06-18 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-17 20:45 [PATCH] usb: host: xhci-plat: fix incorrect type for of_match variable in xhci_plat_probe() pip-izony
2025-06-18  6:02 ` Greg Kroah-Hartman
2025-06-18 19:27   ` Seungjin Bae [this message]
2025-06-19  4:01     ` Greg Kroah-Hartman
2025-06-19  5:45       ` [PATCH v3] " Seungjin Bae
2025-06-19  5:57       ` [PATCH v4] " Seungjin Bae

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=20250618192713.20668-2-eeodqql09@gmail.com \
    --to=eeodqql09@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /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.