[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202106021036.SKmuTigz-lkp@intel.com>
Date: Wed, 2 Jun 2021 10:11:03 +0800
From: kernel test robot <lkp@...el.com>
To: Chris Packham <chris.packham@...iedtelesis.co.nz>, wsa@...nel.org,
rjui@...adcom.com, sbranden@...adcom.com,
bcm-kernel-feedback-list@...adcom.com
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-i2c@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Richard Laing <richard.laing@...iedtelesis.co.nz>,
Chris Packham <chris.packham@...iedtelesis.co.nz>
Subject: Re: [PATCH v2] i2c: bcm-iproc: Add i2c recovery support
Hi Chris,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on v5.13-rc4 next-20210601]
[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/Chris-Packham/i2c-bcm-iproc-Add-i2c-recovery-support/20210602-070900
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: arm64-randconfig-r003-20210601 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
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/9671d44b08834b225120a1288271bb38c01c1f33
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chris-Packham/i2c-bcm-iproc-Add-i2c-recovery-support/20210602-070900
git checkout 9671d44b08834b225120a1288271bb38c01c1f33
# 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@...el.com>
All errors (new ones prefixed by >>):
drivers/i2c/busses/i2c-bcm-iproc.c:1199:3: warning: cast to smaller integer type 'enum bcm_iproc_i2c_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
(enum bcm_iproc_i2c_type)of_device_get_match_data(&pdev->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bcm-iproc.c:1264:26: error: assigning to 'struct i2c_bus_recovery_info *' from 'const struct i2c_bus_recovery_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
adap->bus_recovery_info = &bcm_iproc_recovery_info;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +1264 drivers/i2c/busses/i2c-bcm-iproc.c
1183
1184 static int bcm_iproc_i2c_probe(struct platform_device *pdev)
1185 {
1186 int irq, ret = 0;
1187 struct bcm_iproc_i2c_dev *iproc_i2c;
1188 struct i2c_adapter *adap;
1189 struct resource *res;
1190
1191 iproc_i2c = devm_kzalloc(&pdev->dev, sizeof(*iproc_i2c),
1192 GFP_KERNEL);
1193 if (!iproc_i2c)
1194 return -ENOMEM;
1195
1196 platform_set_drvdata(pdev, iproc_i2c);
1197 iproc_i2c->device = &pdev->dev;
1198 iproc_i2c->type =
1199 (enum bcm_iproc_i2c_type)of_device_get_match_data(&pdev->dev);
1200 init_completion(&iproc_i2c->done);
1201
1202 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1203 iproc_i2c->base = devm_ioremap_resource(iproc_i2c->device, res);
1204 if (IS_ERR(iproc_i2c->base))
1205 return PTR_ERR(iproc_i2c->base);
1206
1207 if (iproc_i2c->type == IPROC_I2C_NIC) {
1208 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
1209 iproc_i2c->idm_base = devm_ioremap_resource(iproc_i2c->device,
1210 res);
1211 if (IS_ERR(iproc_i2c->idm_base))
1212 return PTR_ERR(iproc_i2c->idm_base);
1213
1214 ret = of_property_read_u32(iproc_i2c->device->of_node,
1215 "brcm,ape-hsls-addr-mask",
1216 &iproc_i2c->ape_addr_mask);
1217 if (ret < 0) {
1218 dev_err(iproc_i2c->device,
1219 "'brcm,ape-hsls-addr-mask' missing\n");
1220 return -EINVAL;
1221 }
1222
1223 spin_lock_init(&iproc_i2c->idm_lock);
1224
1225 /* no slave support */
1226 bcm_iproc_algo.reg_slave = NULL;
1227 bcm_iproc_algo.unreg_slave = NULL;
1228 }
1229
1230 ret = bcm_iproc_i2c_init(iproc_i2c);
1231 if (ret)
1232 return ret;
1233
1234 ret = bcm_iproc_i2c_cfg_speed(iproc_i2c);
1235 if (ret)
1236 return ret;
1237
1238 irq = platform_get_irq(pdev, 0);
1239 if (irq > 0) {
1240 ret = devm_request_irq(iproc_i2c->device, irq,
1241 bcm_iproc_i2c_isr, 0, pdev->name,
1242 iproc_i2c);
1243 if (ret < 0) {
1244 dev_err(iproc_i2c->device,
1245 "unable to request irq %i\n", irq);
1246 return ret;
1247 }
1248
1249 iproc_i2c->irq = irq;
1250 } else {
1251 dev_warn(iproc_i2c->device,
1252 "no irq resource, falling back to poll mode\n");
1253 }
1254
1255 bcm_iproc_i2c_enable_disable(iproc_i2c, true);
1256
1257 adap = &iproc_i2c->adapter;
1258 i2c_set_adapdata(adap, iproc_i2c);
1259 snprintf(adap->name, sizeof(adap->name),
1260 "Broadcom iProc (%s)",
1261 of_node_full_name(iproc_i2c->device->of_node));
1262 adap->algo = &bcm_iproc_algo;
1263 adap->quirks = &bcm_iproc_i2c_quirks;
> 1264 adap->bus_recovery_info = &bcm_iproc_recovery_info;
1265 adap->dev.parent = &pdev->dev;
1266 adap->dev.of_node = pdev->dev.of_node;
1267
1268 return i2c_add_adapter(adap);
1269 }
1270
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (35222 bytes)
Powered by blists - more mailing lists