Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1276526imn; Sun, 31 Jul 2022 00:02:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Cpcvql2+0T7iTDAEXqZKBZxv+mY1aVenJEeaXEPBEk9EwWTfikZPXxExySIlggQXpES69 X-Received: by 2002:a17:90a:bb12:b0:1f2:59a7:657a with SMTP id u18-20020a17090abb1200b001f259a7657amr12960998pjr.151.1659250963924; Sun, 31 Jul 2022 00:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659250963; cv=none; d=google.com; s=arc-20160816; b=Ailwn2gRi7YuEIRupoxbZ8eUCFhmrs42l0x3ejW4uIap/KFYQsmrpYFuV0jfejf6hq zchnIm0Rysj3ILgKVDJjvaAQQQOd9PphwX8X0GTNJjCgYQ/P8r//pw0SOHpzUYeVX+2c 5qAWfV3J/cTWcrFKKDscCoWbwpyh/nO53x+IpKn6NlnbcmIgNWgsyjasnTp8dbm/J26v 20VrCemoF5nFbyCTgpbbPPsIILooZbmWXwFajaDiwkk2eE4P24eCHvKh6PoFtDtch6YM zpQi9cAQN69o/pFu4ovvAqLS3F+LRoQ1ZO2bGD9XI8vA6cSPdy89d/90ufYFsCx/pgL6 mliw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zqtO3uZt9+T1koeAgCZ+PJaUEdw+iPxfmGhYKCo5TwM=; b=McXzQIu499mUGVDzBHnKjjTYDWbolNgEuA3G+L8ai6zQEZYdOBG71xhL+T5WWx5439 yB0jxWHYIZS1WvU55F6vXk/83mh4DM2L4atIECB7GhAvxBVh3T0VOPduChMqc8+5W6Bv ozRP7an0gOBrz6a0m4n5YVj87RKjzZQgw8iW48WNOBjYvv8xkyjSwjQ/LNOpBMgY8EgR qMR0uCYS6B/NnSBI67AbAsv1t8SmAmqDRgL8UXHu2ZL8Bke8whEsEG/AjxrNsQOQStQI eU5UsTdl+sOSwc0i9YGPi3skmnWtlYPD3MoHmXsEj+T4Q2s4wD8NlqY0BT071BD93tzj /l5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ag/+5X4e"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9-20020a1709026bc900b0016da027a727si9112627plt.116.2022.07.31.00.01.45; Sun, 31 Jul 2022 00:02:43 -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=@linaro.org header.s=google header.b="Ag/+5X4e"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236360AbiGaGd3 (ORCPT + 99 others); Sun, 31 Jul 2022 02:33:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231989AbiGaGdZ (ORCPT ); Sun, 31 Jul 2022 02:33:25 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA8C13DC6 for ; Sat, 30 Jul 2022 23:33:24 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id l14so6006987qtv.4 for ; Sat, 30 Jul 2022 23:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=zqtO3uZt9+T1koeAgCZ+PJaUEdw+iPxfmGhYKCo5TwM=; b=Ag/+5X4ew7HsQZiIo+tLvovcbQAq2aTjSu7qqq/RUa34QI9RsfGAsGG6FRljWpom4a KT6z+cjigdHbgoQD0spzfZ7d9LH6zjUCEqZEj0OrG+zDkbnf0TXDMF+Ox1KKaA992bx7 2u3qUMn+wbMr4Yzg3r5a9o7QNVD5Tdpjab8fHWajKI3R1CeMeGIfj52q1RBkKswVvGYD vFluFuRAGbU7ZTuPAFsTz4l78LAiyvCe9zSo/UjD2coPNog9lD2AwkDzaJrKrYjuQ1CU NrE04LxdYqRRdYdH48KbJKk6q4/RtTDU4RiJ5ROC5yvMSoccdgQMdbo1roJnKGw8jWOD Apbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=zqtO3uZt9+T1koeAgCZ+PJaUEdw+iPxfmGhYKCo5TwM=; b=2RJbuWuFF/qRFLtqhTD80eXtg7AJuiVIQbp3HZ6G6UdImAAsQxzQsAENWagt0AJbus t7MgcBnRSkLlsExc6enaRTBosJLfRpfg/76horKx/AsFvg3ELaEhrQHQKZv21yj7wbvy fZAqD5cfHB8aq04rTG6VqlFI4xrxOScAV2ZezFDUwuFNAPqndUbWIt8dFBkrihlLRNJ6 pGAGiNDcVzVChRFbUynpn6c0Cu256OrHawNFy5hr/Z3Vc7Ek40PMlbrFKvvOTfqPr6QX Ab2Y1kUiXqiEhCvG2IPzXPHauhatsgfqqF5w1MI4V/ETqT8nGeirBLxHLzzbK24bXgsf iLug== X-Gm-Message-State: AJIora8EJoBtvw0uROENqL6RS2Ge+4X3W9fAszAT0RdL/fUva8nU0ls8 vDcZR3Tj3gj7eMJ831QiRDSiaaOreE2x030HV4y+cA== X-Received: by 2002:a05:622a:451:b0:31f:4257:4eb2 with SMTP id o17-20020a05622a045100b0031f42574eb2mr9507979qtx.370.1659249203596; Sat, 30 Jul 2022 23:33:23 -0700 (PDT) MIME-Version: 1.0 References: <1659237530-436-1-git-send-email-quic_kriskura@quicinc.com> In-Reply-To: <1659237530-436-1-git-send-email-quic_kriskura@quicinc.com> From: Dmitry Baryshkov Date: Sun, 31 Jul 2022 09:33:12 +0300 Message-ID: Subject: Re: [PATCH] usb: dwc3: qcom: Provide stubs for dwc3_qcom_read_usb2_speed function To: Krishna Kurapati Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Felipe Balbi , Greg Kroah-Hartman , Philipp Zabel , Randy Dunlap , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Sun, 31 Jul 2022 at 06:19, Krishna Kurapati wrote: > > This patch intends to fix a build issue that is occurring due to Please refrain from the "This patch" phrase. See the Documentation/process/submitting-patches.rst for the suggestions for the commit message. > dwc3_qcom_read_usb2_speed function which uses usb_hub_find_child API > in its effors to get the speed of devices (HS/FS/LS) connected. > > usb_hub_find_child API is a part of usb core compiled into the kernel > when CONFIG_USB=y. In some builds (make randconfig for i386) > CONFIG_USB is not set and the usb core is not compiled into the > kernel causing linking errors. > > Provide stubs for dwc3_qcom_read_usb2_speed function to use > usb_hub_find_child API only if CONFIG_USB is set. Else return > USB_SPEED_UNKNOWN. The commit message describes the issue in terms of CONFIG_USB being compiled into the kernel or not. It is not clear if the issue manifests with CONFIG_USB=m (which is also 'not compiled into the kernel'). If I understand correctly, the cause for linking errors is not in the CONFIG_USB being not compiled into the kernel, but in CONFIG_USB being not enabled at all (which is possible since USB_DWC3 depends on USB || USB_GADGET). If my understanding is correct, I'd suggest changing the commit message to describe the cause rather than just the issue you observed on randconfig failure. > > Fixes: 6895ea55c385 (usb: dwc3: qcom: Configure wakeup interrupts during suspend) > Reported-by: Randy Dunlap > Signed-off-by: Krishna Kurapati > --- > drivers/usb/dwc3/dwc3-qcom.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > index c5e482f..bd8dc5a 100644 > --- a/drivers/usb/dwc3/dwc3-qcom.c > +++ b/drivers/usb/dwc3/dwc3-qcom.c > @@ -299,6 +299,7 @@ static void dwc3_qcom_interconnect_exit(struct dwc3_qcom *qcom) > icc_put(qcom->icc_path_apps); > } > > +#ifdef CONFIG_USB > static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom) > { > struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3); > @@ -318,6 +319,12 @@ static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom) > > return udev->speed; > } > +#else > +static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom) > +{ > + return USB_SPEED_UNKNOWN; > +} > +#endif > > static void dwc3_qcom_enable_wakeup_irq(int irq, unsigned int polarity) > { > -- > 2.7.4 > -- With best wishes Dmitry