From: Jack Pham <quic_jackp@quicinc.com>
To: Guan Jing <guanjing6@huawei.com>
Cc: <balbi@kernel.org>, <gregkh@linuxfoundation.org>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next v2] usb: dwc3: include extcon.h to fix compile error
Date: Wed, 11 May 2022 09:42:06 -0700 [thread overview]
Message-ID: <20220511164206.GB5637@jackp-linux.qualcomm.com> (raw)
In-Reply-To: <20220511022622.168486-1-guanjing6@huawei.com>
On Wed, May 11, 2022 at 10:26:22AM +0800, Guan Jing wrote:
> If dwc3 is not include extcon.h, the dwc3 driver
> will fail to link:
That doesn't make sense... If the header/definitions aren't present you
should certainly see errors earlier on in the compilation of the object,
not the linker.
> drivers/usb/dwc3/core.o: In function `dwc3_probe':
> core.c:(.text+0x1095): undefined reference to `extcon_get_edev_by_phandle'
> core.c:(.text+0x10bd): undefined reference to `extcon_get_extcon_dev'
>
> Add miss #include <linux/extcon.h> to fix this error.
>
> Fixes: 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Guan Jing <guanjing6@huawei.com>
> ---
> drivers/usb/dwc3/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 950e238c65bf..e619a3ef6c46 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -28,6 +28,7 @@
> #include <linux/pinctrl/consumer.h>
> #include <linux/reset.h>
> #include <linux/bitfield.h>
> +#include <linux/extcon.h>
>
> #include <linux/usb/ch9.h>
> #include <linux/usb/gadget.h>
Below this we also have
#include <linux/usb/otg.h>
Which itself has
#include <linux/usb/phy.h>
Which also does
#include <linux/extcon.h>
So extcon.h would have already been included via this nesting...
Jack
next prev parent reply other threads:[~2022-05-11 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 2:26 Guan Jing
2022-05-11 16:42 ` Jack Pham [this message]
2022-05-12 7:38 ` Greg KH
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=20220511164206.GB5637@jackp-linux.qualcomm.com \
--to=quic_jackp@quicinc.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=guanjing6@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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
Powered by JetHome