Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1003175iob; Thu, 12 May 2022 09:04:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySiHQSuIwFZRaeItRi8hx/N2yRSQbnbc7e+7VOeoJgYCarhAb5nCNUaA9AYqcR/WK7lGGn X-Received: by 2002:a50:9b08:0:b0:42a:2d15:e15a with SMTP id o8-20020a509b08000000b0042a2d15e15amr7471592edi.361.1652371492312; Thu, 12 May 2022 09:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652371492; cv=none; d=google.com; s=arc-20160816; b=rsMEO4Wgf3zvRn4hPlnai3+svj1G42YTFCsLtX345nf49cTNTN2JLyigmcLve89Bsb WX9FRmQ8mEjj5cyS/Wncrfp+JUEb7fWbeCmo+XNHPYjqz6abAtXmQns9PVivTK0fk+gj XYirfeud/MvvsAJzSxVPpZfAt/NvSfKJacspvWXi577LdokZfhVwbA5886GU/xZp7vQ6 u1kbufHs07Yd94IS7lXWT/rUiYrQv+7jOxB2o7SWzyaPN0b4NqcZxlcBuieWzfXU5XAa 7cJmz8IueYvzK8Nkz69izdjCSUAojJBxM8Oueinp6XUCENylQyU96CXRWo2iWsJTh1oH VMBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lbqnRzCA4AJusA/+Im8zUQNaIw6T2LD8/Jmh9yj4tlw=; b=vssfOckpznBF8taUryHsFMh4CPUzmLUPumZZNaKAOZtDf3m8AtvZXSBeTTH8PwXhnQ uhL4Ungezde8n09xZeJbKJRYbHbFzAfg0m+UmocVEDQ00vuANSnMDL1TPC67kwDVM7hC +liWQGuh1KgYYQjoqxY0QDyqo+CLToV69ZTIKwJTiS1fwhzO2AP4wxGwMDFotTTDKIMj saMF+FQ+vnVRmKYUuhJgnu1puOI6+OBLQLUub8iKxUHajBYPCoMflUg4OR2KKgqhrHdf jE94OtIx9hbfx+eaSlHLlxOyCusT4TkfzdmsjYe9J9Pmr27RXqdcMKvOSO+9O9ufkbLB V/Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=nvbQnCJN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d24-20020a056402145800b00425d68387ccsi5815398edx.369.2022.05.12.09.04.26; Thu, 12 May 2022 09:04:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=nvbQnCJN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344906AbiEKQmN (ORCPT + 99 others); Wed, 11 May 2022 12:42:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344888AbiEKQmL (ORCPT ); Wed, 11 May 2022 12:42:11 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60E346220C; Wed, 11 May 2022 09:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652287330; x=1683823330; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=lbqnRzCA4AJusA/+Im8zUQNaIw6T2LD8/Jmh9yj4tlw=; b=nvbQnCJNcc7uWqw8e+xJeXDz+S7gqGxELXYGIoZu2ODzsZjLmY/IbBVT QVbOdePg/z0CFEmeo6F1opqWCw9CK0Fwy2Z5w5zb3ffZ6S90hQEhcKDab nVvjJ8aH7TVlfhJkJDF8KL/tWcV7CiHwi+xH1YLenBph4RRrsuwoZorG6 E=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 11 May 2022 09:42:09 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 09:42:09 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 11 May 2022 09:42:08 -0700 Received: from jackp-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 11 May 2022 09:42:08 -0700 Date: Wed, 11 May 2022 09:42:06 -0700 From: Jack Pham To: Guan Jing CC: , , , Subject: Re: [PATCH -next v2] usb: dwc3: include extcon.h to fix compile error Message-ID: <20220511164206.GB5637@jackp-linux.qualcomm.com> References: <20220511022622.168486-1-guanjing6@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220511022622.168486-1-guanjing6@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 to fix this error. > > Fixes: 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present") > Reported-by: Hulk Robot > Signed-off-by: Guan Jing > --- > 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 > #include > #include > +#include > > #include > #include Below this we also have #include Which itself has #include Which also does #include So extcon.h would have already been included via this nesting... Jack