From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0B22C433DB for ; Tue, 19 Jan 2021 08:30:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5789923121 for ; Tue, 19 Jan 2021 08:30:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5789923121 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 864D46B0161; Tue, 19 Jan 2021 03:30:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 815E88D002E; Tue, 19 Jan 2021 03:30:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 704E58D002C; Tue, 19 Jan 2021 03:30:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0205.hostedemail.com [216.40.44.205]) by kanga.kvack.org (Postfix) with ESMTP id 5C10E6B0161 for ; Tue, 19 Jan 2021 03:30:19 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 17275364F for ; Tue, 19 Jan 2021 08:30:19 +0000 (UTC) X-FDA: 77721852558.08.value25_14088e927550 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id E6EEB1819E62D for ; Tue, 19 Jan 2021 08:30:18 +0000 (UTC) X-HE-Tag: value25_14088e927550 X-Filterd-Recvd-Size: 5144 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Tue, 19 Jan 2021 08:30:17 +0000 (UTC) IronPort-SDR: 5ckUfY4mRBmYTvS28zKhddkaW47zP0DRK7y0vstkZbujf5QHhV9j8GrZtPrIngj4BatC+kz46c F1j/Jb+QFz+g== X-IronPort-AV: E=McAfee;i="6000,8403,9868"; a="166562003" X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="166562003" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 00:30:13 -0800 IronPort-SDR: jE6T+9YufDWwKUKPOz6iYQkmHWXKspY3Uu6UJAWPDh+wSrPwVOpz0EetHnW0e2HJL3z5lPF3Pv I2TxGcsHEAeQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="466608626" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 19 Jan 2021 00:30:09 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 19 Jan 2021 10:30:08 +0200 Date: Tue, 19 Jan 2021 10:30:08 +0200 From: Heikki Krogerus To: Jack Pham Cc: kernel test robot , Greg Kroah-Hartman , Mayank Rana , kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [linux-next:master 2519/4500] ucsi.c:undefined reference to `fwnode_usb_role_switch_get' Message-ID: <20210119083008.GA3170560@kuha.fi.intel.com> References: <202101181814.rQtj0Eqo-lkp@intel.com> <20210118204040.GA19773@jackp-linux.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210118204040.GA19773@jackp-linux.qualcomm.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jan 18, 2021 at 12:40:40PM -0800, Jack Pham wrote: > On Mon, Jan 18, 2021 at 06:52:23PM +0800, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > head: 93bf8b946e5f9a0b0c68155597b53fd8ccce2827 > > commit: 89795852c9c46b9b0701f7376d30a1c5ab4d146c [2519/4500] usb: typec: ucsi: Add support for USB role switch > > config: nios2-randconfig-m031-20210118 (attached as .config) > > compiler: nios2-linux-gcc (GCC) 9.3.0 > > reproduce (this is a W=1 build): > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=89795852c9c46b9b0701f7376d30a1c5ab4d146c > > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > > git fetch --no-tags linux-next master > > git checkout 89795852c9c46b9b0701f7376d30a1c5ab4d146c > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All errors (new ones prefixed by >>): > > > > nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_register_port': > > >> ucsi.c:(.text+0x15a8): undefined reference to `fwnode_usb_role_switch_get' > > ucsi.c:(.text+0x15a8): relocation truncated to fit: R_NIOS2_CALL26 against `fwnode_usb_role_switch_get' > > >> nios2-linux-ld: ucsi.c:(.text+0x15e8): undefined reference to `usb_role_switch_set_role' > > ucsi.c:(.text+0x15e8): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role' > > nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_handle_connector_change': > > >> ucsi.c:(.text+0x1b50): undefined reference to `usb_role_switch_set_role' > > ucsi.c:(.text+0x1b50): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role' > > nios2-linux-ld: ucsi.c:(.text+0x1c28): undefined reference to `usb_role_switch_set_role' > > ucsi.c:(.text+0x1c28): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role' > > > > Kconfig warnings: (for reference only) > > WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE > > Depends on TTY && HAS_IOMEM > > Selected by > > - EARLY_PRINTK > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > > I have no clue about the nios2, so not sure if this is an arch-specific > linker error or not. > > Hmm but the .config has the following: > > CONFIG_TYPEC_UCSI=y > CONFIG_USB_ROLE_SWITCH=m > > So I'm guessing this patch also requires a Kconfig change to disallow > the above combination? If so, should UCSI have a "depends" or a "select" > on USB_ROLE_SWITCH? Kconfig needs to prevent the UCSI driver from being built-in when the USB Role Switch Class is being build as module. That can be achieved with this trick (it's not ideal, but it works): depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH I'll send the fix. thanks, -- heikki