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=-5.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_PASS,URIBL_BLOCKED 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 B8F91C43441 for ; Fri, 9 Nov 2018 00:46:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 72D4B20855 for ; Fri, 9 Nov 2018 00:46:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="WJAgE/hG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72D4B20855 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727657AbeKIKZG (ORCPT ); Fri, 9 Nov 2018 05:25:06 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36670 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbeKIKZG (ORCPT ); Fri, 9 Nov 2018 05:25:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rgXEPV+DgXtVbWuQF0riXY25Pi1hlkzxJo3CxP13Qmo=; b=WJAgE/hGmwZ1F/ubXg0sUZhVI hPpu+ch6gFGNaOsd7BmlWFnPQOZiowtI8wPRG0yGqYKdpZVm3qmgUyA4djdoTMOHzFPhmrrD4nrUm bjft3ce4jnXI9dPD8P2fT4qfHm5Nn9hOBUFVKv3KDZIn0RWehKvHa+4QgDGvkXdB/2HbHlmXKFpU4 sZEizpN4TawIcZoTcHVJvxDyAYfhZqqS6l2Dgg14A0hiBU0GAAB624Mzu4+B8x1lcFBZBkdL5U6rN hnEaGvVb8SvmFry6AiLLdOtGz6Z189VETicFGr4ovgvBktzEXmx9odMPN7RJErzgi+rP5xjzDY47y 9CkRIMRKg==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKuwq-00011Q-Op; Fri, 09 Nov 2018 00:46:57 +0000 Subject: Re: drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c:96: undefined reference to `thermal_zone_device_register' To: kbuild test robot , Arnd Bergmann Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, Ganesh Goudar , David Miller , "netdev@vger.kernel.org" References: <201811081531.m0SEgZ58%fengguang.wu@intel.com> From: Randy Dunlap Message-ID: <83b7b294-4aa5-2e66-35de-df96cefc86fe@infradead.org> Date: Thu, 8 Nov 2018 16:46:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <201811081531.m0SEgZ58%fengguang.wu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [adding netdev + maintainers] On 11/7/18 11:08 PM, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 85758777c2a227fd1541b6dd122a08ab79c347ce > commit: e70a57fa59bb7fefe063780a49e063d0d0f61863 cxgb4: fix thermal configuration dependencies > date: 4 weeks ago > config: x86_64-randconfig-s0-11081213 (attached as .config) > compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 > reproduce: > git checkout e70a57fa59bb7fefe063780a49e063d0d0f61863 > # save the attached .config to linux build tree > make ARCH=x86_64 > > All errors (new ones prefixed by >>): > > drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_init': >>> drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c:96: undefined reference to `thermal_zone_device_register' > drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_remove': >>> drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c:112: undefined reference to `thermal_zone_device_unregister' > Hi, There was a Kconfig WARNING (clue!) before the build errors: WARNING: unmet direct dependencies detected for CHELSIO_T4 Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_CHELSIO [=y] && PCI [=y] && (IPV6 [=n] || IPV6 [=n]=n) && (THERMAL [=m] || !THERMAL [=m]) Selected by [y]: - SCSI_CXGB4_ISCSI [=y] && SCSI_LOWLEVEL [=y] && SCSI [=y] && PCI [=y] && INET [=y] && (IPV6 [=n] || IPV6 [=n]=n) That says that the problem is with CONFIG_THERMAL=m while CONFIG_CHELSIO_T4=y. This is caused by drivers/scsi/cxgbi/cxgb4i/Kconfig and its use of "select" instead of "depends on": config SCSI_CXGB4_ISCSI tristate "Chelsio T4 iSCSI support" depends on PCI && INET && (IPV6 || IPV6=n) select NETDEVICES select ETHERNET select NET_VENDOR_CHELSIO select CHELSIO_T4 select CHELSIO_LIB select SCSI_ISCSI_ATTRS ---help--- This driver supports iSCSI offload for the Chelsio T4 devices. > vim +96 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c > > b1871915 Ganesh Goudar 2018-10-09 72 > b1871915 Ganesh Goudar 2018-10-09 73 int cxgb4_thermal_init(struct adapter *adap) > b1871915 Ganesh Goudar 2018-10-09 74 { > b1871915 Ganesh Goudar 2018-10-09 75 struct ch_thermal *ch_thermal = &adap->ch_thermal; > b1871915 Ganesh Goudar 2018-10-09 76 int num_trip = CXGB4_NUM_TRIPS; > b1871915 Ganesh Goudar 2018-10-09 77 u32 param, val; > b1871915 Ganesh Goudar 2018-10-09 78 int ret; > b1871915 Ganesh Goudar 2018-10-09 79 > b1871915 Ganesh Goudar 2018-10-09 80 /* on older firmwares we may not get the trip temperature, > b1871915 Ganesh Goudar 2018-10-09 81 * set the num of trips to 0. > b1871915 Ganesh Goudar 2018-10-09 82 */ > b1871915 Ganesh Goudar 2018-10-09 83 param = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) | > b1871915 Ganesh Goudar 2018-10-09 84 FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DEV_DIAG) | > b1871915 Ganesh Goudar 2018-10-09 85 FW_PARAMS_PARAM_Y_V(FW_PARAM_DEV_DIAG_MAXTMPTHRESH)); > b1871915 Ganesh Goudar 2018-10-09 86 > b1871915 Ganesh Goudar 2018-10-09 87 ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, > b1871915 Ganesh Goudar 2018-10-09 88 ¶m, &val); > b1871915 Ganesh Goudar 2018-10-09 89 if (ret < 0) { > b1871915 Ganesh Goudar 2018-10-09 90 num_trip = 0; /* could not get trip temperature */ > b1871915 Ganesh Goudar 2018-10-09 91 } else { > b1871915 Ganesh Goudar 2018-10-09 92 ch_thermal->trip_temp = val * 1000; > b1871915 Ganesh Goudar 2018-10-09 93 ch_thermal->trip_type = THERMAL_TRIP_CRITICAL; > b1871915 Ganesh Goudar 2018-10-09 94 } > b1871915 Ganesh Goudar 2018-10-09 95 > b1871915 Ganesh Goudar 2018-10-09 @96 ch_thermal->tzdev = thermal_zone_device_register("cxgb4", num_trip, > b1871915 Ganesh Goudar 2018-10-09 97 0, adap, > b1871915 Ganesh Goudar 2018-10-09 98 &cxgb4_thermal_ops, > b1871915 Ganesh Goudar 2018-10-09 99 NULL, 0, 0); > b1871915 Ganesh Goudar 2018-10-09 100 if (IS_ERR(ch_thermal->tzdev)) { > b1871915 Ganesh Goudar 2018-10-09 101 ret = PTR_ERR(ch_thermal->tzdev); > b1871915 Ganesh Goudar 2018-10-09 102 dev_err(adap->pdev_dev, "Failed to register thermal zone\n"); > b1871915 Ganesh Goudar 2018-10-09 103 ch_thermal->tzdev = NULL; > b1871915 Ganesh Goudar 2018-10-09 104 return ret; > b1871915 Ganesh Goudar 2018-10-09 105 } > b1871915 Ganesh Goudar 2018-10-09 106 return 0; > b1871915 Ganesh Goudar 2018-10-09 107 } > b1871915 Ganesh Goudar 2018-10-09 108 > b1871915 Ganesh Goudar 2018-10-09 109 int cxgb4_thermal_remove(struct adapter *adap) > b1871915 Ganesh Goudar 2018-10-09 110 { > b1871915 Ganesh Goudar 2018-10-09 111 if (adap->ch_thermal.tzdev) > b1871915 Ganesh Goudar 2018-10-09 @112 thermal_zone_device_unregister(adap->ch_thermal.tzdev); > > :::::: The code at line 96 was first introduced by commit > :::::: b187191577629b5358acf4e234809ee8d441ceb4 cxgb4: Add thermal zone support > > :::::: TO: Ganesh Goudar > :::::: CC: David S. Miller > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation > ciao. -- ~Randy