init/do_mounts_rd.o: warning: objtool: crd_load()+0x63: unreachable instruction
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Kees Cook <keescook(a)chromium.org>
CC: Andrew Morton <akpm(a)linux-foundation.org>
CC: Linux Memory Management List <linux-mm(a)kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f75aef392f869018f78cfedf3c320a6b3fcfda6b
commit: 0887a7ebc97770c7870abf3075a2e8cd502a7f52 ubsan: add trap instrumentation option
date: 5 months ago
config: x86_64-randconfig-r036-20200831 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c10e63677f5d20f18010f8f68c631ddc97546f7d)
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 0887a7ebc97770c7870abf3075a2e8cd502a7f52
# 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 >>):
>> init/do_mounts_rd.o: warning: objtool: crd_load()+0x63: unreachable instruction
--
>> init/main.o: warning: objtool: setup_command_line()+0x176: unreachable instruction
--
>> kernel/seccomp.o: warning: objtool: __secure_computing()+0x173: unreachable instruction
--
>> mm/page_ext.o: warning: objtool: page_ext_init()+0xfe: unreachable instruction
--
>> kernel/rcu/tree.o: warning: objtool: rcu_sched_clock_irq()+0x7e1: unreachable instruction
--
>> fs/dlm/lock.o: warning: objtool: dlm_put_lkb()+0x5d: unreachable instruction
--
>> fs/dlm/member.o: warning: objtool: dlm_recover_members()+0x64a: unreachable instruction
--
>> fs/dlm/recover.o: warning: objtool: dlm_recover_locks()+0x3a7: unreachable instruction
--
>> fs/dlm/user.o: warning: objtool: dlm_user_add_ast()+0x23c: unreachable instruction
--
>> fs/reiserfs/bitmap.o: warning: objtool: reiserfs_free_block()+0xaa: unreachable instruction
--
>> fs/reiserfs/namei.o: warning: objtool: search_by_entry_key()+0x24a: unreachable instruction
..
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-sof-driver:pr/2395 7/16] sound/soc/sof/topology.c:1437:48: error: 'core' undeclared
by kernel test robot
tree: https://github.com/thesofproject/linux pr/2395
head: f5d2f601dba6cf997465a0bd52412852e7b081f7
commit: 901ec5d619b041fcd9a12347a85091b90e19a6ac [7/16] ASoC: SOF: append extended data to sof_ipc_comp_dai
config: arm64-sof-customedconfig-sof-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
git checkout 901ec5d619b041fcd9a12347a85091b90e19a6ac
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>):
sound/soc/sof/topology.c: In function 'sof_widget_load_dai':
>> sound/soc/sof/topology.c:1437:48: error: 'core' undeclared (first use in this function)
1437 | sof_comp_alloc(swidget, &ipc_size, index, core);
| ^~~~
sound/soc/sof/topology.c:1437:48: note: each undeclared identifier is reported only once for each function it appears in
# https://github.com/thesofproject/linux/commit/901ec5d619b041fcd9a12347a85...
git remote add linux-sof-driver https://github.com/thesofproject/linux
git fetch --no-tags linux-sof-driver pr/2395
git checkout 901ec5d619b041fcd9a12347a85091b90e19a6ac
vim +/core +1437 sound/soc/sof/topology.c
1423
1424 static int sof_widget_load_dai(struct snd_soc_component *scomp, int index,
1425 struct snd_sof_widget *swidget,
1426 struct snd_soc_tplg_dapm_widget *tw,
1427 struct sof_ipc_comp_reply *r,
1428 struct snd_sof_dai *dai)
1429 {
1430 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
1431 struct snd_soc_tplg_private *private = &tw->priv;
1432 struct sof_ipc_comp_dai *comp_dai;
1433 size_t ipc_size = sizeof(*comp_dai);
1434 int ret;
1435
1436 comp_dai = (struct sof_ipc_comp_dai *)
> 1437 sof_comp_alloc(swidget, &ipc_size, index, core);
1438 if (!comp_dai)
1439 return -ENOMEM;
1440
1441 /* configure dai IPC message */
1442 comp_dai->comp.type = SOF_COMP_DAI;
1443 comp_dai->config.hdr.size = sizeof(comp_dai->config);
1444
1445 ret = sof_parse_tokens(scomp, comp_dai, dai_tokens,
1446 ARRAY_SIZE(dai_tokens), private->array,
1447 le32_to_cpu(private->size));
1448 if (ret != 0) {
1449 dev_err(scomp->dev, "error: parse dai tokens failed %d\n",
1450 le32_to_cpu(private->size));
1451 goto finish;
1452 }
1453
1454 ret = sof_parse_tokens(scomp, &comp_dai->config, comp_tokens,
1455 ARRAY_SIZE(comp_tokens), private->array,
1456 le32_to_cpu(private->size));
1457 if (ret != 0) {
1458 dev_err(scomp->dev, "error: parse dai.cfg tokens failed %d\n",
1459 private->size);
1460 goto finish;
1461 }
1462
1463 dev_dbg(scomp->dev, "dai %s: type %d index %d\n",
1464 swidget->widget->name, comp_dai->type, comp_dai->dai_index);
1465 sof_dbg_comp_config(scomp, &comp_dai->config);
1466
1467 ret = sof_ipc_tx_message(sdev->ipc, comp_dai->comp.hdr.cmd,
1468 comp_dai, ipc_size, r, sizeof(*r));
1469
1470 if (ret == 0 && dai) {
1471 dai->scomp = scomp;
1472
1473 /*
1474 * copy only the sof_ipc_comp_dai to avoid collapsing
1475 * the snd_sof_dai, the extended data is kept in the
1476 * snd_sof_widget.
1477 */
1478 memcpy(&dai->comp_dai, comp_dai, sizeof(*comp_dai));
1479 }
1480
1481 finish:
1482 kfree(comp_dai);
1483 return ret;
1484 }
1485
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[miquelraynal:mtd/next 8/8] drivers/mtd/mtdconcat.c:129:4: error: non-void function 'concat_panic_write' should return a value
by kernel test robot
tree: https://github.com/miquelraynal/linux-0day.git mtd/next
head: 9b3913fe065c506ade957fa83fb8f2c7ea33b9ff
commit: 9b3913fe065c506ade957fa83fb8f2c7ea33b9ff [8/8] mtd: mtdconcat: map through panic write handler
config: x86_64-randconfig-a005-20200831 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c10e63677f5d20f18010f8f68c631ddc97546f7d)
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 9b3913fe065c506ade957fa83fb8f2c7ea33b9ff
# 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/mtd/mtdconcat.c:129:4: error: non-void function 'concat_panic_write' should return a value [-Wreturn-type]
return;
^
1 error generated.
# https://github.com/miquelraynal/linux-0day/commit/9b3913fe065c506ade957fa...
git remote add miquelraynal https://github.com/miquelraynal/linux-0day.git
git fetch --no-tags miquelraynal mtd/next
git checkout 9b3913fe065c506ade957fa83fb8f2c7ea33b9ff
vim +/concat_panic_write +129 drivers/mtd/mtdconcat.c
104
105 static int
106 concat_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
107 size_t * retlen, const u_char * buf)
108 {
109 struct mtd_concat *concat = CONCAT(mtd);
110 int err = -EINVAL;
111 int i;
112 for (i = 0; i < concat->num_subdev; i++) {
113 struct mtd_info *subdev = concat->subdev[i];
114 size_t size, retsize;
115
116 if (to >= subdev->size) {
117 size = 0;
118 to -= subdev->size;
119 continue;
120 }
121 if (to + len > subdev->size)
122 size = subdev->size - to;
123 else
124 size = len;
125
126 err = mtd_panic_write(subdev, to, size, &retsize, buf);
127 if (err == -EOPNOTSUPP) {
128 printk(KERN_ERR "mtdconcat: Cannot write from panic without panic_write\n");
> 129 return;
130 }
131 if (err)
132 break;
133
134 *retlen += retsize;
135 len -= size;
136 if (len == 0)
137 break;
138
139 err = -EINVAL;
140 buf += size;
141 to = 0;
142 }
143 return err;
144 }
145
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[omap-audio:peter/linux-next-wip 25/72] sound/soc/codecs/tas2555.c:604:4: error: implicit declaration of function 'snd_soc_component_read32'; did you mean
by kernel test robot
tree: https://github.com/omap-audio/linux-audio peter/linux-next-wip
head: 4504c845ada3b30942ac7f05912e6b22973a91ef
commit: 6b40e794d11598674644c71ce32debe8a18b1323 [25/72] ASoC: Initial driver for TAS2555 Smart Amplifier
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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
git checkout 6b40e794d11598674644c71ce32debe8a18b1323
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
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 >>):
sound/soc/codecs/tas2555.c: In function 'tas2555_read':
sound/soc/codecs/tas2555.c:96:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
96 | int ret;
| ^~~
In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/i2c.h:13,
from sound/soc/codecs/tas2555.c:15:
sound/soc/codecs/tas2555.c: In function 'tas2555_fw_ready':
>> sound/soc/codecs/tas2555.c:604:4: error: implicit declaration of function 'snd_soc_component_read32'; did you mean 'snd_soc_component_read'? [-Werror=implicit-function-declaration]
604 | snd_soc_component_read32(component, TAS2555_CRC_CHECKSUM_REG));
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:33: note: in definition of macro 'dev_info'
110 | _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
# https://github.com/omap-audio/linux-audio/commit/6b40e794d11598674644c71c...
git remote add omap-audio https://github.com/omap-audio/linux-audio
git fetch --no-tags omap-audio peter/linux-next-wip
git checkout 6b40e794d11598674644c71ce32debe8a18b1323
vim +604 sound/soc/codecs/tas2555.c
558
559 static void tas2555_fw_ready(const struct firmware *fw, void *context)
560 {
561 struct snd_soc_component *component = (struct snd_soc_component *)context;
562 struct ti_dsp_fw_header *header;
563 struct ti_dsp_fw_entry *cmd;
564 size_t count;
565 unsigned int reg;
566 const u8 *data;
567
568 if (unlikely(!fw) || unlikely(!fw->data)) {
569 dev_info(component->dev, "%s firmware is not loaded.\n",
570 TAS2555_FW_MAME);
571 return;
572 }
573 data = fw->data;
574
575 header = (struct ti_dsp_fw_header *) fw->data;
576 if (header->deviceID != TAS2555_DEVICE_ID) {
577 dev_err(component->dev, "FW device ID (%u) is not valid.\n",
578 header->deviceID);
579 return;
580 }
581
582 dev_dbg(component->dev, "Firmware version %02u.%02u for customer: %u.\n",
583 header->fw_version.major, header->fw_version.minor,
584 header->customerID);
585
586 count = sizeof(*header);
587
588 snd_soc_component_write(component, TAS2555_CRC_RESET_REG, 1);
589 do {
590 cmd = (struct ti_dsp_fw_entry *) &data[count];
591 reg = TAS2555_REG((unsigned int)cmd->book,
592 (unsigned int)cmd->page,
593 (unsigned int)cmd->reg);
594 if (cmd->len == 1)
595 tas2555_write(component, reg, cmd->data[0]);
596 else
597 tas2555_bulk_write(component, reg, cmd->data, cmd->len);
598 count += sizeof(*cmd) + cmd->len;
599 } while(count < fw->size);
600
601 release_firmware(fw);
602
603 dev_info(component->dev, "uCDSP Checksum: 0x%02x\n",
> 604 snd_soc_component_read32(component, TAS2555_CRC_CHECKSUM_REG));
605 return;
606 }
607
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH v2 2/2] Input: gpio_keys - Simplify with dev_err_probe()
by Dan Carpenter
Hi Krzysztof,
url: https://github.com/0day-ci/linux/commits/Krzysztof-Kozlowski/gpio-Add-dev...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: x86_64-randconfig-m001-20200826 (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>
New smatch warnings:
drivers/input/keyboard/gpio_keys.c:500 gpio_keys_setup_key() error: uninitialized symbol 'error'.
# https://github.com/0day-ci/linux/commit/e138d2340a72b4f117d0da36fe7cddb4b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Krzysztof-Kozlowski/gpio-Add-devm_fwnode_gpiod_get_optional-helpers/20200827-041021
git checkout e138d2340a72b4f117d0da36fe7cddb4bc073c58
vim +/error +500 drivers/input/keyboard/gpio_keys.c
5298cc4cc753bb Bill Pemberton 2012-11-23 477 static int gpio_keys_setup_key(struct platform_device *pdev,
d9080921aa32c7 Dmitry Torokhov 2012-03-18 478 struct input_dev *input,
83e4947a569f4d Hans de Goede 2017-01-21 479 struct gpio_keys_drvdata *ddata,
700a38b27eefc5 Dmitry Torokhov 2016-10-19 480 const struct gpio_keys_button *button,
83e4947a569f4d Hans de Goede 2017-01-21 481 int idx,
700a38b27eefc5 Dmitry Torokhov 2016-10-19 482 struct fwnode_handle *child)
bc8f1eaf68a8aa Ben Dooks 2009-11-10 483 {
92a47674f57b4a Alexander Stein 2011-04-11 484 const char *desc = button->desc ? button->desc : "gpio_keys";
9e3af04f878731 Mika Westerberg 2010-02-04 485 struct device *dev = &pdev->dev;
83e4947a569f4d Hans de Goede 2017-01-21 486 struct gpio_button_data *bdata = &ddata->data[idx];
d8ee4a1c90529e Laxman Dewangan 2012-03-19 487 irq_handler_t isr;
9e3af04f878731 Mika Westerberg 2010-02-04 488 unsigned long irqflags;
27245519f0de50 Alexander Shiyan 2014-04-28 489 int irq;
27245519f0de50 Alexander Shiyan 2014-04-28 490 int error;
^^^^^^^^^
bc8f1eaf68a8aa Ben Dooks 2009-11-10 491
d9080921aa32c7 Dmitry Torokhov 2012-03-18 492 bdata->input = input;
d9080921aa32c7 Dmitry Torokhov 2012-03-18 493 bdata->button = button;
d8ee4a1c90529e Laxman Dewangan 2012-03-19 494 spin_lock_init(&bdata->lock);
d8ee4a1c90529e Laxman Dewangan 2012-03-19 495
700a38b27eefc5 Dmitry Torokhov 2016-10-19 496 if (child) {
e138d2340a72b4 Krzysztof Kozlowski 2020-08-26 497 bdata->gpiod = devm_fwnode_gpiod_get_optional(dev, child, NULL,
e138d2340a72b4 Krzysztof Kozlowski 2020-08-26 498 GPIOD_IN, desc);
e138d2340a72b4 Krzysztof Kozlowski 2020-08-26 499 if (IS_ERR(bdata->gpiod))
e138d2340a72b4 Krzysztof Kozlowski 2020-08-26 @500 return dev_err_probe(dev, error, "failed to get gpio\n");
^^^^^
Uninitialized
700a38b27eefc5 Dmitry Torokhov 2016-10-19 501 } else if (gpio_is_valid(button->gpio)) {
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 502 /*
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 503 * Legacy GPIO number, so request the GPIO here and
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 504 * convert it to descriptor.
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 505 */
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 506 unsigned flags = GPIOF_IN;
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 507
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 508 if (button->active_low)
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 509 flags |= GPIOF_ACTIVE_LOW;
bc8f1eaf68a8aa Ben Dooks 2009-11-10 510
b4e66e7d1948e0 Guenter Roeck 2017-01-21 511 error = devm_gpio_request_one(dev, button->gpio, flags, desc);
bc8f1eaf68a8aa Ben Dooks 2009-11-10 512 if (error < 0) {
d8ee4a1c90529e Laxman Dewangan 2012-03-19 513 dev_err(dev, "Failed to request GPIO %d, error %d\n",
bc8f1eaf68a8aa Ben Dooks 2009-11-10 514 button->gpio, error);
d8ee4a1c90529e Laxman Dewangan 2012-03-19 515 return error;
bc8f1eaf68a8aa Ben Dooks 2009-11-10 516 }
bc8f1eaf68a8aa Ben Dooks 2009-11-10 517
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 518 bdata->gpiod = gpio_to_desc(button->gpio);
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 519 if (!bdata->gpiod)
5feeca3c1e39c0 Geert Uytterhoeven 2016-10-19 520 return -EINVAL;
700a38b27eefc5 Dmitry Torokhov 2016-10-19 521 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[mlankhorst:nerf-userptr 1/7] include/linux/dma-resv.h:78:28: error: implicit declaration of function 'lockdep_is_held'; did you mean
by kernel test robot
tree: git://people.freedesktop.org/~mlankhorst/linux nerf-userptr
head: f08502403768a0d85cfaaa7ca57b91b16bc8efae
commit: 5a60e965cd4e7893f197dfffeb3a6315f949fcf1 [1/7] drm/i915: Ensure we hold the object mutex in pin correctly.
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 5a60e965cd4e7893f197dfffeb3a6315f949fcf1
# 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 >>):
In file included from arch/x86/include/asm/bug.h:93,
from include/linux/bug.h:5,
from arch/x86/include/asm/paravirt.h:15,
from arch/x86/include/asm/irqflags.h:72,
from include/linux/irqflags.h:16,
from include/linux/rcupdate.h:26,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/sched/mm.h:7,
from drivers/gpu/drm/i915/i915_vma.c:25:
drivers/gpu/drm/i915/i915_vma.c: In function 'i915_ggtt_pin':
>> include/linux/dma-resv.h:78:28: error: implicit declaration of function 'lockdep_is_held'; did you mean 'lockdep_assert_held'? [-Werror=implicit-function-declaration]
78 | #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
| ^~~~~~~~~~~~~~~
include/asm-generic/bug.h:128:25: note: in definition of macro 'WARN'
128 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
drivers/gpu/drm/i915/i915_vma.c:1021:2: note: in expansion of macro 'WARN_ON'
1021 | WARN_ON(!ww && vma->resv && dma_resv_held(vma->resv));
| ^~~~~~~
drivers/gpu/drm/i915/i915_vma.c:1021:30: note: in expansion of macro 'dma_resv_held'
1021 | WARN_ON(!ww && vma->resv && dma_resv_held(vma->resv));
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
git remote add mlankhorst git://people.freedesktop.org/~mlankhorst/linux
git fetch --no-tags mlankhorst nerf-userptr
git checkout 5a60e965cd4e7893f197dfffeb3a6315f949fcf1
vim +78 include/linux/dma-resv.h
786d7257e537da include/linux/reservation.h Maarten Lankhorst 2013-06-27 77
52791eeec1d9f4 include/linux/dma-resv.h Christian König 2019-08-11 @78 #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
52791eeec1d9f4 include/linux/dma-resv.h Christian König 2019-08-11 79 #define dma_resv_assert_held(obj) lockdep_assert_held(&(obj)->lock.base)
04a5faa8cbe5a8 include/linux/reservation.h Maarten Lankhorst 2014-07-01 80
:::::: The code at line 78 was first introduced by commit
:::::: 52791eeec1d9f4a7e7fe08aaba0b1553149d93bc dma-buf: rename reservation_object to dma_resv
:::::: TO: Christian König <christian.koenig(a)amd.com>
:::::: CC: Christian König <christian.koenig(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[iio:testing 17/95] drivers/iio/light/as73211.c:213 as73211_integration_time_calc_avail() error: buffer overflow 'data->int_time_avail' 30 <= 58
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: 283d2403beb406f0906cfbb2c9d7aa61cbcbbeed
commit: 77ed24daa40b3ce41610268d8307a50d82b382ad [17/95] iio: light: as73211: New driver
config: mips-randconfig-m031-20200831 (attached as .config)
compiler: mips-linux-gcc (GCC) 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>
New smatch warnings:
drivers/iio/light/as73211.c:213 as73211_integration_time_calc_avail() error: buffer overflow 'data->int_time_avail' 30 <= 58
# https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?id=...
git remote add iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
git fetch --no-tags iio testing
git checkout 77ed24daa40b3ce41610268d8307a50d82b382ad
vim +213 drivers/iio/light/as73211.c
77ed24daa40b3c Christian Eggers 2020-08-05 206 static void as73211_integration_time_calc_avail(struct as73211_data *data)
77ed24daa40b3c Christian Eggers 2020-08-05 207 {
77ed24daa40b3c Christian Eggers 2020-08-05 208 int i;
77ed24daa40b3c Christian Eggers 2020-08-05 209
77ed24daa40b3c Christian Eggers 2020-08-05 210 for (i = 0; i < ARRAY_SIZE(data->int_time_avail); i++) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77ed24daa40b3c Christian Eggers 2020-08-05 211 unsigned int time_us = as73211_integration_time_us(data, BIT(i));
77ed24daa40b3c Christian Eggers 2020-08-05 212
77ed24daa40b3c Christian Eggers 2020-08-05 @213 data->int_time_avail[i * 2 + 0] = time_us / USEC_PER_SEC;
^^^^^^^^^
Buffer overflow
77ed24daa40b3c Christian Eggers 2020-08-05 214 data->int_time_avail[i * 2 + 1] = time_us % USEC_PER_SEC;
^^^^^^^^^^^^^^^^^^^^^^^^
77ed24daa40b3c Christian Eggers 2020-08-05 215 }
77ed24daa40b3c Christian Eggers 2020-08-05 216 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH v9 2/3] drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge
by kernel test robot
Hi Swapnil,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.9-rc3 next-20200828]
[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/Swapnil-Jakhade/drm-Add-support-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_fw_activate':
>> drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:749:10: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744073709551613' to '4294967293' [-Woverflow]
749 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_fill_host_caps':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:1355:2: error: implicit declaration of function 'phy_get_attrs' [-Werror=implicit-function-declaration]
1355 | phy_get_attrs(mhdp->phy, &attrs);
| ^~~~~~~~~~~~~
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:1361:19: error: 'struct phy_attrs' has no member named 'max_link_rate'
1361 | link_rate = attrs.max_link_rate;
| ^
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_attach':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:1680:10: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744073709551613' to '4294967293' [-Woverflow]
1680 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_bridge_hpd_enable':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:2152:10: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744073709551613' to '4294967293' [-Woverflow]
2152 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/f9a2fb8569e017b7eaba3a94afc958117...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Swapnil-Jakhade/drm-Add-support-for-Cadence-MHDP8546-DPI-DP-bridge-and-J721E-wrapper/20200831-162549
git checkout f9a2fb8569e017b7eaba3a94afc9581179c2b62b
vim +749 drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
692
693 static int cdns_mhdp_fw_activate(const struct firmware *fw,
694 struct cdns_mhdp_device *mhdp)
695 {
696 unsigned int reg;
697 int ret;
698
699 /* Release uCPU reset and stall it. */
700 writel(CDNS_CPU_STALL, mhdp->regs + CDNS_APB_CTRL);
701
702 memcpy_toio(mhdp->regs + CDNS_MHDP_IMEM, fw->data, fw->size);
703
704 /* Leave debug mode, release stall */
705 writel(0, mhdp->regs + CDNS_APB_CTRL);
706
707 /*
708 * Wait for the KEEP_ALIVE "message" on the first 8 bits.
709 * Updated each sched "tick" (~2ms)
710 */
711 ret = readl_poll_timeout(mhdp->regs + CDNS_KEEP_ALIVE, reg,
712 reg & CDNS_KEEP_ALIVE_MASK, 500,
713 CDNS_KEEP_ALIVE_TIMEOUT);
714 if (ret) {
715 dev_err(mhdp->dev,
716 "device didn't give any life sign: reg %d\n", reg);
717 return ret;
718 }
719
720 ret = cdns_mhdp_check_fw_version(mhdp);
721 if (ret)
722 return ret;
723
724 /* Init events to 0 as it's not cleared by FW at boot but on read */
725 readl(mhdp->regs + CDNS_SW_EVENT0);
726 readl(mhdp->regs + CDNS_SW_EVENT1);
727 readl(mhdp->regs + CDNS_SW_EVENT2);
728 readl(mhdp->regs + CDNS_SW_EVENT3);
729
730 /* Activate uCPU */
731 ret = cdns_mhdp_set_firmware_active(mhdp, true);
732 if (ret)
733 return ret;
734
735 spin_lock(&mhdp->start_lock);
736
737 mhdp->hw_state = MHDP_HW_READY;
738
739 /*
740 * Here we must keep the lock while enabling the interrupts
741 * since it would otherwise be possible that interrupt enable
742 * code is executed after the bridge is detached. The similar
743 * situation is not possible in attach()/detach() callbacks
744 * since the hw_state changes from MHDP_HW_READY to
745 * MHDP_HW_STOPPED happens only due to driver removal when
746 * bridge should already be detached.
747 */
748 if (mhdp->bridge_attached)
> 749 writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
750 mhdp->regs + CDNS_APB_INT_MASK);
751
752 spin_unlock(&mhdp->start_lock);
753
754 wake_up(&mhdp->fw_load_wq);
755 dev_dbg(mhdp->dev, "DP FW activated\n");
756
757 return 0;
758 }
759
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH net-next RFC v3 03/14] devlink: Add reload actions counters to dev get
by Dan Carpenter
Hi Moshe,
[FYI, it's a private test report for your RFC patch.]
url: https://github.com/0day-ci/linux/commits/Moshe-Shemesh/Add-devlink-reload...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 0f091e43310f5c292b7094f9f115e651358e8053
config: i386-randconfig-m021-20200830 (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>
New smatch warnings:
net/core/devlink.c:507 devlink_nl_fill() error: buffer overflow 'devlink->reload_actions_cnts' 3 <= 3
Old smatch warnings:
net/core/devlink.c:5356 devlink_fmsg_prepare_skb() error: uninitialized symbol 'err'.
include/linux/u64_stats_sync.h:128 u64_stats_update_begin() warn: statement has no effect 31
# https://github.com/0day-ci/linux/commit/009b615f56e566df8c2712eb3b126c619...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Moshe-Shemesh/Add-devlink-reload-action-option/20200830-233543
git checkout 009b615f56e566df8c2712eb3b126c61959549d4
vim +507 net/core/devlink.c
bfcd3a466172094 Jiri Pirko 2016-02-26 476 static int devlink_nl_fill(struct sk_buff *msg, struct devlink *devlink,
bfcd3a466172094 Jiri Pirko 2016-02-26 477 enum devlink_command cmd, u32 portid,
bfcd3a466172094 Jiri Pirko 2016-02-26 478 u32 seq, int flags)
bfcd3a466172094 Jiri Pirko 2016-02-26 479 {
009b615f56e566d Moshe Shemesh 2020-08-30 480 struct nlattr *reload_actions_cnts, *reload_action_cnt;
bfcd3a466172094 Jiri Pirko 2016-02-26 481 void *hdr;
009b615f56e566d Moshe Shemesh 2020-08-30 482 int i;
bfcd3a466172094 Jiri Pirko 2016-02-26 483
bfcd3a466172094 Jiri Pirko 2016-02-26 484 hdr = genlmsg_put(msg, portid, seq, &devlink_nl_family, flags, cmd);
bfcd3a466172094 Jiri Pirko 2016-02-26 485 if (!hdr)
bfcd3a466172094 Jiri Pirko 2016-02-26 486 return -EMSGSIZE;
bfcd3a466172094 Jiri Pirko 2016-02-26 487
bfcd3a466172094 Jiri Pirko 2016-02-26 488 if (devlink_nl_put_handle(msg, devlink))
bfcd3a466172094 Jiri Pirko 2016-02-26 489 goto nla_put_failure;
2670ac2625f9855 Jiri Pirko 2019-09-12 490 if (nla_put_u8(msg, DEVLINK_ATTR_RELOAD_FAILED, devlink->reload_failed))
2670ac2625f9855 Jiri Pirko 2019-09-12 491 goto nla_put_failure;
bfcd3a466172094 Jiri Pirko 2016-02-26 492
009b615f56e566d Moshe Shemesh 2020-08-30 493 if (devlink_reload_supported(devlink)) {
009b615f56e566d Moshe Shemesh 2020-08-30 494 reload_actions_cnts = nla_nest_start(msg, DEVLINK_ATTR_RELOAD_ACTIONS_CNTS);
009b615f56e566d Moshe Shemesh 2020-08-30 495 if (!reload_actions_cnts)
009b615f56e566d Moshe Shemesh 2020-08-30 496 goto nla_put_failure;
009b615f56e566d Moshe Shemesh 2020-08-30 497
009b615f56e566d Moshe Shemesh 2020-08-30 498 for (i = 0; i <= DEVLINK_RELOAD_ACTION_MAX; i++) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
i is 0-3, I guess. Should this be < instead of <=?
009b615f56e566d Moshe Shemesh 2020-08-30 499 if (!devlink_reload_action_is_supported(devlink, i))
009b615f56e566d Moshe Shemesh 2020-08-30 500 continue;
009b615f56e566d Moshe Shemesh 2020-08-30 501 reload_action_cnt = nla_nest_start(msg, DEVLINK_ATTR_RELOAD_ACTION_CNT);
009b615f56e566d Moshe Shemesh 2020-08-30 502 if (!reload_action_cnt)
009b615f56e566d Moshe Shemesh 2020-08-30 503 goto reload_actions_cnts_nest_cancel;
009b615f56e566d Moshe Shemesh 2020-08-30 504 if (nla_put_u8(msg, DEVLINK_ATTR_RELOAD_ACTION, i))
009b615f56e566d Moshe Shemesh 2020-08-30 505 goto reload_action_cnt_nest_cancel;
009b615f56e566d Moshe Shemesh 2020-08-30 506 if (nla_put_u8(msg, DEVLINK_ATTR_RELOAD_ACTION_CNT_VALUE,
009b615f56e566d Moshe Shemesh 2020-08-30 @507 devlink->reload_actions_cnts[i]))
^^^
009b615f56e566d Moshe Shemesh 2020-08-30 508 goto reload_action_cnt_nest_cancel;
009b615f56e566d Moshe Shemesh 2020-08-30 509 nla_nest_end(msg, reload_action_cnt);
009b615f56e566d Moshe Shemesh 2020-08-30 510 }
009b615f56e566d Moshe Shemesh 2020-08-30 511 nla_nest_end(msg, reload_actions_cnts);
009b615f56e566d Moshe Shemesh 2020-08-30 512 }
009b615f56e566d Moshe Shemesh 2020-08-30 513
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months