[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210141048.dlc2grZp-lkp@intel.com>
Date: Fri, 14 Oct 2022 10:27:00 +0800
From: kernel test robot <lkp@...el.com>
To: Nathan Chancellor <nathan@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Matt Flax <flatmax@...tmax.com>,
Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH] of: Define of_match_ptr() with PTR_IF() to avoid unused
variable warnings
Hi Nathan,
I love your patch! Yet something to improve:
[auto build test ERROR on 4fe89d07dcc2804c8b562f6c7896a45643d34b2f]
url: https://github.com/intel-lab-lkp/linux/commits/Nathan-Chancellor/of-Define-of_match_ptr-with-PTR_IF-to-avoid-unused-variable-warnings/20221014-035324
base: 4fe89d07dcc2804c8b562f6c7896a45643d34b2f
config: hexagon-randconfig-r045-20221012
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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/d312b5902005bf2f4497687edc1b1df76baa337b
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Nathan-Chancellor/of-Define-of_match_ptr-with-PTR_IF-to-avoid-unused-variable-warnings/20221014-035324
git checkout d312b5902005bf2f4497687edc1b1df76baa337b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/fpga/ drivers/hwmon/pmbus/ drivers/i2c/busses/ drivers/iio/adc/ drivers/phy/motorola/ drivers/power/supply/ drivers/regulator/ drivers/rtc/ drivers/tty/serial/ drivers/usb/cdns3/ drivers/usb/dwc3/ drivers/usb/host/ drivers/usb/misc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/fpga/machxo2-spi.c:395:34: error: use of undeclared identifier 'of_match'
.of_match_table = of_match_ptr(of_match),
^
1 error generated.
--
>> drivers/fpga/altera-freeze-bridge.c:273:34: error: use of undeclared identifier 'altera_freeze_br_of_match'; did you mean 'altera_freeze_br_req_ack'?
.of_match_table = of_match_ptr(altera_freeze_br_of_match),
^~~~~~~~~~~~~~~~~~~~~~~~~
altera_freeze_br_req_ack
include/linux/of.h:848:59: note: expanded from macro 'of_match_ptr'
#define of_match_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_OF), (_ptr))
^
include/linux/kernel.h:57:38: note: expanded from macro 'PTR_IF'
#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
^
drivers/fpga/altera-freeze-bridge.c:40:12: note: 'altera_freeze_br_req_ack' declared here
static int altera_freeze_br_req_ack(struct altera_freeze_br_data *priv,
^
>> drivers/fpga/altera-freeze-bridge.c:273:21: error: incompatible pointer types initializing 'const struct of_device_id *' with an expression of type 'int (*)(struct altera_freeze_br_data *, u32, u32)' (aka 'int (*)(struct altera_freeze_br_data *, unsigned int, unsigned int)') [-Werror,-Wincompatible-pointer-types]
.of_match_table = of_match_ptr(altera_freeze_br_of_match),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/of.h:848:28: note: expanded from macro 'of_match_ptr'
#define of_match_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_OF), (_ptr))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:57:27: note: expanded from macro 'PTR_IF'
#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
^~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
>> drivers/fpga/xilinx-pr-decoupler.c:179:34: error: use of undeclared identifier 'xlnx_pr_decoupler_of_match'
.of_match_table = of_match_ptr(xlnx_pr_decoupler_of_match),
^
1 error generated.
--
>> drivers/hwmon/pmbus/pli1209bc.c:135:37: error: use of undeclared identifier 'pli1209bc_of_match'
.of_match_table = of_match_ptr(pli1209bc_of_match),
^
1 error generated.
--
>> drivers/i2c/busses/i2c-pca-platform.c:247:34: error: use of undeclared identifier 'i2c_pca_of_match_table'
.of_match_table = of_match_ptr(i2c_pca_of_match_table),
^
1 error generated.
--
>> drivers/regulator/act8865-regulator.c:670:37: error: use of undeclared identifier 'act8865_dt_ids'; did you mean 'act8865_ldo_ops'?
id = of_match_device(of_match_ptr(act8865_dt_ids), dev);
^~~~~~~~~~~~~~
act8865_ldo_ops
include/linux/of.h:848:59: note: expanded from macro 'of_match_ptr'
#define of_match_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_OF), (_ptr))
^
include/linux/kernel.h:57:38: note: expanded from macro 'PTR_IF'
#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
^
drivers/regulator/act8865-regulator.c:416:35: note: 'act8865_ldo_ops' declared here
static const struct regulator_ops act8865_ldo_ops = {
^
>> drivers/regulator/act8865-regulator.c:670:24: error: incompatible operand types ('struct regulator_ops' and 'void *')
id = of_match_device(of_match_ptr(act8865_dt_ids), dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/of.h:848:28: note: expanded from macro 'of_match_ptr'
#define of_match_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_OF), (_ptr))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:57:35: note: expanded from macro 'PTR_IF'
#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
^ ~~~~~ ~~~~
2 errors generated.
--
>> drivers/regulator/isl9305.c:198:34: error: use of undeclared identifier 'isl9305_dt_ids'; did you mean 'isl9305_i2c_id'?
.of_match_table = of_match_ptr(isl9305_dt_ids),
^~~~~~~~~~~~~~
isl9305_i2c_id
include/linux/of.h:848:59: note: expanded from macro 'of_match_ptr'
#define of_match_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_OF), (_ptr))
^
include/linux/kernel.h:57:38: note: expanded from macro 'PTR_IF'
#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
^
drivers/regulator/isl9305.c:188:35: note: 'isl9305_i2c_id' declared here
static const struct i2c_device_id isl9305_i2c_id[] = {
^
>> drivers/regulator/isl9305.c:198:21: error: incompatible pointer types initializing 'const struct of_device_id *' with an expression of type 'const struct i2c_device_id *' [-Werror,-Wincompatible-pointer-types]
.of_match_table = of_match_ptr(isl9305_dt_ids),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/of.h:848:28: note: expanded from macro 'of_match_ptr'
#define of_match_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_OF), (_ptr))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:57:27: note: expanded from macro 'PTR_IF'
#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
^~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
>> drivers/rtc/rtc-ab-eoz9.c:580:34: error: use of undeclared identifier 'abeoz9_dt_match'
.of_match_table = of_match_ptr(abeoz9_dt_match),
^
1 error generated.
--
>> drivers/rtc/rtc-abx80x.c:915:34: error: use of undeclared identifier 'abx80x_of_match'
.of_match_table = of_match_ptr(abx80x_of_match),
^
1 error generated.
--
>> drivers/rtc/rtc-ds1302.c:209:40: error: use of undeclared identifier 'ds1302_dt_ids'; did you mean 'ds1302_spi_ids'?
.driver.of_match_table = of_match_ptr(ds1302_dt_ids),
^~~~~~~~~~~~~
ds1302_spi_ids
include/linux/of.h:848:59: note: expanded from macro 'of_match_ptr'
#define of_match_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_OF), (_ptr))
^
include/linux/kernel.h:57:38: note: expanded from macro 'PTR_IF'
#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
^
drivers/rtc/rtc-ds1302.c:201:35: note: 'ds1302_spi_ids' declared here
static const struct spi_device_id ds1302_spi_ids[] = {
^
>> drivers/rtc/rtc-ds1302.c:209:27: error: incompatible pointer types initializing 'const struct of_device_id *' with an expression of type 'const struct spi_device_id *' [-Werror,-Wincompatible-pointer-types]
.driver.of_match_table = of_match_ptr(ds1302_dt_ids),
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/of.h:848:28: note: expanded from macro 'of_match_ptr'
#define of_match_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_OF), (_ptr))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:57:27: note: expanded from macro 'PTR_IF'
#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
^~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
>> drivers/rtc/rtc-mcp795.c:442:36: error: use of undeclared identifier 'mcp795_of_match'
.of_match_table = of_match_ptr(mcp795_of_match),
^
1 error generated.
..
vim +/of_match +395 drivers/fpga/machxo2-spi.c
88fb3a00233073 Paolo Pisati 2018-04-16 391
88fb3a00233073 Paolo Pisati 2018-04-16 392 static struct spi_driver machxo2_spi_driver = {
88fb3a00233073 Paolo Pisati 2018-04-16 393 .driver = {
88fb3a00233073 Paolo Pisati 2018-04-16 394 .name = "machxo2-slave-spi",
88fb3a00233073 Paolo Pisati 2018-04-16 @395 .of_match_table = of_match_ptr(of_match),
88fb3a00233073 Paolo Pisati 2018-04-16 396 },
88fb3a00233073 Paolo Pisati 2018-04-16 397 .probe = machxo2_spi_probe,
88fb3a00233073 Paolo Pisati 2018-04-16 398 .id_table = lattice_ids,
88fb3a00233073 Paolo Pisati 2018-04-16 399 };
88fb3a00233073 Paolo Pisati 2018-04-16 400
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (121463 bytes)
Powered by blists - more mailing lists