Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2798392pxb; Tue, 12 Oct 2021 13:47:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxniy2lVBytsB603sk9+guDVlcLv5lrZcj3VD4nBPYPH2S+sgSGKtIKcymcfP1h0YCdyONS X-Received: by 2002:a05:6a00:a10:b0:412:448c:89c7 with SMTP id p16-20020a056a000a1000b00412448c89c7mr33646569pfh.83.1634071661421; Tue, 12 Oct 2021 13:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634071661; cv=none; d=google.com; s=arc-20160816; b=0GvaKW1FE+Tnk5ivIXfo1ERbPjNOAcPXAXPsnfnCAuvqpcgXs5RWTKFF0JPWTilfln vHklC9MHLaP2RT2YYM/19LP2TCJfKRLTut3pFZTVI//AYAaCcE0p7eD4K4cXoZPnHMBo TRCNsOsza6a4ITMOpePFd6ij2JEaeObqpkuqeZlOdUCUG1Ch1Rku8+1eVcUIHeMf6YMZ 2gRPTbURQrT8g+yG9xnjTb0NH+ZMxRjrZXOmeW6KzPbNo22ePmDsvtJCQpWTGhLvrHJT F4HmG6BXg4/gicDKCEe0Q3LmF1gEZD7FxAKhMz2VOwuPHlauY88T48c3OvEzajeV8wDS zo3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sKGTat30RNCy2/FTRskvWCn5egJkoLenpbku9vap1/U=; b=1HCvZuLFdb9DhqX6JDoRj6bPhnpKRiyDmaRvSEq133oNCXnzrOVgw3hlzqhCGMGDrZ eGHXlMOZ3zXK23XzNGE7Hgz+ZZF2OL2X75V48gA+Dr1pWemSVFGTPhKA1M98b7opj8cJ 3wSXIdoBeCWnDvImvz6CJ1U0ExexIpXOhrxSM+ArqLvP6HN1pVegI9KAs/4c+iYFJiJr J6MQPxGJCRR7vBsB6yDt8exE6dMYLRAOQvzJmPT0K5IDHWNAiNYv39w8kdzHGiVqOYV3 R9e3Lp0Vpk1XRK9AYsnMC4dYH3vpY6xKFyAokvDfo76S0LQ/XLOSfMkJo7M+og2gHl1m IUPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="YK8/Tw+c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si4681041pjj.135.2021.10.12.13.47.28; Tue, 12 Oct 2021 13:47:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="YK8/Tw+c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235057AbhJLUqV (ORCPT + 99 others); Tue, 12 Oct 2021 16:46:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234486AbhJLUqU (ORCPT ); Tue, 12 Oct 2021 16:46:20 -0400 Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04611C061570 for ; Tue, 12 Oct 2021 13:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=sKGTat30RNCy2/FTRskvWCn5egJkoLenpbku9vap1/U=; b=YK8/Tw+cplklLXX9Rq2G0wY+87 oCnHKEyqtemkSgkAY2l6CMlou7JN2iYohsDoaCzWLtycs2YWInmIokYOJcD5mVIofVKlaiKprezDI 5PobrSqN58yc9KTpYidWIURe1KJ2fbMF5oIVAsGLqCC3ULtWcc2iUPYAHiwP+Eo5Jw6Kg+S2Oa3hO jvrf+Bc04nfa1bJa3dRIjjvu3wI9Jk9V7AXV7N8UbWGMDQ/DI8XkDJUF1Bky/rY+9nCtXAFUZ3/8m LXcYmtFPr+SXfGDQcnO77NCa8gJzrDbd+nX/qGPXTXl7SY4oQqCqdqDOZR4PbIgJ6WMaSHHGEXQrc WqsJI0+w==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1maOdF-00Dx7u-CW; Tue, 12 Oct 2021 20:44:17 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Corey Minyard , openipmi-developer@lists.sourceforge.net, Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH -next] ipmi: ipmb: fix dependencies to eliminate build error Date: Tue, 12 Oct 2021 13:44:16 -0700 Message-Id: <20211012204416.23108-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_I2C=m, CONFIG_I2C_SLAVE=y (bool), and CONFIG_IPMI_IPMB=y, the build fails with: ld: drivers/char/ipmi/ipmi_ipmb.o: in function `ipmi_ipmb_remove': ipmi_ipmb.c:(.text+0x6b): undefined reference to `i2c_slave_unregister' ld: drivers/char/ipmi/ipmi_ipmb.o: in function `ipmi_ipmb_thread': ipmi_ipmb.c:(.text+0x2a4): undefined reference to `i2c_transfer' ld: drivers/char/ipmi/ipmi_ipmb.o: in function `ipmi_ipmb_probe': ipmi_ipmb.c:(.text+0x646): undefined reference to `i2c_slave_register' ld: drivers/char/ipmi/ipmi_ipmb.o: in function `ipmi_ipmb_driver_init': ipmi_ipmb.c:(.init.text+0xa): undefined reference to `i2c_register_driver' ld: drivers/char/ipmi/ipmi_ipmb.o: in function `ipmi_ipmb_driver_exit': ipmi_ipmb.c:(.exit.text+0x8): undefined reference to `i2c_del_driver' This is due to having a tristate depending on a bool symbol. By adding I2C (tristate) as a dependency, the desired dependencies are met, causing IPMI_IPMB to be changed from =y to =m: -CONFIG_IPMI_IPMB=y +CONFIG_IPMI_IPMB=m Fixes: 63c4eb347164 ("ipmi:ipmb: Add initial support for IPMI over IPMB") Signed-off-by: Randy Dunlap Cc: Corey Minyard Cc: openipmi-developer@lists.sourceforge.net Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/char/ipmi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20211012.orig/drivers/char/ipmi/Kconfig +++ linux-next-20211012/drivers/char/ipmi/Kconfig @@ -77,7 +77,7 @@ config IPMI_SSIF config IPMI_IPMB tristate 'IPMI IPMB interface' - depends on I2C_SLAVE + depends on I2C && I2C_SLAVE help Provides a driver for a system running right on the IPMB bus. It supports normal system interface messages to a BMC on the IPMB