[chrome-os:chromeos-5.4 37/134] drivers/gpu/drm/i915/i915_debugfs_params.c:212:16: error: no previous prototype for 'i915_debugfs_params'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 31c49140c8465fa6b378d3ae40d02a6df47a43d4
commit: 738e30f72e11e5a643939731b4ad12bc1ac96ad8 [37/134] BACKPORT: drm/i915/params: add i915 parameters to debugfs
config: x86_64-randconfig-a011-20200913 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 738e30f72e11e5a643939731b4ad12bc1ac96ad8
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_debugfs_params.c:212:16: error: no previous prototype for 'i915_debugfs_params' [-Werror=missing-prototypes]
212 | struct dentry *i915_debugfs_params(struct drm_i915_private *i915)
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 738e30f72e11e5a643939731b4ad12bc1ac96ad8
vim +/i915_debugfs_params +212 drivers/gpu/drm/i915/i915_debugfs_params.c
210
211 /* add a subdirectory with files for each i915 param */
> 212 struct dentry *i915_debugfs_params(struct drm_i915_private *i915)
213 {
214 struct drm_minor *minor = i915->drm.primary;
215 struct i915_params *params = &i915_modparams;
216 struct dentry *dir;
217
218 dir = debugfs_create_dir("i915_params", minor->debugfs_root);
219 if (IS_ERR(dir))
220 return dir;
221
222 /*
223 * Note: We could create files for params needing special handling
224 * here. Set mode in params to 0 to skip the generic create file, or
225 * just let the generic create file fail silently with -EEXIST.
226 */
227
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[leon-rdma:rdma-next 68/81] drivers/infiniband/core/cache.c:1295:9: warning: variable 'ret' is used uninitialized whenever 'if' condition is true
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head: 4c0870255a8dbe1caa2cdbccdd1632680e6a2201
commit: 244ea138ab718042f382e8083dd19752b1fd591e [68/81] RDMA/core: Introduce new GID table query API
config: powerpc-randconfig-r032-20200913 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 3ed89b51da38f081fedb57727076262abb81d149)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git checkout 244ea138ab718042f382e8083dd19752b1fd591e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/infiniband/core/cache.c:1295:9: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (IS_ERR(ndev)) {
^~~~~~~~~~~~
drivers/infiniband/core/cache.c:1314:9: note: uninitialized use occurs here
return ret;
^~~
drivers/infiniband/core/cache.c:1295:5: note: remove the 'if' if its condition is always false
if (IS_ERR(ndev)) {
^~~~~~~~~~~~~~~~~~~
drivers/infiniband/core/cache.c:1265:30: note: initialize the variable 'ret' to silence this warning
ssize_t num_entries = 0, ret;
^
= 0
1 warning generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commi...
git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
git fetch --no-tags leon-rdma rdma-next
git checkout 244ea138ab718042f382e8083dd19752b1fd591e
vim +1295 drivers/infiniband/core/cache.c
1249
1250 /**
1251 * rdma_query_gid_table - Reads GID table entries of all the ports of a device up to max_entries.
1252 * @device: The device to query.
1253 * @entries: Entries where GID entries are returned.
1254 * @max_entries: Maximum number of entries that can be returned.
1255 * Entries array must be allocated to hold max_entries number of entries.
1256 * @num_entries: Updated to the number of entries that were successfully read.
1257 *
1258 * Returns number of entries on success or appropriate error code.
1259 */
1260 ssize_t rdma_query_gid_table(struct ib_device *device,
1261 struct ib_uverbs_gid_entry *entries,
1262 size_t max_entries)
1263 {
1264 const struct ib_gid_attr *gid_attr;
1265 ssize_t num_entries = 0, ret;
1266 struct ib_gid_table *table;
1267 unsigned int port_num, i;
1268 struct net_device *ndev;
1269 unsigned long flags;
1270
1271 rdma_for_each_port(device, port_num) {
1272 if (!rdma_ib_or_roce(device, port_num))
1273 continue;
1274
1275 table = rdma_gid_table(device, port_num);
1276 read_lock_irqsave(&table->rwlock, flags);
1277 for (i = 0; i < table->sz; i++) {
1278 if (!is_gid_entry_valid(table->data_vec[i]))
1279 continue;
1280 if (num_entries >= max_entries) {
1281 ret = -EINVAL;
1282 goto err;
1283 }
1284
1285 gid_attr = &table->data_vec[i]->attr;
1286
1287 memcpy(&entries->gid, &gid_attr->gid,
1288 sizeof(gid_attr->gid));
1289 entries->gid_index = gid_attr->index;
1290 entries->port_num = gid_attr->port_num;
1291 entries->gid_type = gid_attr->gid_type;
1292 if (rdma_protocol_roce(device, port_num)) {
1293 rcu_read_lock();
1294 ndev = rdma_read_gid_attr_ndev_rcu(gid_attr);
> 1295 if (IS_ERR(ndev)) {
1296 rcu_read_unlock();
1297 goto err;
1298 }
1299 entries->netdev_ifindex = ndev->ifindex;
1300 rcu_read_unlock();
1301 } else {
1302 entries->netdev_ifindex = 0;
1303 }
1304
1305 num_entries++;
1306 entries++;
1307 }
1308 read_unlock_irqrestore(&table->rwlock, flags);
1309 }
1310
1311 return num_entries;
1312 err:
1313 read_unlock_irqrestore(&table->rwlock, flags);
1314 return ret;
1315 }
1316 EXPORT_SYMBOL(rdma_query_gid_table);
1317
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[PATCH] misc: hisi_hikey_usb: fix ptr_ret.cocci warnings
by kernel test robot
From: kernel test robot <lkp(a)intel.com>
drivers/misc/hisi_hikey_usb.c:171:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
CC: Wei Xu <xuwei5(a)hisilicon.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url: https://github.com/0day-ci/linux/commits/Wei-Xu/misc-hisi_hikey_usb-fix-t...
base: f965d3ec86fa89285db0fbb983da76ba9c398efa
hisi_hikey_usb.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/misc/hisi_hikey_usb.c
+++ b/drivers/misc/hisi_hikey_usb.c
@@ -168,10 +168,7 @@ static int hisi_hikey_usb_parse_kirin970
hisi_hikey_usb->reset = devm_gpiod_get(&pdev->dev, "hub_reset_en_gpio",
GPIOD_OUT_HIGH);
- if (IS_ERR(hisi_hikey_usb->reset))
- return PTR_ERR(hisi_hikey_usb->reset);
-
- return 0;
+ return PTR_ERR_OR_ZERO(hisi_hikey_usb->reset);
}
static int hisi_hikey_usb_probe(struct platform_device *pdev)
2 years
Re: [PATCH leds + devicetree v1 2/2] leds: trigger: netdev: allow parsing `trigger-sources` from device tree
by kernel test robot
Hi "Marek,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pavel-linux-leds/for-next]
[also build test ERROR on robh/for-next linus/master v5.9-rc5 next-20200915]
[cannot apply to linux/master]
[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/Marek-Beh-n/Parse-DT-property-tr...
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: x86_64-randconfig-a016-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 3ed89b51da38f081fedb57727076262abb81d149)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/leds/trigger/ledtrig-netdev.c:396:25: error: variable has incomplete type 'struct of_phandle_args'
struct of_phandle_args args;
^
drivers/leds/trigger/ledtrig-netdev.c:396:9: note: forward declaration of 'struct of_phandle_args'
struct of_phandle_args args;
^
>> drivers/leds/trigger/ledtrig-netdev.c:407:10: error: implicit declaration of function 'of_count_phandle_with_args' [-Werror,-Wimplicit-function-declaration]
count = of_count_phandle_with_args(np, "trigger-sources",
^
>> drivers/leds/trigger/ledtrig-netdev.c:421:8: error: implicit declaration of function 'of_parse_phandle_with_args' [-Werror,-Wimplicit-function-declaration]
err = of_parse_phandle_with_args(np, "trigger-sources",
^
drivers/leds/trigger/ledtrig-netdev.c:421:8: note: did you mean 'of_count_phandle_with_args'?
drivers/leds/trigger/ledtrig-netdev.c:407:10: note: 'of_count_phandle_with_args' declared here
count = of_count_phandle_with_args(np, "trigger-sources",
^
>> drivers/leds/trigger/ledtrig-netdev.c:430:8: error: implicit declaration of function 'of_property_read_string' [-Werror,-Wimplicit-function-declaration]
err = of_property_read_string(np, "function", &function);
^
4 errors generated.
# https://github.com/0day-ci/linux/commit/2055fc3b24bb72ea2569a866ccfb1ee84...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Marek-Beh-n/Parse-DT-property-trigger-sources-for-netdev-LED-trigger/20200915-074253
git checkout 2055fc3b24bb72ea2569a866ccfb1ee840e0d385
vim +396 drivers/leds/trigger/ledtrig-netdev.c
392
393 static bool netdev_trig_of_parse(struct led_classdev *led_cdev,
394 struct led_netdev_data *trigger_data)
395 {
> 396 struct of_phandle_args args;
397 struct net_device *netdev;
398 struct device_node *np;
399 const char *function;
400 unsigned long mode;
401 int count, err;
402
403 np = dev_of_node(led_cdev->dev);
404 if (!np)
405 return -EOPNOTSUPP;
406
> 407 count = of_count_phandle_with_args(np, "trigger-sources",
408 "#trigger-source-cells");
409 if (count == -ENOENT) {
410 return false;
411 } else if (count < 0) {
412 dev_warn(led_cdev->dev,
413 "Failed parsing trigger sources for %pOF!\n", np);
414 return false;
415 }
416
417 /* netdev trigger can have only one source */
418 if (count != 1)
419 return false;
420
> 421 err = of_parse_phandle_with_args(np, "trigger-sources",
422 "#trigger-source-cells", 0, &args);
423 if (err)
424 return false;
425
426 netdev = of_find_net_device_by_node(args.np);
427 if (!netdev)
428 return false;
429
> 430 err = of_property_read_string(np, "function", &function);
431 if (err && err != -ENOENT) {
432 dev_warn(led_cdev->dev, "Failed parsing function for %pOF!\n",
433 np);
434 return false;
435 } else if (err == -ENOENT) {
436 /* default function is link */
437 function = LED_FUNCTION_LINK;
438 }
439
440 mode = 0;
441 if (!strcmp(function, LED_FUNCTION_LINK)) {
442 set_bit(NETDEV_LED_LINK, &mode);
443 } else if (!strcmp(function, LED_FUNCTION_ACTIVITY)) {
444 set_bit(NETDEV_LED_TX, &mode);
445 set_bit(NETDEV_LED_RX, &mode);
446 } else if (!strcmp(function, LED_FUNCTION_RX)) {
447 set_bit(NETDEV_LED_RX, &mode);
448 } else if (!strcmp(function, LED_FUNCTION_TX)) {
449 set_bit(NETDEV_LED_TX, &mode);
450 } else {
451 dev_dbg(led_cdev->dev,
452 "Unsupported netdev trigger function for %pOF!\n", np);
453 return false;
454 }
455
456 if (trigger_data) {
457 dev_hold(netdev);
458 trigger_data->net_dev = netdev;
459 memcpy(trigger_data->device_name, netdev->name, IFNAMSIZ);
460 trigger_data->mode = mode;
461 if (netif_carrier_ok(netdev))
462 set_bit(NETDEV_LED_MODE_LINKUP, &trigger_data->mode);
463 }
464
465 return true;
466 }
467
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[ti:ti-linux-5.4.y 2795/9671] drivers/pci/endpoint/pci-epf-core.c:133 pci_epf_add_vepf() warn: inconsistent returns 'epf_pf->lock'.
by Dan Carpenter
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: 5fd9bb3f78d32f23d809e9c2a689925c7bd774f9
commit: 46241066755af938ddbf829f86ae15b2eebaa3f5 [2795/9671] PCI: endpoint: Add support to add virtual function in endpoint core
config: x86_64-randconfig-m001-20200913 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/pci/endpoint/pci-epf-core.c:133 pci_epf_add_vepf() warn: inconsistent returns 'epf_pf->lock'.
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-linux-5.4.y
git checkout 46241066755af938ddbf829f86ae15b2eebaa3f5
vim +133 drivers/pci/endpoint/pci-epf-core.c
46241066755af93 Kishon Vijay Abraham I 2020-01-23 108 int pci_epf_add_vepf(struct pci_epf *epf_pf, struct pci_epf *epf_vf)
46241066755af93 Kishon Vijay Abraham I 2020-01-23 109 {
46241066755af93 Kishon Vijay Abraham I 2020-01-23 110 u32 vfunc_no;
46241066755af93 Kishon Vijay Abraham I 2020-01-23 111
46241066755af93 Kishon Vijay Abraham I 2020-01-23 112 if (IS_ERR_OR_NULL(epf_pf) || IS_ERR_OR_NULL(epf_vf))
46241066755af93 Kishon Vijay Abraham I 2020-01-23 113 return -EINVAL;
46241066755af93 Kishon Vijay Abraham I 2020-01-23 114
46241066755af93 Kishon Vijay Abraham I 2020-01-23 115 if (epf_pf->epc || epf_vf->epc || epf_vf->epf_pf)
46241066755af93 Kishon Vijay Abraham I 2020-01-23 116 return -EBUSY;
46241066755af93 Kishon Vijay Abraham I 2020-01-23 117
46241066755af93 Kishon Vijay Abraham I 2020-01-23 118 mutex_lock(&epf_pf->lock);
^^^^^^^^^^^^^^^^^^^^^^^^^
46241066755af93 Kishon Vijay Abraham I 2020-01-23 119 vfunc_no = find_first_zero_bit(&epf_pf->vfunction_num_map,
46241066755af93 Kishon Vijay Abraham I 2020-01-23 120 BITS_PER_LONG);
46241066755af93 Kishon Vijay Abraham I 2020-01-23 121 if (vfunc_no >= BITS_PER_LONG)
46241066755af93 Kishon Vijay Abraham I 2020-01-23 122 return -EINVAL;
^^^^^^^^^^^^^^
ret = -EINVAL;
goto unlock?
46241066755af93 Kishon Vijay Abraham I 2020-01-23 123
46241066755af93 Kishon Vijay Abraham I 2020-01-23 124 set_bit(vfunc_no, &epf_pf->vfunction_num_map);
46241066755af93 Kishon Vijay Abraham I 2020-01-23 125 epf_vf->vfunc_no = vfunc_no;
46241066755af93 Kishon Vijay Abraham I 2020-01-23 126
46241066755af93 Kishon Vijay Abraham I 2020-01-23 127 epf_vf->epf_pf = epf_pf;
46241066755af93 Kishon Vijay Abraham I 2020-01-23 128 epf_vf->is_vf = true;
46241066755af93 Kishon Vijay Abraham I 2020-01-23 129
46241066755af93 Kishon Vijay Abraham I 2020-01-23 130 list_add_tail(&epf_vf->list, &epf_pf->pci_vepf);
46241066755af93 Kishon Vijay Abraham I 2020-01-23 131 mutex_unlock(&epf_pf->lock);
46241066755af93 Kishon Vijay Abraham I 2020-01-23 132
46241066755af93 Kishon Vijay Abraham I 2020-01-23 @133 return 0;
46241066755af93 Kishon Vijay Abraham I 2020-01-23 134 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v2] Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support
by kernel test robot
Hi Rocky,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on linus/master v5.9-rc5 next-20200914]
[cannot apply to linux/master]
[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/Rocky-Liao/Bluetooth-btusb-Add-Q...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: mips-randconfig-s031-20200913 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/bluetooth/btusb.c:1798:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1798:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1798:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1798:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1802:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1802:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1802:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1802:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1806:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1806:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1806:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1806:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1810:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1810:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1810:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1810:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1814:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1814:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1814:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1814:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2324:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2324:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2324:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2324:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2333:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2333:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2333:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2333:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2334:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2334:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2334:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2334:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2335:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2335:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2335:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2335:25: sparse: sparse: cast to restricted __le16
>> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
>> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
>> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
>> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
>> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
>> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
# https://github.com/0day-ci/linux/commit/9efa46880370bdf87d87ebc14f562fc9d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rocky-Liao/Bluetooth-btusb-Add-Qualcomm-Bluetooth-SoC-WCN6855-support/20200914-172810
git checkout 9efa46880370bdf87d87ebc14f562fc9d3cbfa01
vim +3584 drivers/bluetooth/btusb.c
3552
3553 static int btusb_setup_qca_load_rampatch(struct hci_dev *hdev,
3554 struct qca_version *ver,
3555 const struct qca_device_info *info)
3556 {
3557 struct qca_rampatch_version *rver;
3558 const struct firmware *fw;
3559 u32 ver_rom, ver_patch, rver_rom;
3560 u16 rver_rom_low, rver_rom_high, rver_patch;
3561 char fwname[64];
3562 int err;
3563
3564 ver_rom = le32_to_cpu(ver->rom_version);
3565 ver_patch = le32_to_cpu(ver->patch_version);
3566
3567 snprintf(fwname, sizeof(fwname), "qca/rampatch_usb_%08x.bin", ver_rom);
3568
3569 err = request_firmware(&fw, fwname, &hdev->dev);
3570 if (err) {
3571 bt_dev_err(hdev, "failed to request rampatch file: %s (%d)",
3572 fwname, err);
3573 return err;
3574 }
3575
3576 bt_dev_info(hdev, "using rampatch file: %s", fwname);
3577
3578 rver = (struct qca_rampatch_version *)(fw->data + info->ver_offset);
3579 rver_rom_low = le16_to_cpu(rver->rom_version);
3580 rver_patch = le16_to_cpu(rver->patch_version);
3581
3582 if (ver_rom & ~0xffffU) {
3583 rver_rom_high = le16_to_cpu(*(__le16 *)(fw->data + 16));
> 3584 rver_rom = le32_to_cpu(rver_rom_high << 16 | rver_rom_low);
3585 } else {
3586 rver_rom = (__force u32)rver_rom_low;
3587 }
3588
3589 bt_dev_info(hdev, "QCA: patch rome 0x%x build 0x%x, "
3590 "firmware rome 0x%x build 0x%x",
3591 rver_rom, rver_patch, ver_rom, ver_patch);
3592
3593 if (rver_rom != ver_rom || rver_patch <= ver_patch) {
3594 bt_dev_err(hdev, "rampatch file version did not match with firmware");
3595 err = -EINVAL;
3596 goto done;
3597 }
3598
3599 err = btusb_setup_qca_download_fw(hdev, fw, info->rampatch_hdr);
3600
3601 done:
3602 release_firmware(fw);
3603
3604 return err;
3605 }
3606
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[mark-rutland:kcsan/rework 8/8] kernel/kcsan/report.c:415:14: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long')
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git kcsan/rework
head: d23e0222d49db5884782997974d9d7449d739e5b
commit: d23e0222d49db5884782997974d9d7449d739e5b [8/8] kcsan: report observed value changes
config: x86_64-randconfig-a016-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 3ed89b51da38f081fedb57727076262abb81d149)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout d23e0222d49db5884782997974d9d7449d739e5b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> kernel/kcsan/report.c:415:14: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
hex_len, old, hex_len, new);
^~~
include/linux/printk.h:339:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
kernel/kcsan/report.c:415:28: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
hex_len, old, hex_len, new);
^~~
include/linux/printk.h:339:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
kernel/kcsan/report.c:417:14: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
hex_len, diff, hex_len, mask);
^~~~
include/linux/printk.h:339:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
kernel/kcsan/report.c:417:29: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
hex_len, diff, hex_len, mask);
^~~~
include/linux/printk.h:339:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
4 warnings generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id...
git remote add mark-rutland https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark-rutland kcsan/rework
git checkout d23e0222d49db5884782997974d9d7449d739e5b
vim +415 kernel/kcsan/report.c
322
323 static void print_report(enum kcsan_value_change value_change,
324 const struct access_info *ai,
325 const struct other_info *other_info,
326 u64 old, u64 new, u64 mask)
327 {
328 unsigned long stack_entries[NUM_STACK_ENTRIES] = { 0 };
329 int num_stack_entries = stack_trace_save(stack_entries, NUM_STACK_ENTRIES, 1);
330 int skipnr = get_stack_skipnr(stack_entries, num_stack_entries);
331 unsigned long this_frame = stack_entries[skipnr];
332 unsigned long other_frame = 0;
333 int other_skipnr = 0; /* silence uninit warnings */
334
335 /*
336 * Must check report filter rules before starting to print.
337 */
338 if (skip_report(KCSAN_VALUE_CHANGE_TRUE, stack_entries[skipnr]))
339 return;
340
341 if (other_info) {
342 other_skipnr = get_stack_skipnr(other_info->stack_entries,
343 other_info->num_stack_entries);
344 other_frame = other_info->stack_entries[other_skipnr];
345
346 /* @value_change is only known for the other thread */
347 if (skip_report(value_change, other_frame))
348 return;
349 }
350
351 if (rate_limit_report(this_frame, other_frame))
352 return;
353
354 /* Print report header. */
355 pr_err("==================================================================\n");
356 if (other_info) {
357 int cmp;
358
359 /*
360 * Order functions lexographically for consistent bug titles.
361 * Do not print offset of functions to keep title short.
362 */
363 cmp = sym_strcmp((void *)other_frame, (void *)this_frame);
364 pr_err("BUG: KCSAN: %s in %ps / %ps\n",
365 get_bug_type(ai->access_type | other_info->ai.access_type),
366 (void *)(cmp < 0 ? other_frame : this_frame),
367 (void *)(cmp < 0 ? this_frame : other_frame));
368 } else {
369 pr_err("BUG: KCSAN: %s in %pS\n", get_bug_type(ai->access_type),
370 (void *)this_frame);
371 }
372
373 pr_err("\n");
374
375 /* Print information about the racing accesses. */
376 if (other_info) {
377 pr_err("%s to 0x%px of %zu bytes by %s on cpu %i:\n",
378 get_access_type(other_info->ai.access_type), other_info->ai.ptr,
379 other_info->ai.size, get_thread_desc(other_info->ai.task_pid),
380 other_info->ai.cpu_id);
381
382 /* Print the other thread's stack trace. */
383 stack_trace_print(other_info->stack_entries + other_skipnr,
384 other_info->num_stack_entries - other_skipnr,
385 0);
386
387 if (IS_ENABLED(CONFIG_KCSAN_VERBOSE))
388 print_verbose_info(other_info->task);
389
390 pr_err("\n");
391 pr_err("%s to 0x%px of %zu bytes by %s on cpu %i:\n",
392 get_access_type(ai->access_type), ai->ptr, ai->size,
393 get_thread_desc(ai->task_pid), ai->cpu_id);
394 } else {
395 pr_err("race at unknown origin, with %s to 0x%px of %zu bytes by %s on cpu %i:\n",
396 get_access_type(ai->access_type), ai->ptr, ai->size,
397 get_thread_desc(ai->task_pid), ai->cpu_id);
398 }
399 /* Print stack trace of this thread. */
400 stack_trace_print(stack_entries + skipnr, num_stack_entries - skipnr,
401 0);
402
403 if (IS_ENABLED(CONFIG_KCSAN_VERBOSE))
404 print_verbose_info(current);
405
406 /* Print observed value change */
407 if (ai->size <= 8) {
408 int hex_len = ai->size * 2;
409 u64 diff = old ^ new;
410 if (mask)
411 diff &= mask;
412 if (diff) {
413 pr_err("\n");
414 pr_err("value changed from 0x%0*lx to 0x%0*lx\n",
> 415 hex_len, old, hex_len, new);
416 pr_err("bits changed 0x%0*lx with mask 0x%0*lx\n",
417 hex_len, diff, hex_len, mask);
418 }
419 }
420
421 /* Print report footer. */
422 pr_err("\n");
423 pr_err("Reported by Kernel Concurrency Sanitizer on:\n");
424 dump_stack_print_info(KERN_DEFAULT);
425 pr_err("==================================================================\n");
426
427 if (panic_on_warn)
428 panic("panic_on_warn set ...\n");
429 }
430
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[toke:bpf-freplace-multi-attach-alt-04 2/8] drivers/usb/host/ehci-platform.c:251:24: warning: shift count >= width of type
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git bpf-freplace-multi-attach-alt-04
head: 4b32f3fa732bbc5ab739fc9a0b9864c66a6183fd
commit: 90c87648e09050acc77c42e0ed26a8c30e175111 [2/8] bpf: verifier: refactor check_attach_btf_id()
config: s390-randconfig-r011-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
git checkout 90c87648e09050acc77c42e0ed26a8c30e175111
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/usb/host/ehci-platform.c:23:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/usb/host/ehci-platform.c:23:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/usb/host/ehci-platform.c:23:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/usb/host/ehci-platform.c:23:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from drivers/usb/host/ehci-platform.c:37:
In file included from include/linux/usb/of.h:12:
In file included from include/linux/usb/otg.h:13:
In file included from include/linux/phy/phy.h:17:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
include/linux/bpf.h:677:15: error: must use 'struct' tag to refer to type 'bpf_trampoline'
static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
^
struct
>> drivers/usb/host/ehci-platform.c:251:24: warning: shift count >= width of type [-Wshift-count-overflow]
pdata->dma_mask_64 ? DMA_BIT_MASK(64) : DMA_BIT_MASK(32));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
21 warnings and 1 error generated.
--
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/mmc/host/sdhci.c:14:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/mmc/host/sdhci.c:14:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/mmc/host/sdhci.c:14:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/mmc/host/sdhci.c:14:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from drivers/mmc/host/sdhci.c:24:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
include/linux/bpf.h:677:15: error: must use 'struct' tag to refer to type 'bpf_trampoline'
static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
^
struct
>> drivers/mmc/host/sdhci.c:3953:40: warning: shift count >= width of type [-Wshift-count-overflow]
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/mmc/host/sdhci.c:4254:20: warning: shift count >= width of type [-Wshift-count-overflow]
host->dma_mask = DMA_BIT_MASK(64);
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
22 warnings and 1 error generated.
--
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:15:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:15:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:15:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:15:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:23:
In file included from include/linux/phy/phy.h:17:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
include/linux/bpf.h:677:15: error: must use 'struct' tag to refer to type 'bpf_trampoline'
static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
^
struct
>> drivers/usb/gadget/udc/bdc/bdc_core.c:557:36: warning: shift count >= width of type [-Wshift-count-overflow]
!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) {
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
21 warnings and 1 error generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git/commit/?id...
git remote add toke https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
git fetch --no-tags toke bpf-freplace-multi-attach-alt-04
git checkout 90c87648e09050acc77c42e0ed26a8c30e175111
vim +251 drivers/usb/host/ehci-platform.c
cc7eac1e4afdd1 Yoshihiro Shimoda 2020-01-27 230
41ac7b3ab7fe1d Bill Pemberton 2012-11-19 231 static int ehci_platform_probe(struct platform_device *dev)
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 232 {
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 233 struct usb_hcd *hcd;
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 234 struct resource *res_mem;
a4aeb211757129 Hans de Goede 2014-02-07 235 struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev);
a4aeb211757129 Hans de Goede 2014-02-07 236 struct ehci_platform_priv *priv;
ad3db5dabad169 Hans de Goede 2014-02-07 237 struct ehci_hcd *ehci;
27b3df4139d558 Martin Blumenstingl 2018-03-03 238 int err, irq, clk = 0;
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 239
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 240 if (usb_disabled())
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 241 return -ENODEV;
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 242
f3bc64d6d1f21c Arnd Bergmann 2013-03-27 243 /*
a4aeb211757129 Hans de Goede 2014-02-07 244 * Use reasonable defaults so platforms don't have to provide these
a4aeb211757129 Hans de Goede 2014-02-07 245 * with DT probing on ARM.
f3bc64d6d1f21c Arnd Bergmann 2013-03-27 246 */
a4aeb211757129 Hans de Goede 2014-02-07 247 if (!pdata)
a4aeb211757129 Hans de Goede 2014-02-07 248 pdata = &ehci_platform_defaults;
e1fd7341837238 Russell King 2013-06-27 249
c99e76c55f68ea Andreas Herrmann 2015-01-12 250 err = dma_coerce_mask_and_coherent(&dev->dev,
c99e76c55f68ea Andreas Herrmann 2015-01-12 @251 pdata->dma_mask_64 ? DMA_BIT_MASK(64) : DMA_BIT_MASK(32));
17f69b5fa6f642 Jeremy Linton 2015-08-19 252 if (err) {
17f69b5fa6f642 Jeremy Linton 2015-08-19 253 dev_err(&dev->dev, "Error: DMA mask configuration failed\n");
22d9d8e8316d7f Russell King 2013-06-10 254 return err;
17f69b5fa6f642 Jeremy Linton 2015-08-19 255 }
f3bc64d6d1f21c Arnd Bergmann 2013-03-27 256
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 257 irq = platform_get_irq(dev, 0);
b33f37064b743d Stephen Boyd 2019-07-30 258 if (irq < 0)
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 259 return irq;
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 260
a4aeb211757129 Hans de Goede 2014-02-07 261 hcd = usb_create_hcd(&ehci_platform_hc_driver, &dev->dev,
a4aeb211757129 Hans de Goede 2014-02-07 262 dev_name(&dev->dev));
a4aeb211757129 Hans de Goede 2014-02-07 263 if (!hcd)
a4aeb211757129 Hans de Goede 2014-02-07 264 return -ENOMEM;
a4aeb211757129 Hans de Goede 2014-02-07 265
a4aeb211757129 Hans de Goede 2014-02-07 266 platform_set_drvdata(dev, hcd);
a4aeb211757129 Hans de Goede 2014-02-07 267 dev->dev.platform_data = pdata;
a4aeb211757129 Hans de Goede 2014-02-07 268 priv = hcd_to_ehci_priv(hcd);
ad3db5dabad169 Hans de Goede 2014-02-07 269 ehci = hcd_to_ehci(hcd);
a4aeb211757129 Hans de Goede 2014-02-07 270
a4aeb211757129 Hans de Goede 2014-02-07 271 if (pdata == &ehci_platform_defaults && dev->dev.of_node) {
ad3db5dabad169 Hans de Goede 2014-02-07 272 if (of_property_read_bool(dev->dev.of_node, "big-endian-regs"))
ad3db5dabad169 Hans de Goede 2014-02-07 273 ehci->big_endian_mmio = 1;
ad3db5dabad169 Hans de Goede 2014-02-07 274
ad3db5dabad169 Hans de Goede 2014-02-07 275 if (of_property_read_bool(dev->dev.of_node, "big-endian-desc"))
ad3db5dabad169 Hans de Goede 2014-02-07 276 ehci->big_endian_desc = 1;
ad3db5dabad169 Hans de Goede 2014-02-07 277
ad3db5dabad169 Hans de Goede 2014-02-07 278 if (of_property_read_bool(dev->dev.of_node, "big-endian"))
ad3db5dabad169 Hans de Goede 2014-02-07 279 ehci->big_endian_mmio = ehci->big_endian_desc = 1;
ad3db5dabad169 Hans de Goede 2014-02-07 280
314b41b16a71ee Wu Liang feng 2014-12-24 281 if (of_property_read_bool(dev->dev.of_node,
314b41b16a71ee Wu Liang feng 2014-12-24 282 "needs-reset-on-resume"))
b4629a7bdfd8fc Alban Bedel 2015-08-04 283 priv->reset_on_resume = true;
314b41b16a71ee Wu Liang feng 2014-12-24 284
40f2f2a3255314 Joachim Eastwood 2015-05-16 285 if (of_property_read_bool(dev->dev.of_node,
40f2f2a3255314 Joachim Eastwood 2015-05-16 286 "has-transaction-translator"))
b4629a7bdfd8fc Alban Bedel 2015-08-04 287 hcd->has_tt = 1;
40f2f2a3255314 Joachim Eastwood 2015-05-16 288
cc7eac1e4afdd1 Yoshihiro Shimoda 2020-01-27 289 if (soc_device_match(quirk_poll_match))
cc7eac1e4afdd1 Yoshihiro Shimoda 2020-01-27 290 priv->quirk_poll = true;
cc7eac1e4afdd1 Yoshihiro Shimoda 2020-01-27 291
a4aeb211757129 Hans de Goede 2014-02-07 292 for (clk = 0; clk < EHCI_MAX_CLKS; clk++) {
a4aeb211757129 Hans de Goede 2014-02-07 293 priv->clks[clk] = of_clk_get(dev->dev.of_node, clk);
a4aeb211757129 Hans de Goede 2014-02-07 294 if (IS_ERR(priv->clks[clk])) {
a4aeb211757129 Hans de Goede 2014-02-07 295 err = PTR_ERR(priv->clks[clk]);
a4aeb211757129 Hans de Goede 2014-02-07 296 if (err == -EPROBE_DEFER)
a4aeb211757129 Hans de Goede 2014-02-07 297 goto err_put_clks;
a4aeb211757129 Hans de Goede 2014-02-07 298 priv->clks[clk] = NULL;
a4aeb211757129 Hans de Goede 2014-02-07 299 break;
a4aeb211757129 Hans de Goede 2014-02-07 300 }
a4aeb211757129 Hans de Goede 2014-02-07 301 }
a4aeb211757129 Hans de Goede 2014-02-07 302 }
a4aeb211757129 Hans de Goede 2014-02-07 303
8e84f8aa5306bb Masahiro Yamada 2017-11-02 304 priv->rsts = devm_reset_control_array_get_optional_shared(&dev->dev);
8e84f8aa5306bb Masahiro Yamada 2017-11-02 305 if (IS_ERR(priv->rsts)) {
8e84f8aa5306bb Masahiro Yamada 2017-11-02 306 err = PTR_ERR(priv->rsts);
8e84f8aa5306bb Masahiro Yamada 2017-11-02 307 goto err_put_clks;
d0e08b0077f49e Jiancheng Xue 2016-05-12 308 }
d0e08b0077f49e Jiancheng Xue 2016-05-12 309
8e84f8aa5306bb Masahiro Yamada 2017-11-02 310 err = reset_control_deassert(priv->rsts);
76d15c8fba655c Hans de Goede 2016-06-08 311 if (err)
8e84f8aa5306bb Masahiro Yamada 2017-11-02 312 goto err_put_clks;
2d87bbd634b0fe Boris Brezillon 2014-05-13 313
843d5e036419bd Alan Stern 2014-02-11 314 if (pdata->big_endian_desc)
843d5e036419bd Alan Stern 2014-02-11 315 ehci->big_endian_desc = 1;
843d5e036419bd Alan Stern 2014-02-11 316 if (pdata->big_endian_mmio)
843d5e036419bd Alan Stern 2014-02-11 317 ehci->big_endian_mmio = 1;
b4629a7bdfd8fc Alban Bedel 2015-08-04 318 if (pdata->has_tt)
b4629a7bdfd8fc Alban Bedel 2015-08-04 319 hcd->has_tt = 1;
b4629a7bdfd8fc Alban Bedel 2015-08-04 320 if (pdata->reset_on_resume)
b4629a7bdfd8fc Alban Bedel 2015-08-04 321 priv->reset_on_resume = true;
843d5e036419bd Alan Stern 2014-02-11 322
:::::: The code at line 251 was first introduced by commit
:::::: c99e76c55f68eaa0c307ba25803c4e59c2fca1ca USB: host: Introduce flag to enable use of 64-bit dma_mask for ehci-platform
:::::: TO: Andreas Herrmann <andreas.herrmann(a)caviumnetworks.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years