All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin
@ 2023-02-27 23:33 Benjamin Gray
  2023-02-27 23:33 ` [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST Benjamin Gray
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Benjamin Gray @ 2023-02-27 23:33 UTC (permalink / raw)
  To: linux-i2c; +Cc: arnd, Sven Peter, mpe, Benjamin Gray

The ppc64le_allmodconfig sets I2C_PASEMI=y and leaves COMPILE_TEST to
default to y and I2C_APPLE to default to m, running into a known
incompatible configuration that breaks the build [1]. Specifically,
a common dependency (i2c-pasemi-core.o in this case) cannot be used by
both builtin and module consumers.

Disable I2C_APPLE when I2C_PASEMI is a builtin to prevent this.

[1]: https://lore.kernel.org/all/202112061809.XT99aPrf-lkp@intel.com

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
---
v1: https://lore.kernel.org/linux-i2c/20230227035414.1461763-1-bgray@linux.ibm.com/
---
 drivers/i2c/busses/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index d4975444a32d..c42109e972fe 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -896,6 +896,7 @@ config I2C_PASEMI
 
 config I2C_APPLE
 	tristate "Apple SMBus platform driver"
+	depends on !I2C_PASEMI
 	depends on ARCH_APPLE || COMPILE_TEST
 	default ARCH_APPLE
 	help

base-commit: ec0a1b360aec1ba0bdfad3dd69e300b028529c0d
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST
  2023-02-27 23:33 [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin Benjamin Gray
@ 2023-02-27 23:33 ` Benjamin Gray
  2023-02-28  3:50   ` kernel test robot
  2023-03-02 17:00   ` Sven Peter
  2023-02-28  8:38 ` [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin Arnd Bergmann
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: Benjamin Gray @ 2023-02-27 23:33 UTC (permalink / raw)
  To: linux-i2c; +Cc: arnd, Sven Peter, mpe, Benjamin Gray

This driver builds fine on non-power platforms, so add it to the
COMPILE_TEST set to increase build coverage.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
---
 drivers/i2c/busses/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index c42109e972fe..52b1aa164cda 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -890,7 +890,7 @@ config I2C_OWL
 
 config I2C_PASEMI
 	tristate "PA Semi SMBus interface"
-	depends on PPC_PASEMI && PCI
+	depends on (PPC_PASEMI && PCI) || COMPILE_TEST
 	help
 	  Supports the PA Semi PWRficient on-chip SMBus interfaces.
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST
  2023-02-27 23:33 ` [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST Benjamin Gray
@ 2023-02-28  3:50   ` kernel test robot
  2023-02-28 21:37     ` Benjamin Gray
  2023-03-02 17:00   ` Sven Peter
  1 sibling, 1 reply; 8+ messages in thread
From: kernel test robot @ 2023-02-28  3:50 UTC (permalink / raw)
  To: Benjamin Gray, linux-i2c
  Cc: oe-kbuild-all, arnd, Sven Peter, mpe, Benjamin Gray

Hi Benjamin,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ec0a1b360aec1ba0bdfad3dd69e300b028529c0d]

url:    https://github.com/intel-lab-lkp/linux/commits/Benjamin-Gray/i2c-Build-I2C_PASEMI-with-COMPILE_TEST/20230228-073442
base:   ec0a1b360aec1ba0bdfad3dd69e300b028529c0d
patch link:    https://lore.kernel.org/r/20230227233318.120415-2-bgray%40linux.ibm.com
patch subject: [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230228/202302281135.KsarHDzl-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/6f8f477a04ff9dcd1091aed71674b27c513b6b39
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Benjamin-Gray/i2c-Build-I2C_PASEMI-with-COMPILE_TEST/20230228-073442
        git checkout 6f8f477a04ff9dcd1091aed71674b27c513b6b39
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/i2c/busses/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302281135.KsarHDzl-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-pasemi-pci.c:82:1: warning: data definition has no type or storage class
      82 | module_pci_driver(pasemi_smb_pci_driver);
         | ^~~~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-pasemi-pci.c:82:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int]
>> drivers/i2c/busses/i2c-pasemi-pci.c:82:1: warning: parameter names (without types) in function declaration
   cc1: some warnings being treated as errors


vim +82 drivers/i2c/busses/i2c-pasemi-pci.c

9bc5f4f660ff3e Sven Peter 2021-10-08  81  
9bc5f4f660ff3e Sven Peter 2021-10-08 @82  module_pci_driver(pasemi_smb_pci_driver);
9bc5f4f660ff3e Sven Peter 2021-10-08  83  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin
  2023-02-27 23:33 [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin Benjamin Gray
  2023-02-27 23:33 ` [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST Benjamin Gray
@ 2023-02-28  8:38 ` Arnd Bergmann
  2023-03-02 17:00 ` Sven Peter
  2023-03-03 19:56 ` Wolfram Sang
  3 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2023-02-28  8:38 UTC (permalink / raw)
  To: Benjamin Gray, linux-i2c; +Cc: Sven Peter, Michael Ellerman

On Tue, Feb 28, 2023, at 00:33, Benjamin Gray wrote:
> The ppc64le_allmodconfig sets I2C_PASEMI=y and leaves COMPILE_TEST to
> default to y and I2C_APPLE to default to m, running into a known
> incompatible configuration that breaks the build [1]. Specifically,
> a common dependency (i2c-pasemi-core.o in this case) cannot be used by
> both builtin and module consumers.
>
> Disable I2C_APPLE when I2C_PASEMI is a builtin to prevent this.
>
> [1]: https://lore.kernel.org/all/202112061809.XT99aPrf-lkp@intel.com
>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>

Looks good to me,

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST
  2023-02-28  3:50   ` kernel test robot
@ 2023-02-28 21:37     ` Benjamin Gray
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Gray @ 2023-02-28 21:37 UTC (permalink / raw)
  To: kernel test robot, linux-i2c; +Cc: oe-kbuild-all, arnd, Sven Peter, mpe

Heh, that's what I get for only trying the defconfig. This patch was
just a possible bonus though, only the first one is important.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST
  2023-02-27 23:33 ` [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST Benjamin Gray
  2023-02-28  3:50   ` kernel test robot
@ 2023-03-02 17:00   ` Sven Peter
  1 sibling, 0 replies; 8+ messages in thread
From: Sven Peter @ 2023-03-02 17:00 UTC (permalink / raw)
  To: Benjamin Gray, linux-i2c; +Cc: Arnd Bergmann, Michael Ellerman

Hi,

On Tue, Feb 28, 2023, at 00:33, Benjamin Gray wrote:
> This driver builds fine on non-power platforms, so add it to the
> COMPILE_TEST set to increase build coverage.
>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
> ---
>  drivers/i2c/busses/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index c42109e972fe..52b1aa164cda 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -890,7 +890,7 @@ config I2C_OWL
> 
>  config I2C_PASEMI
>  	tristate "PA Semi SMBus interface"
> -	depends on PPC_PASEMI && PCI
> +	depends on (PPC_PASEMI && PCI) || COMPILE_TEST

I think you just want

	depends on PCI
	depends on PPC_PASEMI || COMPILE_TEST

here and then it should work.


Best,

Sven

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin
  2023-02-27 23:33 [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin Benjamin Gray
  2023-02-27 23:33 ` [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST Benjamin Gray
  2023-02-28  8:38 ` [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin Arnd Bergmann
@ 2023-03-02 17:00 ` Sven Peter
  2023-03-03 19:56 ` Wolfram Sang
  3 siblings, 0 replies; 8+ messages in thread
From: Sven Peter @ 2023-03-02 17:00 UTC (permalink / raw)
  To: Benjamin Gray, linux-i2c; +Cc: Arnd Bergmann, Michael Ellerman



On Tue, Feb 28, 2023, at 00:33, Benjamin Gray wrote:
> The ppc64le_allmodconfig sets I2C_PASEMI=y and leaves COMPILE_TEST to
> default to y and I2C_APPLE to default to m, running into a known
> incompatible configuration that breaks the build [1]. Specifically,
> a common dependency (i2c-pasemi-core.o in this case) cannot be used by
> both builtin and module consumers.
>
> Disable I2C_APPLE when I2C_PASEMI is a builtin to prevent this.
>
> [1]: https://lore.kernel.org/all/202112061809.XT99aPrf-lkp@intel.com
>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
> ---

Acked-by: Sven Peter <sven@svenpeter.dev>



Best,


Sven

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin
  2023-02-27 23:33 [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin Benjamin Gray
                   ` (2 preceding siblings ...)
  2023-03-02 17:00 ` Sven Peter
@ 2023-03-03 19:56 ` Wolfram Sang
  3 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2023-03-03 19:56 UTC (permalink / raw)
  To: Benjamin Gray; +Cc: linux-i2c, arnd, Sven Peter, mpe

[-- Attachment #1: Type: text/plain, Size: 677 bytes --]

On Tue, Feb 28, 2023 at 10:33:17AM +1100, Benjamin Gray wrote:
> The ppc64le_allmodconfig sets I2C_PASEMI=y and leaves COMPILE_TEST to
> default to y and I2C_APPLE to default to m, running into a known
> incompatible configuration that breaks the build [1]. Specifically,
> a common dependency (i2c-pasemi-core.o in this case) cannot be used by
> both builtin and module consumers.
> 
> Disable I2C_APPLE when I2C_PASEMI is a builtin to prevent this.
> 
> [1]: https://lore.kernel.org/all/202112061809.XT99aPrf-lkp@intel.com
> 
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-03 19:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 23:33 [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin Benjamin Gray
2023-02-27 23:33 ` [PATCH v2 2/2] i2c: Build I2C_PASEMI with COMPILE_TEST Benjamin Gray
2023-02-28  3:50   ` kernel test robot
2023-02-28 21:37     ` Benjamin Gray
2023-03-02 17:00   ` Sven Peter
2023-02-28  8:38 ` [PATCH v2 1/2] i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin Arnd Bergmann
2023-03-02 17:00 ` Sven Peter
2023-03-03 19:56 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.