Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3785198ybx; Mon, 4 Nov 2019 02:53:23 -0800 (PST) X-Google-Smtp-Source: APXvYqxGy3aWhNuHgNyoSFzKeWQxAQmOC2GX7yjbP6NGHmmSqwslxCyjAS2OqnssoMqBrS8ESkU1 X-Received: by 2002:a17:906:c7d5:: with SMTP id dc21mr8172459ejb.267.1572864803091; Mon, 04 Nov 2019 02:53:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572864803; cv=none; d=google.com; s=arc-20160816; b=SyzT+Mpyq46oA+XUJXLCAh9rn6bmKWNK96YqRNzC4MeyzFazsJUhyVrkHiOhjwvbo4 e/c49lhiRkCUPeWRb3igRWYSUfo8GcxdCFMla+Y6L+OOSqel6ThfdgSMPqsXa8pWttTf khlvXhO1OPtcXXbNeNR+hMy2fofVcZNUS2aQfjP5AiplZiy0mVq9Jve99ppEl/BN5CWA pBBJhfbdtoXXp6CjY8bOGtwMTpctGsQVDUGOnD7mlfC7DN65UaqO6FcewQI+5wXl49W5 4dZ+APcBRXL/uW/dUAhd7aGKXjkrjtG6j8SV6mTIaCASTx482vp4syt1Yd0UAuQqLVsI pfFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=b48iaoPITnaoCOE1B5Pd+2Grp2cJ6vzy0P1JHA2PnvQ=; b=Kf+il3URbP6aoovuOHhVElfSEW4d/Nzw/BZa39QpYAzaG5/hc+Y6gdNrDGsxPu69xk tWWlcSq80MJ3WSco4n+Y6rk95ARrWtpMpsnV6BYxU3+Fc1/pSNT7nSno5mU1g1UtvNn2 AfKKl+IwDor+6xTAsGsR5NqrEnz7eAbUqmQ70PZ7e0W12HjVJQcRopwzoomovVXEJkmp CBnEZiXOoSOS42rGc32RNwwGk2KNQXOVzBLWxnfM/OUqNRia5lPIzJJTbNaW6dsOjQAQ 0u8HjbbWaYkmtts5oMunxNlJnXd8rydZALhVGB84MRCzEGfIuxL1Urjd4xqU4j/dU6zg baAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd8si10982476ejb.194.2019.11.04.02.52.59; Mon, 04 Nov 2019 02:53:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbfKDKuN (ORCPT + 99 others); Mon, 4 Nov 2019 05:50:13 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5257 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726071AbfKDKuN (ORCPT ); Mon, 4 Nov 2019 05:50:13 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DE46E2099A79968604F1; Mon, 4 Nov 2019 18:50:10 +0800 (CST) Received: from [127.0.0.1] (10.177.96.96) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Mon, 4 Nov 2019 18:50:07 +0800 Subject: Re: [PATCH -next] usb: gadget: Add dependency for USB_TEGRA_XUDC To: Thierry Reding CC: , , , , , , , , References: <20191104025945.172620-1-maowenan@huawei.com> <20191104100410.GB996639@ulmo> From: maowenan Message-ID: <51315499-99d0-eca3-a7df-b8dd84628bbd@huawei.com> Date: Mon, 4 Nov 2019 18:50:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: <20191104100410.GB996639@ulmo> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/4 18:04, Thierry Reding wrote: > On Mon, Nov 04, 2019 at 10:59:45AM +0800, Mao Wenan wrote: >> If CONFIG_USB_TEGRA_XUDC=y and CONFIG_USB_ROLE_SWITCH=m, >> below erros can be seen: >> drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_remove': >> tegra-xudc.c:(.text+0x6b0): undefined reference to `usb_role_switch_unregister' >> drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_probe': >> tegra-xudc.c:(.text+0x1b88): undefined reference to `usb_role_switch_register' >> drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_usb_role_sw_work': >> tegra-xudc.c:(.text+0x5ecc): undefined reference to `usb_role_switch_get_role' >> >> This patch add dependency USB_ROLE_SWITCH for UDC driver. >> >> Fixes: 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller") >> Signed-off-by: Mao Wenan >> --- >> drivers/usb/gadget/udc/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig >> index acaec3a..d103154 100644 >> --- a/drivers/usb/gadget/udc/Kconfig >> +++ b/drivers/usb/gadget/udc/Kconfig >> @@ -445,6 +445,7 @@ config USB_TEGRA_XUDC >> tristate "NVIDIA Tegra Superspeed USB 3.0 Device Controller" >> depends on ARCH_TEGRA || COMPILE_TEST >> depends on PHY_TEGRA_XUSB >> + depends on USB_ROLE_SWITCH > > It looks like most other drivers that use the USB role switch class do > "select" here. Now, that's suboptimal because USB_ROLE_SWITCH is a user- > visible symbol, which can lead to conflicts, so it should be avoided. I > think that in this case it might make sense to hide USB_ROLE_SWITCH and > then convert all "depends on USB_ROLE_SWITCH" occurrences to "select > USB_ROLE_SWITCH". The USB role switch class is, after all, not useful by > itself. It always needs a host and/or gadget driver to make use of it. > Thanks, I send v2 and change 'depends on' to 'select' for this patch. > Thierry >