public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org,
	openipmi-developer@lists.sourceforge.net,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH -next] ipmi: ipmb: fix dependencies to eliminate build error
Date: Tue, 12 Oct 2021 18:09:38 -0500	[thread overview]
Message-ID: <20211012230938.GE66936@minyard.net> (raw)
In-Reply-To: <20211012204416.23108-1-rdunlap@infradead.org>

On Tue, Oct 12, 2021 at 01:44:16PM -0700, Randy Dunlap wrote:
> When CONFIG_I2C=m, CONFIG_I2C_SLAVE=y (bool), and CONFIG_IPMI_IPMB=y,
> the build fails with:

Got it, thanks.

-corey

> 
> 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 <rdunlap@infradead.org>
> Cc: Corey Minyard <minyard@acm.org>
> Cc: openipmi-developer@lists.sourceforge.net
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  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

      reply	other threads:[~2021-10-12 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 20:44 [PATCH -next] ipmi: ipmb: fix dependencies to eliminate build error Randy Dunlap
2021-10-12 23:09 ` Corey Minyard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211012230938.GE66936@minyard.net \
    --to=minyard@acm.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox