public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: mlxbf: Fix build error with CONFIG_ACPI disabled
@ 2020-11-02 12:12 Liu Shixin
  2020-11-02 16:57 ` kernel test robot
  2020-11-03 22:22 ` Khalil Blaiech
  0 siblings, 2 replies; 3+ messages in thread
From: Liu Shixin @ 2020-11-02 12:12 UTC (permalink / raw)
  To: Khalil Blaiech, Wolfram Sang, Vadim Pasternak
  Cc: linux-i2c, linux-kernel, Liu Shixin

drivers/i2c/busses/i2c-mlxbf.c: In function ‘mlxbf_i2c_acpi_probe’:
drivers/i2c/busses/i2c-mlxbf.c:2296:8: error: implicit declaration of function ‘acpi_device_uid’; did you mean ‘cpu_device_up’? [-Werror=implicit-function-declaration]
  uid = acpi_device_uid(adev);
        ^~~~~~~~~~~~~~~
        cpu_device_up

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/i2c/busses/i2c-mlxbf.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index ee59e0da082d..cd8a909431a9 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -2272,6 +2272,7 @@ static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
 
 MODULE_DEVICE_TABLE(acpi, mlxbf_i2c_acpi_ids);
 
+#ifdef CONFIG_ACPI
 static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
 {
 	const struct acpi_device_id *aid;
@@ -2305,6 +2306,12 @@ static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
 
 	return ret;
 }
+#else
+static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
+{
+	return -ENODEV;
+}
+#endif
 
 static int mlxbf_i2c_of_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
 {
-- 
2.25.1


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

* Re: [PATCH] i2c: mlxbf: Fix build error with CONFIG_ACPI disabled
  2020-11-02 12:12 [PATCH] i2c: mlxbf: Fix build error with CONFIG_ACPI disabled Liu Shixin
@ 2020-11-02 16:57 ` kernel test robot
  2020-11-03 22:22 ` Khalil Blaiech
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-11-02 16:57 UTC (permalink / raw)
  To: Liu Shixin, Khalil Blaiech, Wolfram Sang, Vadim Pasternak
  Cc: kbuild-all, clang-built-linux, linux-i2c, linux-kernel,
	Liu Shixin

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

Hi Liu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on v5.10-rc2 next-20201102]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Liu-Shixin/i2c-mlxbf-Fix-build-error-with-CONFIG_ACPI-disabled/20201102-194848
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: arm64-randconfig-r002-20201102 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cc91554ebb66e8c9a4b8c67ca2f1343eaac10cf6)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/296e051e7e4a229ffefca237fd399a08c9ace3c4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Liu-Shixin/i2c-mlxbf-Fix-build-error-with-CONFIG_ACPI-disabled/20201102-194848
        git checkout 296e051e7e4a229ffefca237fd399a08c9ace3c4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-mlxbf.c:2267:36: warning: unused variable 'mlxbf_i2c_acpi_ids' [-Wunused-const-variable]
   static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
                                      ^
   1 warning generated.

vim +/mlxbf_i2c_acpi_ids +2267 drivers/i2c/busses/i2c-mlxbf.c

b5b5b32081cd206 Khalil Blaiech 2020-09-22  2266  
b5b5b32081cd206 Khalil Blaiech 2020-09-22 @2267  static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
b5b5b32081cd206 Khalil Blaiech 2020-09-22  2268  	{ "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] },
b5b5b32081cd206 Khalil Blaiech 2020-09-22  2269  	{ "MLNXBF23", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2] },
b5b5b32081cd206 Khalil Blaiech 2020-09-22  2270  	{},
b5b5b32081cd206 Khalil Blaiech 2020-09-22  2271  };
b5b5b32081cd206 Khalil Blaiech 2020-09-22  2272  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45648 bytes --]

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

* RE: [PATCH] i2c: mlxbf: Fix build error with CONFIG_ACPI disabled
  2020-11-02 12:12 [PATCH] i2c: mlxbf: Fix build error with CONFIG_ACPI disabled Liu Shixin
  2020-11-02 16:57 ` kernel test robot
@ 2020-11-03 22:22 ` Khalil Blaiech
  1 sibling, 0 replies; 3+ messages in thread
From: Khalil Blaiech @ 2020-11-03 22:22 UTC (permalink / raw)
  To: Liu Shixin, Khalil Blaiech, Wolfram Sang, Vadim Pasternak
  Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org

Liu, thank you very much for the fix.

Please note that I posted a patch series on October, 28th including
this fix. Also note that I posted a v2 today.

Khalil 

> Subject: [PATCH] i2c: mlxbf: Fix build error with CONFIG_ACPI disabled
> 
> drivers/i2c/busses/i2c-mlxbf.c: In function ‘mlxbf_i2c_acpi_probe’:
> drivers/i2c/busses/i2c-mlxbf.c:2296:8: error: implicit declaration of function
> ‘acpi_device_uid’; did you mean ‘cpu_device_up’? [-Werror=implicit-
> function-declaration]
>   uid = acpi_device_uid(adev);
>         ^~~~~~~~~~~~~~~
>         cpu_device_up
> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
>  drivers/i2c/busses/i2c-mlxbf.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
> index ee59e0da082d..cd8a909431a9 100644
> --- a/drivers/i2c/busses/i2c-mlxbf.c
> +++ b/drivers/i2c/busses/i2c-mlxbf.c
> @@ -2272,6 +2272,7 @@ static const struct acpi_device_id
> mlxbf_i2c_acpi_ids[] = {
> 
>  MODULE_DEVICE_TABLE(acpi, mlxbf_i2c_acpi_ids);
> 
> +#ifdef CONFIG_ACPI
>  static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv
> *priv)
>  {
>  	const struct acpi_device_id *aid;
> @@ -2305,6 +2306,12 @@ static int mlxbf_i2c_acpi_probe(struct device
> *dev, struct mlxbf_i2c_priv *priv)
> 
>  	return ret;
>  }
> +#else
> +static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv
> *priv)
> +{
> +	return -ENODEV;
> +}
> +#endif
> 
>  static int mlxbf_i2c_of_probe(struct device *dev, struct mlxbf_i2c_priv
> *priv)
>  {
> --
> 2.25.1


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

end of thread, other threads:[~2020-11-03 22:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-02 12:12 [PATCH] i2c: mlxbf: Fix build error with CONFIG_ACPI disabled Liu Shixin
2020-11-02 16:57 ` kernel test robot
2020-11-03 22:22 ` Khalil Blaiech

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox