[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210221108.lRH3xyni-lkp@intel.com>
Date: Sat, 22 Oct 2022 11:15:57 +0800
From: kernel test robot <lkp@...el.com>
To: Ibrahim Tilki <Ibrahim.Tilki@...log.com>, a.zummo@...ertech.it,
alexandre.belloni@...tlin.com, jdelvare@...e.com,
linux@...ck-us.net, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org
Cc: kbuild-all@...ts.01.org, Ibrahim Tilki <Ibrahim.Tilki@...log.com>,
linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org,
Zeynep Arslanbenzer <Zeynep.Arslanbenzer@...log.com>
Subject: Re: [PATCH 1/2] drivers: rtc: add max313xx series rtc driver
Hi Ibrahim,
I love your patch! Yet something to improve:
[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on linus/master v6.1-rc1 next-20221021]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ibrahim-Tilki/drivers-rtc-add-max313xx-series-rtc-driver/20221020-092245
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20221019133910.282-1-Ibrahim.Tilki%40analog.com
patch subject: [PATCH 1/2] drivers: rtc: add max313xx series rtc driver
config: openrisc-randconfig-c003-20221021
compiler: or1k-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/574101d9954e99e957cf85c7f0b1eaf8d3dfe015
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Ibrahim-Tilki/drivers-rtc-add-max313xx-series-rtc-driver/20221020-092245
git checkout 574101d9954e99e957cf85c7f0b1eaf8d3dfe015
# 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=openrisc SHELL=/bin/bash
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 >>):
or1k-linux-ld: drivers/rtc/rtc-max313xx.o: in function `max313xx_probe':
>> drivers/rtc/rtc-max313xx.c:1244: undefined reference to `devm_watchdog_register_device'
drivers/rtc/rtc-max313xx.c:1244:(.text+0x2500): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `devm_watchdog_register_device'
vim +1244 drivers/rtc/rtc-max313xx.c
1113
1114 static int max313xx_probe(struct i2c_client *client,
1115 const struct i2c_device_id *id)
1116 {
1117 struct device *dev = &client->dev;
1118 struct max313xx *max313xx;
1119 struct device *hwmon;
1120 const void *match;
1121 int ret;
1122
1123 max313xx = devm_kzalloc(&client->dev, sizeof(*max313xx), GFP_KERNEL);
1124 if (!max313xx)
1125 return -ENOMEM;
1126
1127 dev_set_drvdata(&client->dev, max313xx);
1128
1129 max313xx->regmap = devm_regmap_init_i2c(client, ®map_config);
1130 if (IS_ERR(max313xx->regmap)) {
1131 return dev_err_probe(dev, PTR_ERR(max313xx->regmap),
1132 "regmap init failed\n");
1133 }
1134
1135 i2c_set_clientdata(client, max313xx);
1136
1137 match = device_get_match_data(dev);
1138 if (match)
1139 max313xx->id = (enum max313xx_ids)match;
1140 else if (id)
1141 max313xx->id = id->driver_data;
1142 else
1143 return -ENODEV;
1144
1145 max313xx->chip = &chip[max313xx->id];
1146
1147 ret = max313xx_init(max313xx);
1148 if (ret)
1149 return ret;
1150
1151 ret = max313xx_convert_24hr(max313xx);
1152 if (ret)
1153 return ret;
1154
1155 max313xx->rtc = devm_rtc_allocate_device(dev);
1156 if (IS_ERR(max313xx->rtc))
1157 return PTR_ERR(max313xx->rtc);
1158
1159 max313xx->rtc->ops = &max3133x_rtc_ops;
1160 max313xx->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
1161 max313xx->rtc->range_max = RTC_TIMESTAMP_END_2199;
1162
1163 ret = devm_rtc_register_device(max313xx->rtc);
1164 if (ret)
1165 return ret;
1166
1167 switch (max313xx->id) {
1168 case ID_MAX31328:
1169 case ID_MAX31343:
1170 max313xx->irqs[0] = client->irq;
1171 break;
1172 default:
1173 max313xx->irqs[0] = fwnode_irq_get_byname(dev_fwnode(dev), "INTA");
1174 max313xx->irqs[1] = fwnode_irq_get_byname(dev_fwnode(dev), "INTB");
1175 if (max313xx->irqs[0] <= 0 && max313xx->irqs[1] <= 0 && client->irq)
1176 return dev_err_probe(dev, -ENOENT,
1177 "interrupt requested but no interrupt name specified\n");
1178
1179 break;
1180 }
1181
1182 ret = max313xx_clkout_register(dev);
1183 if (ret)
1184 return ret;
1185
1186 ret = max313xx_clkin_init(dev);
1187 if (ret)
1188 return ret;
1189
1190 /* IRQ wiring depends on the clock configuration so parse them first */
1191 ret = max313xx_irq_init(dev, client->name);
1192 if (ret)
1193 return ret;
1194
1195 if (max313xx->chip->ram_size) {
1196 max313xx_nvmem_cfg.size = max313xx->chip->ram_size;
1197 max313xx_nvmem_cfg.priv = max313xx;
1198
1199 ret = devm_rtc_nvmem_register(max313xx->rtc, &max313xx_nvmem_cfg);
1200 if (ret)
1201 dev_warn(dev, "cannot register rtc nvmem\n");
1202 }
1203
1204 if (max313xx->chip->temp_reg) {
1205 hwmon = devm_hwmon_device_register_with_info(dev, client->name,
1206 max313xx,
1207 &max313xx_chip_info,
1208 NULL);
1209 if (IS_ERR(hwmon))
1210 dev_warn(dev, "cannot register hwmon device: %li\n",
1211 PTR_ERR(hwmon));
1212 }
1213
1214 ret = max313xx_trickle_charger_setup(dev);
1215 if (ret)
1216 return ret;
1217
1218 if (max313xx->chip->timer_cfg_reg) {
1219 max313xx->wdd.parent = dev;
1220 max313xx->wdd.info = &max313xx_wdt_info;
1221 max313xx->wdd.ops = &max313xx_watchdog_ops;
1222 max313xx->wdd.status = WATCHDOG_NOWAYOUT_INIT_STATUS;
1223 max313xx->wdd.min_timeout = 2;
1224
1225 switch (max313xx->id) {
1226 case ID_MAX31334:
1227 /* 16-bit, 16Hz */
1228 max313xx->wdd.max_timeout = 4095;
1229 break;
1230 default:
1231 /* 8-bit, 16Hz */
1232 max313xx->wdd.max_timeout = 15;
1233 }
1234
1235 watchdog_set_drvdata(&max313xx->wdd, max313xx);
1236
1237 /* Set timer frequency to minimum possible value */
1238 ret = regmap_write(max313xx->regmap, max313xx->chip->timer_cfg_reg,
1239 FIELD_PREP(MAX313XX_TMR_CFG_FREQ_MASK,
1240 MAX313XX_TMR_CFG_FREQ_16HZ));
1241 if (ret) {
1242 dev_warn(dev, "cannot set timer frequency\n");
1243 } else {
> 1244 ret = devm_watchdog_register_device(dev, &max313xx->wdd);
1245 if (ret)
1246 dev_warn(dev, "cannot register watchdog dev\n");
1247 }
1248 }
1249
1250 return 0;
1251 }
1252
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (168726 bytes)
Powered by blists - more mailing lists