[chrome-os:chromeos-5.4 48/67] drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_common.c:47:5: warning: format specifies type 'long long' but the argument has type 'int'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 1b71f6d620191293322fc574c20ed5130b794ac7
commit: 1ea1e179a23d9b3963a2aca7f7c9def0e6c38535 [48/67] CHROMIUM: media: mtk-vcodec: Extract H264 common code
config: arm-randconfig-r024-20210416 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 1ea1e179a23d9b3963a2aca7f7c9def0e6c38535
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
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/media/platform/mtk-vcodec/vdec/vdec_h264_req_common.c:47:5: warning: format specifies type 'long long' but the argument has type 'int' [-Wformat]
index, dpb->reference_ts);
^~~~~
include/linux/device.h:1755:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
1 warning generated.
vim +47 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_common.c
21
22 void mtk_vdec_h264_fill_dpb_info(struct mtk_vcodec_ctx *ctx,
23 struct slice_api_h264_decode_param *decode_params,
24 struct mtk_h264_dpb_info *h264_dpb_info)
25 {
26 struct vb2_queue *vq;
27 struct vb2_buffer *vb;
28 struct vb2_v4l2_buffer *vb2_v4l2;
29 int index;
30
31 vq = v4l2_m2m_get_vq(ctx->m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
32
33 for (index = 0; index < V4L2_H264_NUM_DPB_ENTRIES; index++) {
34 const struct slice_h264_dpb_entry *dpb;
35 int vb2_index;
36
37 dpb = &decode_params->dpb[index];
38 if (!(dpb->flags & V4L2_H264_DPB_ENTRY_FLAG_ACTIVE)) {
39 h264_dpb_info[index].reference_flag = 0;
40 continue;
41 }
42
43 vb2_index = vb2_find_timestamp(vq, dpb->reference_ts, 0);
44 if (vb2_index < 0) {
45 dev_err(&ctx->dev->plat_dev->dev,
46 "Reference invalid: dpb_index(%lld) reference_ts(%lld)",
> 47 index, dpb->reference_ts);
48 continue;
49 }
50
51 /* 1 for short term reference, 2 for long term reference */
52 if (!(dpb->flags & V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM))
53 h264_dpb_info[index].reference_flag = 1;
54 else
55 h264_dpb_info[index].reference_flag = 2;
56
57 vb = vq->bufs[vb2_index];
58 vb2_v4l2 = container_of(vb, struct vb2_v4l2_buffer, vb2_buf);
59 h264_dpb_info[index].field = vb2_v4l2->field;
60
61 h264_dpb_info[index].y_dma_addr =
62 vb2_dma_contig_plane_dma_addr(vb, 0);
63 if (ctx->q_data[MTK_Q_DATA_DST].fmt->num_planes == 2)
64 h264_dpb_info[index].c_dma_addr =
65 vb2_dma_contig_plane_dma_addr(vb, 1);
66 else
67 h264_dpb_info[index].c_dma_addr =
68 h264_dpb_info[index].y_dma_addr +
69 ctx->picinfo.fb_sz[0];
70 }
71 }
72
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[shenki:dev-5.10 95/157] drivers/fsi/fsi-occ.c:570:17: warning: cast to smaller integer type 'enum versions' from 'const void *'
by kernel test robot
Hi Eddie,
FYI, the error/warning still remains.
tree: https://github.com/shenki/linux dev-5.10
head: d538d632fb2046278ff3457994d64d43ee2901c7
commit: 8b574c0afc7aa21f56cb5b340fdd98aac716ef88 [95/157] fsi: occ: Add support for P10
config: powerpc-randconfig-r004-20210416 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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
# https://github.com/shenki/linux/commit/8b574c0afc7aa21f56cb5b340fdd98aac7...
git remote add shenki https://github.com/shenki/linux
git fetch --no-tags shenki dev-5.10
git checkout 8b574c0afc7aa21f56cb5b340fdd98aac716ef88
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 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/fsi/fsi-occ.c:570:17: warning: cast to smaller integer type 'enum versions' from 'const void *' [-Wvoid-pointer-to-enum-cast]
occ->version = (enum versions)md;
^~~~~~~~~~~~~~~~~
1 warning generated.
vim +570 drivers/fsi/fsi-occ.c
552
553 static int occ_probe(struct platform_device *pdev)
554 {
555 int rc;
556 u32 reg;
557 struct occ *occ;
558 struct platform_device *hwmon_dev;
559 struct device *dev = &pdev->dev;
560 const void *md = of_device_get_match_data(dev);
561 struct platform_device_info hwmon_dev_info = {
562 .parent = dev,
563 .name = "occ-hwmon",
564 };
565
566 occ = devm_kzalloc(dev, sizeof(*occ), GFP_KERNEL);
567 if (!occ)
568 return -ENOMEM;
569
> 570 occ->version = (enum versions)md;
571 occ->dev = dev;
572 occ->sbefifo = dev->parent;
573 mutex_init(&occ->occ_lock);
574
575 if (dev->of_node) {
576 rc = of_property_read_u32(dev->of_node, "reg", ®);
577 if (!rc) {
578 /* make sure we don't have a duplicate from dts */
579 occ->idx = ida_simple_get(&occ_ida, reg, reg + 1,
580 GFP_KERNEL);
581 if (occ->idx < 0)
582 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX,
583 GFP_KERNEL);
584 } else {
585 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX,
586 GFP_KERNEL);
587 }
588 } else {
589 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX, GFP_KERNEL);
590 }
591
592 platform_set_drvdata(pdev, occ);
593
594 snprintf(occ->name, sizeof(occ->name), "occ%d", occ->idx);
595 occ->mdev.fops = &occ_fops;
596 occ->mdev.minor = MISC_DYNAMIC_MINOR;
597 occ->mdev.name = occ->name;
598 occ->mdev.parent = dev;
599
600 rc = misc_register(&occ->mdev);
601 if (rc) {
602 dev_err(dev, "failed to register miscdevice: %d\n", rc);
603 ida_simple_remove(&occ_ida, occ->idx);
604 return rc;
605 }
606
607 hwmon_dev_info.id = occ->idx;
608 hwmon_dev = platform_device_register_full(&hwmon_dev_info);
609 if (IS_ERR(hwmon_dev))
610 dev_warn(dev, "failed to create hwmon device\n");
611
612 return 0;
613 }
614
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[chrome-os:chromeos-5.4 31/67] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c:70:25: warning: no previous prototype for function 'mtk_vdec_match_add'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 1b71f6d620191293322fc574c20ed5130b794ac7
commit: f04d055758de31185e1b298147cae3de6349dba1 [31/67] CHROMIUM: media: mtk-vcodec: Use component framework to manage each hardware information
config: arm-randconfig-r024-20210416 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout f04d055758de31185e1b298147cae3de6349dba1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
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/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c:70:25: warning: no previous prototype for function 'mtk_vdec_match_add' [-Wmissing-prototypes]
struct component_match *mtk_vdec_match_add(struct mtk_vcodec_dev *vdec_dev)
^
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct component_match *mtk_vdec_match_add(struct mtk_vcodec_dev *vdec_dev)
^
static
1 warning generated.
vim +/mtk_vdec_match_add +70 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
69
> 70 struct component_match *mtk_vdec_match_add(struct mtk_vcodec_dev *vdec_dev)
71 {
72 struct platform_device *pdev = vdec_dev->plat_dev;
73 struct component_match *match = NULL;
74 int i;
75
76 for (i = 0; i < ARRAY_SIZE(mtk_vdec_drv_ids); i++) {
77 struct device_node *comp_node;
78 enum mtk_vdec_hw_id comp_idx;
79 const struct of_device_id *of_id;
80
81 comp_node = of_find_compatible_node(NULL, NULL,
82 mtk_vdec_drv_ids[i].compatible);
83 if (!comp_node)
84 continue;
85
86 if (!of_device_is_available(comp_node)) {
87 of_node_put(comp_node);
88 dev_err(&pdev->dev, "Fail to get MMSYS node\n");
89 continue;
90 }
91
92 of_id = of_match_node(mtk_vdec_drv_ids, comp_node);
93 if (!of_id) {
94 dev_err(&pdev->dev, "Failed to get match node\n");
95 return ERR_PTR(-EINVAL);
96 }
97
98 comp_idx = (enum mtk_vdec_hw_id)of_id->data;
99 mtk_v4l2_debug(4, "Get component:hw_id(%d),vdec_dev(0x%p),comp_node(0x%p)\n",
100 comp_idx, vdec_dev, comp_node);
101 vdec_dev->component_node[comp_idx] = comp_node;
102
103 component_match_add_release(&pdev->dev, &match, mtk_vdec_release_of,
104 mtk_vdec_compare_of, comp_node);
105 }
106
107 return match;
108 }
109
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[PATCH v2] serial: stm32: optimize spin lock usage
by dillon.minfei@gmail.com
From: dillon min <dillon.minfei(a)gmail.com>
To avoid potential deadlock in spin_lock usage, use spin_lock_irqsave,
spin_trylock_irqsave(), spin_unlock_irqrestore() in process context.
remove unused local_irq_save/restore call.
Cc: Alexandre Torgue <alexandre.torgue(a)foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32(a)gmail.com>
Cc: Gerald Baeza <gerald.baeza(a)foss.st.com>
Cc: Erwan Le Ray <erwan.leray(a)foss.st.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: dillon min <dillon.minfei(a)gmail.com>
---
v2: remove unused code from stm32_usart_threaded_interrupt() according from
Greg's review.
drivers/tty/serial/stm32-usart.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index b3675cf25a69..b1ba5e36e36e 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -1354,13 +1354,12 @@ static void stm32_usart_console_write(struct console *co, const char *s,
u32 old_cr1, new_cr1;
int locked = 1;
- local_irq_save(flags);
if (port->sysrq)
locked = 0;
else if (oops_in_progress)
- locked = spin_trylock(&port->lock);
+ locked = spin_trylock_irqsave(&port->lock, flags);
else
- spin_lock(&port->lock);
+ spin_lock_irqsave(&port->lock, flags);
/* Save and disable interrupts, enable the transmitter */
old_cr1 = readl_relaxed(port->membase + ofs->cr1);
@@ -1374,8 +1373,7 @@ static void stm32_usart_console_write(struct console *co, const char *s,
writel_relaxed(old_cr1, port->membase + ofs->cr1);
if (locked)
- spin_unlock(&port->lock);
- local_irq_restore(flags);
+ spin_unlock_irqrestore(&port->lock, flags);
}
static int stm32_usart_console_setup(struct console *co, char *options)
--
2.7.4
1 year, 5 months
[agd5f:drm-next 53/61] drivers/pci/quirks.c:317:18: warning: Unused variable: rdev [unusedVariable]
by kernel test robot
tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: 0739b4816007d29311a25f3a96c4c678a943309a
commit: 9597624ef6067bab1500d0273a43d4f90e62e929 [53/61] nvme: put some AMD PCIE downstream NVME device to simple suspend/resume path
compiler: aarch64-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>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/pci/quirks.c:317:18: warning: Unused variable: rdev [unusedVariable]
struct pci_dev *rdev;
^
vim +317 drivers/pci/quirks.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 314
9597624ef6067b Prike Liang 2021-03-17 315 static void quirk_amd_nvme_fixup(struct pci_dev *dev)
9597624ef6067b Prike Liang 2021-03-17 316 {
9597624ef6067b Prike Liang 2021-03-17 @317 struct pci_dev *rdev;
9597624ef6067b Prike Liang 2021-03-17 318
9597624ef6067b Prike Liang 2021-03-17 319 dev->dev_flags |= PCI_DEV_FLAGS_AMD_NVME_SIMPLE_SUSPEND;
9597624ef6067b Prike Liang 2021-03-17 320 pci_info(dev, "AMD simple suspend opt enabled\n");
9597624ef6067b Prike Liang 2021-03-17 321
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[agd5f:amd-staging-drm-next 1776/2357] drivers/spi/spi-amd.c:353:36: warning: unused variable 'spi_acpi_match'
by kernel test robot
Hi Nehal,
FYI, the error/warning still remains.
tree: https://gitlab.freedesktop.org/agd5f/linux.git amd-staging-drm-next
head: b54280b32ebb9381e045e645eabd99dbbe607ec2
commit: 37b635b47124cbdf32981150b2a950cb0153c756 [1776/2357] Add support for AMD SPI controller-1 (v2)
config: riscv-randconfig-r011-20210415 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f amd-staging-drm-next
git checkout 37b635b47124cbdf32981150b2a950cb0153c756
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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/spi/spi-amd.c:353:36: warning: unused variable 'spi_acpi_match' [-Wunused-const-variable]
static const struct acpi_device_id spi_acpi_match[] = {
^
1 warning generated.
vim +/spi_acpi_match +353 drivers/spi/spi-amd.c
bbb336f39efcb1 Sanjay R Mehta 2020-04-25 352
bbb336f39efcb1 Sanjay R Mehta 2020-04-25 @353 static const struct acpi_device_id spi_acpi_match[] = {
bbb336f39efcb1 Sanjay R Mehta 2020-04-25 354 { "AMDI0061", 0 },
37b635b47124cb Nehal Bakulchandra Shah 2021-01-26 355 { "AMDI0062", 0 },
bbb336f39efcb1 Sanjay R Mehta 2020-04-25 356 {},
bbb336f39efcb1 Sanjay R Mehta 2020-04-25 357 };
bbb336f39efcb1 Sanjay R Mehta 2020-04-25 358 MODULE_DEVICE_TABLE(acpi, spi_acpi_match);
bbb336f39efcb1 Sanjay R Mehta 2020-04-25 359
:::::: The code at line 353 was first introduced by commit
:::::: bbb336f39efcb1b5498f65f59f9af5773ad6dc2b spi: spi-amd: Add AMD SPI controller driver support
:::::: TO: Sanjay R Mehta <sanju.mehta(a)amd.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[chrome-os:chromeos-5.4 61/63] drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:15: warning: cast from pointer to integer of different size
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: e92ded952728bab9fd34be3b2c27aa5452223ced
commit: 6013f1550f9151fdb4c1875743ccbf1453bbb9ad [61/63] CHROMIUM: media: platform: mtk-mdp3: add mt8192 settings
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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 remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 6013f1550f9151fdb4c1875743ccbf1453bbb9ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
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 >>):
In file included from include/vdso/const.h:5,
from include/linux/const.h:4,
from include/linux/list.h:8,
from include/linux/mutex.h:15,
from include/linux/remoteproc.h:39,
from drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:7:
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c: In function 'mdp_vpu_dev_init':
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^
include/uapi/linux/const.h:32:41: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:9: note: in expansion of macro 'ALIGN'
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^~~~~
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^
include/uapi/linux/const.h:32:47: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:9: note: in expansion of macro 'ALIGN'
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^~~~~
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^
include/uapi/linux/const.h:32:58: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:179:9: note: in expansion of macro 'ALIGN'
179 | pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
| ^~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:180:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
180 | if (pool + pool_size - (phys_addr_t)vpu->work > mem_size) {
| ^
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:192:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
192 | vpu->pool = (struct mdp_config_pool *)pool;
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c: In function 'mdp_config_get':
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:239:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
239 | ((unsigned long)config - (phys_addr_t)vpu->work);
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c: In function 'mdp_vpu_process':
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c:309:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
309 | addr.va = (phys_addr_t)ctx->vpu_dev->work;
| ^
vim +179 drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c
8660eb85c280f2 mtk18742 2021-02-04 151
8660eb85c280f2 mtk18742 2021-02-04 152 int mdp_vpu_dev_init(struct mdp_vpu_dev *vpu, struct mtk_scp *scp,
8660eb85c280f2 mtk18742 2021-02-04 153 struct mutex *lock)
8660eb85c280f2 mtk18742 2021-02-04 154 {
8660eb85c280f2 mtk18742 2021-02-04 155 struct mdp_ipi_init_msg msg = {
8660eb85c280f2 mtk18742 2021-02-04 156 .drv_data = (unsigned long)vpu,
8660eb85c280f2 mtk18742 2021-02-04 157 };
8660eb85c280f2 mtk18742 2021-02-04 158 size_t mem_size;
8660eb85c280f2 mtk18742 2021-02-04 159 phys_addr_t pool;
8660eb85c280f2 mtk18742 2021-02-04 160 const size_t pool_size = sizeof(struct mdp_config_pool);
8660eb85c280f2 mtk18742 2021-02-04 161 struct mdp_dev *mdp = vpu_to_mdp(vpu);
8660eb85c280f2 mtk18742 2021-02-04 162 int err;
8660eb85c280f2 mtk18742 2021-02-04 163
8660eb85c280f2 mtk18742 2021-02-04 164 init_completion(&vpu->ipi_acked);
8660eb85c280f2 mtk18742 2021-02-04 165 vpu->scp = scp;
8660eb85c280f2 mtk18742 2021-02-04 166 vpu->lock = lock;
8660eb85c280f2 mtk18742 2021-02-04 167 vpu->work_size = 0;
8660eb85c280f2 mtk18742 2021-02-04 168 err = mdp_vpu_sendmsg(vpu, SCP_IPI_MDP_INIT, &msg, sizeof(msg));
8660eb85c280f2 mtk18742 2021-02-04 169 if (err)
8660eb85c280f2 mtk18742 2021-02-04 170 goto err_work_size;
8660eb85c280f2 mtk18742 2021-02-04 171 /* vpu work_size was set in mdp_vpu_ipi_handle_init_ack */
8660eb85c280f2 mtk18742 2021-02-04 172
8660eb85c280f2 mtk18742 2021-02-04 173 mem_size = vpu_alloc_size;
8660eb85c280f2 mtk18742 2021-02-04 174 if (mdp_vpu_shared_mem_alloc(vpu)) {
8660eb85c280f2 mtk18742 2021-02-04 175 dev_err(&mdp->pdev->dev, "VPU memory alloc fail!");
8660eb85c280f2 mtk18742 2021-02-04 176 goto err_mem_alloc;
8660eb85c280f2 mtk18742 2021-02-04 177 }
8660eb85c280f2 mtk18742 2021-02-04 178
8660eb85c280f2 mtk18742 2021-02-04 @179 pool = ALIGN((phys_addr_t)vpu->work + vpu->work_size, 8);
8660eb85c280f2 mtk18742 2021-02-04 180 if (pool + pool_size - (phys_addr_t)vpu->work > mem_size) {
8660eb85c280f2 mtk18742 2021-02-04 181 dev_err(&mdp->pdev->dev,
8660eb85c280f2 mtk18742 2021-02-04 182 "VPU memory insufficient: %zx + %zx > %zx",
8660eb85c280f2 mtk18742 2021-02-04 183 vpu->work_size, pool_size, mem_size);
8660eb85c280f2 mtk18742 2021-02-04 184 err = -ENOMEM;
8660eb85c280f2 mtk18742 2021-02-04 185 goto err_mem_size;
8660eb85c280f2 mtk18742 2021-02-04 186 }
8660eb85c280f2 mtk18742 2021-02-04 187
8660eb85c280f2 mtk18742 2021-02-04 188 dev_dbg(&mdp->pdev->dev,
8660eb85c280f2 mtk18742 2021-02-04 189 "VPU work:%pK pa:%pad sz:%zx pool:%pa sz:%zx (mem sz:%zx)",
8660eb85c280f2 mtk18742 2021-02-04 190 vpu->work, &vpu->work_addr, vpu->work_size,
8660eb85c280f2 mtk18742 2021-02-04 191 &pool, pool_size, mem_size);
8660eb85c280f2 mtk18742 2021-02-04 @192 vpu->pool = (struct mdp_config_pool *)pool;
8660eb85c280f2 mtk18742 2021-02-04 193 msg.work_addr = vpu->work_addr;
8660eb85c280f2 mtk18742 2021-02-04 194 msg.work_size = vpu->work_size;
8660eb85c280f2 mtk18742 2021-02-04 195 err = mdp_vpu_sendmsg(vpu, SCP_IPI_MDP_INIT, &msg, sizeof(msg));
8660eb85c280f2 mtk18742 2021-02-04 196 if (err)
8660eb85c280f2 mtk18742 2021-02-04 197 goto err_work_size;
8660eb85c280f2 mtk18742 2021-02-04 198
8660eb85c280f2 mtk18742 2021-02-04 199 memset(vpu->pool, 0, sizeof(*vpu->pool));
8660eb85c280f2 mtk18742 2021-02-04 200 return 0;
8660eb85c280f2 mtk18742 2021-02-04 201
8660eb85c280f2 mtk18742 2021-02-04 202 err_work_size:
8660eb85c280f2 mtk18742 2021-02-04 203 switch (vpu->status) {
8660eb85c280f2 mtk18742 2021-02-04 204 case -MDP_IPI_EBUSY:
8660eb85c280f2 mtk18742 2021-02-04 205 err = -EBUSY;
8660eb85c280f2 mtk18742 2021-02-04 206 break;
8660eb85c280f2 mtk18742 2021-02-04 207 case -MDP_IPI_ENOMEM:
8660eb85c280f2 mtk18742 2021-02-04 208 err = -ENOSPC; /* -ENOMEM */
8660eb85c280f2 mtk18742 2021-02-04 209 break;
8660eb85c280f2 mtk18742 2021-02-04 210 }
8660eb85c280f2 mtk18742 2021-02-04 211 return err;
8660eb85c280f2 mtk18742 2021-02-04 212 err_mem_size:
8660eb85c280f2 mtk18742 2021-02-04 213 err_mem_alloc:
8660eb85c280f2 mtk18742 2021-02-04 214 return err;
8660eb85c280f2 mtk18742 2021-02-04 215 }
8660eb85c280f2 mtk18742 2021-02-04 216
:::::: The code at line 179 was first introduced by commit
:::::: 8660eb85c280f20d258629093be82696c2a8be42 CHROMIUM: media: platform: mtk-mdp3: add first version about MDP3
:::::: TO: mtk18742 <moudy.ho(a)mediatek.com>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[lwn:docs-next 127/127] drivers/scsi/aacraid/commsup.c:1953: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
by kernel test robot
tree: git://git.lwn.net/linux-2.6 docs-next
head: f9bbc12ccb35ac8b3fa01cec1a19cb523a7707c7
commit: f9bbc12ccb35ac8b3fa01cec1a19cb523a7707c7 [127/127] scripts: kernel-doc: improve parsing for kernel-doc comments syntax
config: mips-randconfig-r024-20210415 (attached as .config)
compiler: mips-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 remote add lwn git://git.lwn.net/linux-2.6
git fetch --no-tags lwn docs-next
git checkout f9bbc12ccb35ac8b3fa01cec1a19cb523a7707c7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips
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/scsi/aacraid/commsup.c:334: warning: expecting prototype for fib_deallocate(). Prototype was for fib_dealloc() instead
>> drivers/scsi/aacraid/commsup.c:1953: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* aac_handle_sa_aif Handle a message from the firmware
--
>> drivers/net/ethernet/intel/i40e/i40e_txrx.c:3348: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* i40e_create_tx_ctx Build the Tx context descriptor
--
>> drivers/net/ethernet/intel/iavf/iavf_txrx.c:2101: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* iavf_create_tx_ctx Build the Tx context descriptor
--
>> drivers/net/ethernet/intel/igb/igb_main.c:2040: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Detect and switch function for Media Auto Sense
drivers/net/ethernet/intel/igb/igb_main.c:4036: warning: expecting prototype for igb_open(). Prototype was for __igb_open() instead
drivers/net/ethernet/intel/igb/igb_main.c:4153: warning: expecting prototype for igb_close(). Prototype was for __igb_close() instead
--
drivers/hid/intel-ish-hid/ishtp/hbm.c:409: warning: expecting prototype for ishtp_client_disconnect_request(). Prototype was for ishtp_hbm_fw_disconnect_req() instead
>> drivers/hid/intel-ish-hid/ishtp/hbm.c:441: warning: expecting prototype for ishtp_hbm_dma_xfer_ack(()(). Prototype was for ishtp_hbm_dma_xfer_ack() instead
vim +1953 drivers/scsi/aacraid/commsup.c
26c54d0ec25c18 Balsundar P 2019-10-15 1951
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1952 /**
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 @1953 * aac_handle_sa_aif Handle a message from the firmware
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1954 * @dev: Which adapter this fib is from
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1955 * @fibptr: Pointer to fibptr from adapter
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1956 *
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1957 * This routine handles a driver notify fib from the adapter and
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1958 * dispatches it to the appropriate routine for handling.
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1959 */
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1960 static void aac_handle_sa_aif(struct aac_dev *dev, struct fib *fibptr)
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1961 {
f2d2cabadba00f Raghava Aditya Renukunta 2017-12-26 1962 int i;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1963 u32 events = 0;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1964
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1965 if (fibptr->hbacmd_size & SA_AIF_HOTPLUG)
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1966 events = SA_AIF_HOTPLUG;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1967 else if (fibptr->hbacmd_size & SA_AIF_HARDWARE)
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1968 events = SA_AIF_HARDWARE;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1969 else if (fibptr->hbacmd_size & SA_AIF_PDEV_CHANGE)
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1970 events = SA_AIF_PDEV_CHANGE;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1971 else if (fibptr->hbacmd_size & SA_AIF_LDEV_CHANGE)
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1972 events = SA_AIF_LDEV_CHANGE;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1973 else if (fibptr->hbacmd_size & SA_AIF_BPSTAT_CHANGE)
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1974 events = SA_AIF_BPSTAT_CHANGE;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1975 else if (fibptr->hbacmd_size & SA_AIF_BPCFG_CHANGE)
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1976 events = SA_AIF_BPCFG_CHANGE;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1977
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1978 switch (events) {
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1979 case SA_AIF_HOTPLUG:
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1980 case SA_AIF_HARDWARE:
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1981 case SA_AIF_PDEV_CHANGE:
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1982 case SA_AIF_LDEV_CHANGE:
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1983 case SA_AIF_BPCFG_CHANGE:
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1984
75be67cd155d95 Raghava Aditya Renukunta 2017-12-26 1985 aac_scan_host(dev);
8ebaa67fc23a09 Raghava Aditya Renukunta 2017-12-26 1986
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1987 break;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1988
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1989 case SA_AIF_BPSTAT_CHANGE:
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1990 /* currently do nothing */
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1991 break;
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1992 }
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1993
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1994 for (i = 1; i <= 10; ++i) {
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1995 events = src_readl(dev, MUnit.IDR);
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1996 if (events & (1<<23)) {
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1997 pr_warn(" AIF not cleared by firmware - %d/%d)\n",
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1998 i, 10);
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 1999 ssleep(1);
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 2000 }
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 2001 }
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 2002 }
6223a39fe6fbbe Raghava Aditya Renukunta 2017-02-02 2003
:::::: The code at line 1953 was first introduced by commit
:::::: 6223a39fe6fbbeef0877a56dc427a6351f22ef6c scsi: aacraid: Added support for hotplug
:::::: TO: Raghava Aditya Renukunta <RaghavaAditya.Renukunta(a)microsemi.com>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months