[ak:lto-5.12-2-wip 19/47] kernel/time/posix-stubs.c:38:44: error: conflicting types for 'compat_sys_timer_create'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git lto-5.12-2-wip
head: 465e3a9380fff2a677c16731099ae42012126bff
commit: ed25a7557151e54a28faef509c93acff5732ea23 [19/47] lto: Use C version for SYSCALL_ALIAS / cond_syscall
config: sparc64-randconfig-m031-20210420 (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
# https://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git/commit/...
git remote add ak https://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git
git fetch --no-tags ak lto-5.12-2-wip
git checkout ed25a7557151e54a28faef509c93acff5732ea23
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=sparc64
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 >>):
kernel/time/posix-stubs.c:25:17: warning: no previous prototype for 'sys_ni_posix_timers' [-Wmissing-prototypes]
25 | asmlinkage long sys_ni_posix_timers(void)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:73:5: warning: no previous prototype for 'do_clock_gettime' [-Wmissing-prototypes]
73 | int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)
| ^~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:38:44: error: conflicting types for 'compat_sys_timer_create'
38 | #define COMPAT_SYS_NI(name) SYSCALL_ALIAS(compat_sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~
include/linux/linkage.h:32:7: note: in definition of macro 'SYSCALL_ALIAS'
32 | long a(void) __attribute__((alias(__stringify(name))))
| ^
kernel/time/posix-stubs.c:160:1: note: in expansion of macro 'COMPAT_SYS_NI'
160 | COMPAT_SYS_NI(timer_create);
| ^~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:18:
include/linux/compat.h:671:17: note: previous declaration of 'compat_sys_timer_create' was here
671 | asmlinkage long compat_sys_timer_create(clockid_t which_clock,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:38:44: error: conflicting types for 'compat_sys_getitimer'
38 | #define COMPAT_SYS_NI(name) SYSCALL_ALIAS(compat_sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~
include/linux/linkage.h:32:7: note: in definition of macro 'SYSCALL_ALIAS'
32 | long a(void) __attribute__((alias(__stringify(name))))
| ^
kernel/time/posix-stubs.c:164:1: note: in expansion of macro 'COMPAT_SYS_NI'
164 | COMPAT_SYS_NI(getitimer);
| ^~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:18:
include/linux/compat.h:658:17: note: previous declaration of 'compat_sys_getitimer' was here
658 | asmlinkage long compat_sys_getitimer(int which,
| ^~~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
>> kernel/time/posix-stubs.c:38:44: error: conflicting types for 'compat_sys_setitimer'
38 | #define COMPAT_SYS_NI(name) SYSCALL_ALIAS(compat_sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~
include/linux/linkage.h:32:7: note: in definition of macro 'SYSCALL_ALIAS'
32 | long a(void) __attribute__((alias(__stringify(name))))
| ^
kernel/time/posix-stubs.c:165:1: note: in expansion of macro 'COMPAT_SYS_NI'
165 | COMPAT_SYS_NI(setitimer);
| ^~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:18:
include/linux/compat.h:660:17: note: previous declaration of 'compat_sys_setitimer' was here
660 | asmlinkage long compat_sys_setitimer(int which,
| ^~~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_create' alias between functions of incompatible types 'long int(clockid_t, struct sigevent *, timer_t *)' {aka 'long int(int, struct sigevent *, int *)'} and 'long int(void)' [-Wattribute-alias=]
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~
kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:41:1: note: in expansion of macro 'SYS_NI'
41 | SYS_NI(timer_create);
| ^~~~~~
kernel/time/posix-stubs.c:25:17: note: aliased declaration here
25 | asmlinkage long sys_ni_posix_timers(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_gettime32' alias between functions of incompatible types 'long int(timer_t, struct old_itimerspec32 *)' {aka 'long int(int, struct old_itimerspec32 *)'} and 'long int(void)' [-Wattribute-alias=]
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~
kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:170:1: note: in expansion of macro 'SYS_NI'
170 | SYS_NI(timer_gettime32);
| ^~~~~~
kernel/time/posix-stubs.c:25:17: note: aliased declaration here
25 | asmlinkage long sys_ni_posix_timers(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
kernel/time/posix-stubs.c:34:43: warning: 'sys_timer_settime32' alias between functions of incompatible types 'long int(timer_t, int, struct old_itimerspec32 *, struct old_itimerspec32 *)' {aka 'long int(int, int, struct old_itimerspec32 *, struct old_itimerspec32 *)'} and 'long int(void)' [-Wattribute-alias=]
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~
kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:169:1: note: in expansion of macro 'SYS_NI'
169 | SYS_NI(timer_settime32);
| ^~~~~~
kernel/time/posix-stubs.c:25:17: note: aliased declaration here
25 | asmlinkage long sys_ni_posix_timers(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
kernel/time/posix-stubs.c:34:43: warning: 'sys_alarm' alias between functions of incompatible types 'long int(unsigned int)' and 'long int(void)' [-Wattribute-alias=]
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~
kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:51:1: note: in expansion of macro 'SYS_NI'
51 | SYS_NI(alarm);
| ^~~~~~
kernel/time/posix-stubs.c:25:17: note: aliased declaration here
25 | asmlinkage long sys_ni_posix_timers(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
kernel/time/posix-stubs.c:34:43: warning: 'sys_clock_adjtime32' alias between functions of incompatible types 'long int(clockid_t, struct old_timex32 *)' {aka 'long int(int, struct old_timex32 *)'} and 'long int(void)' [-Wattribute-alias=]
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~
kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:49:1: note: in expansion of macro 'SYS_NI'
49 | SYS_NI(clock_adjtime32);
| ^~~~~~
kernel/time/posix-stubs.c:25:17: note: aliased declaration here
25 | asmlinkage long sys_ni_posix_timers(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
kernel/time/posix-stubs.c:34:43: warning: 'sys_setitimer' alias between functions of incompatible types 'long int(int, struct __kernel_old_itimerval *, struct __kernel_old_itimerval *)' and 'long int(void)' [-Wattribute-alias=]
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~
kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:48:1: note: in expansion of macro 'SYS_NI'
48 | SYS_NI(setitimer);
| ^~~~~~
kernel/time/posix-stubs.c:25:17: note: aliased declaration here
25 | asmlinkage long sys_ni_posix_timers(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from kernel/time/posix-stubs.c:9:
kernel/time/posix-stubs.c:34:43: warning: 'sys_getitimer' alias between functions of incompatible types 'long int(int, struct __kernel_old_itimerval *)' and 'long int(void)' [-Wattribute-alias=]
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~
kernel/time/posix-stubs.c:34:23: note: in expansion of macro 'SYSCALL_ALIAS_PROTO'
34 | #define SYS_NI(name) SYSCALL_ALIAS_PROTO(sys_##name, sys_ni_posix_timers)
| ^~~~~~~~~~~~~~~~~~~
kernel/time/posix-stubs.c:47:1: note: in expansion of macro 'SYS_NI'
47 | SYS_NI(getitimer);
| ^~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS || MCOUNT
Selected by
- LOCKDEP && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
vim +/compat_sys_timer_create +38 kernel/time/posix-stubs.c
7303e30ec1d8fb Dominik Brodowski 2018-04-05 36
7303e30ec1d8fb Dominik Brodowski 2018-04-05 37 #ifndef COMPAT_SYS_NI
3a4d44b6162555 Al Viro 2017-06-07 @38 #define COMPAT_SYS_NI(name) SYSCALL_ALIAS(compat_sys_##name, sys_ni_posix_timers)
7303e30ec1d8fb Dominik Brodowski 2018-04-05 39 #endif
baa73d9e478ff3 Nicolas Pitre 2016-11-11 40
:::::: The code at line 38 was first introduced by commit
:::::: 3a4d44b6162555070194e486ff6b3799a8d323a2 ntp: Move adjtimex related compat syscalls to native counterparts
:::::: TO: Al Viro <viro(a)zeniv.linux.org.uk>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[kbuild] [chrome-os:chromeos-5.4 56/243] drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_req_lat_if.c:751:10: warning: Expression is always false because 'else if' condition matches previous condition at line 749. [multiCondition]
by Dan Carpenter
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 52d269f32500581166246e0e494b2b62d979dba6
commit: bc0b0ae994e6bb17b12bfd882c2eb837eb29c078 [56/243] CHROMIUM: media: mtk-vcodec: Add vp9 slice api driver for mt8192
compiler: hppa-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/media/platform/mtk-vcodec/vdec/vdec_vp9_req_lat_if.c:751:10: warning: Expression is always false because 'else if' condition matches previous condition at line 749. [multiCondition]
else if (hdr->reset_frame_context == V4L2_VP9_RESET_FRAME_CTX_SPEC)
^
vim +751 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_req_lat_if.c
bc0b0ae994e6bb Yunfei Dong 2021-01-21 730 static void vdec_vp9_slice_setup_hdr(
bc0b0ae994e6bb Yunfei Dong 2021-01-21 731 struct vdec_vp9_slice_instance *instance,
bc0b0ae994e6bb Yunfei Dong 2021-01-21 732 struct vdec_vp9_slice_uncompressed_header *uh,
bc0b0ae994e6bb Yunfei Dong 2021-01-21 733 struct v4l2_ctrl_vp9_frame_decode_params *hdr)
bc0b0ae994e6bb Yunfei Dong 2021-01-21 734 {
bc0b0ae994e6bb Yunfei Dong 2021-01-21 735 int i;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 736
bc0b0ae994e6bb Yunfei Dong 2021-01-21 737 uh->profile = hdr->profile;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 738 uh->last_frame_type = instance->frame_type;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 739 uh->frame_type = !HDR_FLAG(KEY_FRAME);
bc0b0ae994e6bb Yunfei Dong 2021-01-21 740 uh->last_show_frame = instance->show_frame;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 741 uh->show_frame = HDR_FLAG(SHOW_FRAME);
bc0b0ae994e6bb Yunfei Dong 2021-01-21 742 uh->error_resilient_mode = HDR_FLAG(ERROR_RESILIENT);
bc0b0ae994e6bb Yunfei Dong 2021-01-21 743 uh->bit_depth = hdr->bit_depth;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 744 uh->last_frame_width = instance->width;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 745 uh->last_frame_height = instance->height;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 746 uh->frame_width = hdr->frame_width_minus_1 + 1;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 747 uh->frame_height = hdr->frame_height_minus_1 + 1;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 748 uh->intra_only = HDR_FLAG(INTRA_ONLY);
bc0b0ae994e6bb Yunfei Dong 2021-01-21 @749 if (hdr->reset_frame_context == V4L2_VP9_RESET_FRAME_CTX_SPEC)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bc0b0ae994e6bb Yunfei Dong 2021-01-21 750 uh->reset_frame_context = 2;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 @751 else if (hdr->reset_frame_context == V4L2_VP9_RESET_FRAME_CTX_SPEC)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Same same.
bc0b0ae994e6bb Yunfei Dong 2021-01-21 752 uh->reset_frame_context = 3;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 753 else
bc0b0ae994e6bb Yunfei Dong 2021-01-21 754 uh->reset_frame_context = 0;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 755 /*
bc0b0ae994e6bb Yunfei Dong 2021-01-21 756 * ref_frame_sign_bias specifies the intended direction
bc0b0ae994e6bb Yunfei Dong 2021-01-21 757 * of the motion vector in time for each reference frame.
bc0b0ae994e6bb Yunfei Dong 2021-01-21 758 * - INTRA_FRAME = 0,
bc0b0ae994e6bb Yunfei Dong 2021-01-21 759 * - LAST_FRAME = 1,
bc0b0ae994e6bb Yunfei Dong 2021-01-21 760 * - GOLDEN_FRAME = 2,
bc0b0ae994e6bb Yunfei Dong 2021-01-21 761 * - ALTREF_FRAME = 3,
bc0b0ae994e6bb Yunfei Dong 2021-01-21 762 * ref_frame_sign_biases[INTRA_FRAME] is always 0
bc0b0ae994e6bb Yunfei Dong 2021-01-21 763 * and VDA only passes another 3 directions
bc0b0ae994e6bb Yunfei Dong 2021-01-21 764 */
bc0b0ae994e6bb Yunfei Dong 2021-01-21 765 uh->ref_frame_sign_bias[0] = 0;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 766 for (i = 0; i < 3; i++)
bc0b0ae994e6bb Yunfei Dong 2021-01-21 767 uh->ref_frame_sign_bias[i + 1] =
bc0b0ae994e6bb Yunfei Dong 2021-01-21 768 !!(hdr->ref_frame_sign_biases & (1 << i));
bc0b0ae994e6bb Yunfei Dong 2021-01-21 769 uh->allow_high_precision_mv = HDR_FLAG(ALLOW_HIGH_PREC_MV);
bc0b0ae994e6bb Yunfei Dong 2021-01-21 770 uh->interpolation_filter = hdr->interpolation_filter;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 771 uh->refresh_frame_context = HDR_FLAG(REFRESH_FRAME_CTX);
bc0b0ae994e6bb Yunfei Dong 2021-01-21 772 uh->frame_parallel_decoding_mode = HDR_FLAG(PARALLEL_DEC_MODE);
bc0b0ae994e6bb Yunfei Dong 2021-01-21 773 uh->frame_context_idx = hdr->frame_context_idx;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 774
bc0b0ae994e6bb Yunfei Dong 2021-01-21 775 /* tile info */
bc0b0ae994e6bb Yunfei Dong 2021-01-21 776 uh->tile_cols_log2 = hdr->tile_cols_log2;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 777 uh->tile_rows_log2 = hdr->tile_rows_log2;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 778
bc0b0ae994e6bb Yunfei Dong 2021-01-21 779 uh->uncompressed_header_size = hdr->uncompressed_header_size;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 780 uh->header_size_in_bytes = hdr->compressed_header_size;
bc0b0ae994e6bb Yunfei Dong 2021-01-21 781 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 5 months
[kbuild] [freescale-fslc:pr/312 15428/18196] sound/soc/codecs/pcm512x.c:1658 pcm512x_probe() warn: missing error code 'ret'
by Dan Carpenter
tree: https://github.com/Freescale/linux-fslc pr/312
head: 98ba4471da6187346dbcc17cdf31671fb5d28b91
commit: a452c44357d9c68c27c39327e50b41e4b6cffe8d [15428/18196] MLK-25015: sound: soc: codecs: pcm512x: set input sclk
config: x86_64-randconfig-m001-20210416 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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:
sound/soc/codecs/pcm512x.c:1658 pcm512x_probe() warn: missing error code 'ret'
vim +/ret +1658 sound/soc/codecs/pcm512x.c
22066226b50e40 Mark Brown 2014-03-07 1555 int pcm512x_probe(struct device *dev, struct regmap *regmap)
5a3af1293194d0 Mark Brown 2014-02-06 1556 {
5a3af1293194d0 Mark Brown 2014-02-06 1557 struct pcm512x_priv *pcm512x;
a452c44357d9c6 Adrian Alonso 2020-11-16 1558 char clk_name[8];
5a3af1293194d0 Mark Brown 2014-02-06 1559 int i, ret;
5a3af1293194d0 Mark Brown 2014-02-06 1560
5a3af1293194d0 Mark Brown 2014-02-06 1561 pcm512x = devm_kzalloc(dev, sizeof(struct pcm512x_priv), GFP_KERNEL);
5a3af1293194d0 Mark Brown 2014-02-06 1562 if (!pcm512x)
5a3af1293194d0 Mark Brown 2014-02-06 1563 return -ENOMEM;
5a3af1293194d0 Mark Brown 2014-02-06 1564
3500f1c589e92e Dimitris Papavasiliou 2018-11-24 1565 mutex_init(&pcm512x->mutex);
3500f1c589e92e Dimitris Papavasiliou 2018-11-24 1566
5a3af1293194d0 Mark Brown 2014-02-06 1567 dev_set_drvdata(dev, pcm512x);
5a3af1293194d0 Mark Brown 2014-02-06 1568 pcm512x->regmap = regmap;
5a3af1293194d0 Mark Brown 2014-02-06 1569
5a3af1293194d0 Mark Brown 2014-02-06 1570 for (i = 0; i < ARRAY_SIZE(pcm512x->supplies); i++)
5a3af1293194d0 Mark Brown 2014-02-06 1571 pcm512x->supplies[i].supply = pcm512x_supply_names[i];
5a3af1293194d0 Mark Brown 2014-02-06 1572
5a3af1293194d0 Mark Brown 2014-02-06 1573 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(pcm512x->supplies),
5a3af1293194d0 Mark Brown 2014-02-06 1574 pcm512x->supplies);
5a3af1293194d0 Mark Brown 2014-02-06 1575 if (ret != 0) {
5a3af1293194d0 Mark Brown 2014-02-06 1576 dev_err(dev, "Failed to get supplies: %d\n", ret);
5a3af1293194d0 Mark Brown 2014-02-06 1577 return ret;
5a3af1293194d0 Mark Brown 2014-02-06 1578 }
5a3af1293194d0 Mark Brown 2014-02-06 1579
5a3af1293194d0 Mark Brown 2014-02-06 1580 pcm512x->supply_nb[0].notifier_call = pcm512x_regulator_event_0;
5a3af1293194d0 Mark Brown 2014-02-06 1581 pcm512x->supply_nb[1].notifier_call = pcm512x_regulator_event_1;
5a3af1293194d0 Mark Brown 2014-02-06 1582 pcm512x->supply_nb[2].notifier_call = pcm512x_regulator_event_2;
5a3af1293194d0 Mark Brown 2014-02-06 1583
5a3af1293194d0 Mark Brown 2014-02-06 1584 for (i = 0; i < ARRAY_SIZE(pcm512x->supplies); i++) {
0bb423f2eaafed Guennadi Liakhovetski 2019-02-08 1585 ret = devm_regulator_register_notifier(
0bb423f2eaafed Guennadi Liakhovetski 2019-02-08 1586 pcm512x->supplies[i].consumer,
5a3af1293194d0 Mark Brown 2014-02-06 1587 &pcm512x->supply_nb[i]);
5a3af1293194d0 Mark Brown 2014-02-06 1588 if (ret != 0) {
5a3af1293194d0 Mark Brown 2014-02-06 1589 dev_err(dev,
5a3af1293194d0 Mark Brown 2014-02-06 1590 "Failed to register regulator notifier: %d\n",
5a3af1293194d0 Mark Brown 2014-02-06 1591 ret);
5a3af1293194d0 Mark Brown 2014-02-06 1592 }
5a3af1293194d0 Mark Brown 2014-02-06 1593 }
5a3af1293194d0 Mark Brown 2014-02-06 1594
5a3af1293194d0 Mark Brown 2014-02-06 1595 ret = regulator_bulk_enable(ARRAY_SIZE(pcm512x->supplies),
5a3af1293194d0 Mark Brown 2014-02-06 1596 pcm512x->supplies);
5a3af1293194d0 Mark Brown 2014-02-06 1597 if (ret != 0) {
5a3af1293194d0 Mark Brown 2014-02-06 1598 dev_err(dev, "Failed to enable supplies: %d\n", ret);
5a3af1293194d0 Mark Brown 2014-02-06 1599 return ret;
5a3af1293194d0 Mark Brown 2014-02-06 1600 }
5a3af1293194d0 Mark Brown 2014-02-06 1601
5a3af1293194d0 Mark Brown 2014-02-06 1602 /* Reset the device, verifying I/O in the process for I2C */
5a3af1293194d0 Mark Brown 2014-02-06 1603 ret = regmap_write(regmap, PCM512x_RESET,
5a3af1293194d0 Mark Brown 2014-02-06 1604 PCM512x_RSTM | PCM512x_RSTR);
5a3af1293194d0 Mark Brown 2014-02-06 1605 if (ret != 0) {
5a3af1293194d0 Mark Brown 2014-02-06 1606 dev_err(dev, "Failed to reset device: %d\n", ret);
5a3af1293194d0 Mark Brown 2014-02-06 1607 goto err;
5a3af1293194d0 Mark Brown 2014-02-06 1608 }
5a3af1293194d0 Mark Brown 2014-02-06 1609
5a3af1293194d0 Mark Brown 2014-02-06 1610 ret = regmap_write(regmap, PCM512x_RESET, 0);
5a3af1293194d0 Mark Brown 2014-02-06 1611 if (ret != 0) {
5a3af1293194d0 Mark Brown 2014-02-06 1612 dev_err(dev, "Failed to reset device: %d\n", ret);
5a3af1293194d0 Mark Brown 2014-02-06 1613 goto err;
5a3af1293194d0 Mark Brown 2014-02-06 1614 }
5a3af1293194d0 Mark Brown 2014-02-06 1615
a452c44357d9c6 Adrian Alonso 2020-11-16 1616 /* default to first sclk */
a452c44357d9c6 Adrian Alonso 2020-11-16 1617 pcm512x->num_clocks = 1;
a452c44357d9c6 Adrian Alonso 2020-11-16 1618 pcm512x->sclk_src = PCM512x_SYSCLK_MCLK1;
a452c44357d9c6 Adrian Alonso 2020-11-16 1619
a452c44357d9c6 Adrian Alonso 2020-11-16 1620 pcm512x->sclk[0] = devm_clk_get(dev, NULL);
a452c44357d9c6 Adrian Alonso 2020-11-16 1621 if (PTR_ERR(pcm512x->sclk[0]) == -EPROBE_DEFER) {
94c472e7b4e15e Matthias Reichl 2020-02-20 1622 ret = -EPROBE_DEFER;
94c472e7b4e15e Matthias Reichl 2020-02-20 1623 goto err;
94c472e7b4e15e Matthias Reichl 2020-02-20 1624 }
a452c44357d9c6 Adrian Alonso 2020-11-16 1625
a452c44357d9c6 Adrian Alonso 2020-11-16 1626 if (!IS_ERR(pcm512x->sclk[0])) {
a452c44357d9c6 Adrian Alonso 2020-11-16 1627 ret = clk_prepare_enable(pcm512x->sclk[0]);
5a3af1293194d0 Mark Brown 2014-02-06 1628 if (ret != 0) {
5a3af1293194d0 Mark Brown 2014-02-06 1629 dev_err(dev, "Failed to enable SCLK: %d\n", ret);
94c472e7b4e15e Matthias Reichl 2020-02-20 1630 goto err;
5a3af1293194d0 Mark Brown 2014-02-06 1631 }
5a3af1293194d0 Mark Brown 2014-02-06 1632 }
5a3af1293194d0 Mark Brown 2014-02-06 1633
5a3af1293194d0 Mark Brown 2014-02-06 1634 /* Default to standby mode */
5a3af1293194d0 Mark Brown 2014-02-06 1635 ret = regmap_update_bits(pcm512x->regmap, PCM512x_POWER,
5a3af1293194d0 Mark Brown 2014-02-06 1636 PCM512x_RQST, PCM512x_RQST);
5a3af1293194d0 Mark Brown 2014-02-06 1637 if (ret != 0) {
5a3af1293194d0 Mark Brown 2014-02-06 1638 dev_err(dev, "Failed to request standby: %d\n",
5a3af1293194d0 Mark Brown 2014-02-06 1639 ret);
5a3af1293194d0 Mark Brown 2014-02-06 1640 goto err_clk;
5a3af1293194d0 Mark Brown 2014-02-06 1641 }
5a3af1293194d0 Mark Brown 2014-02-06 1642
5a3af1293194d0 Mark Brown 2014-02-06 1643 pm_runtime_set_active(dev);
5a3af1293194d0 Mark Brown 2014-02-06 1644 pm_runtime_enable(dev);
5a3af1293194d0 Mark Brown 2014-02-06 1645 pm_runtime_idle(dev);
5a3af1293194d0 Mark Brown 2014-02-06 1646
f086ba9d5389cc Peter Rosin 2015-01-28 1647 #ifdef CONFIG_OF
f086ba9d5389cc Peter Rosin 2015-01-28 1648 if (dev->of_node) {
f086ba9d5389cc Peter Rosin 2015-01-28 1649 const struct device_node *np = dev->of_node;
2599a9609c588d Peter Rosin 2015-01-29 1650 u32 val;
f086ba9d5389cc Peter Rosin 2015-01-28 1651
a452c44357d9c6 Adrian Alonso 2020-11-16 1652 if (of_property_read_bool(np, "clocks")) {
a452c44357d9c6 Adrian Alonso 2020-11-16 1653 pcm512x->num_clocks =
a452c44357d9c6 Adrian Alonso 2020-11-16 1654 of_property_count_u32_elems(np, "clocks");
a452c44357d9c6 Adrian Alonso 2020-11-16 1655 if (pcm512x->num_clocks > PCM512x_MAX_NUM_SCLK) {
a452c44357d9c6 Adrian Alonso 2020-11-16 1656 dev_err(dev, "Failed unsupported max sclk: %d\n",
a452c44357d9c6 Adrian Alonso 2020-11-16 1657 pcm512x->num_clocks);
a452c44357d9c6 Adrian Alonso 2020-11-16 @1658 goto err;
"ret = -EINVAL;"
a452c44357d9c6 Adrian Alonso 2020-11-16 1659 }
a452c44357d9c6 Adrian Alonso 2020-11-16 1660
a452c44357d9c6 Adrian Alonso 2020-11-16 1661 for (i = 0; i < pcm512x->num_clocks; i++) {
a452c44357d9c6 Adrian Alonso 2020-11-16 1662 sprintf(clk_name, "sclk%d", i);
a452c44357d9c6 Adrian Alonso 2020-11-16 1663 pcm512x->sclk[i] = devm_clk_get(dev, clk_name);
a452c44357d9c6 Adrian Alonso 2020-11-16 1664
a452c44357d9c6 Adrian Alonso 2020-11-16 1665 if (IS_ERR(pcm512x->sclk[i])) {
a452c44357d9c6 Adrian Alonso 2020-11-16 1666 dev_info(dev, "Failed to get sclk%d\n", i);
a452c44357d9c6 Adrian Alonso 2020-11-16 1667 pcm512x->sclk[i] = NULL;
a452c44357d9c6 Adrian Alonso 2020-11-16 1668 }
a452c44357d9c6 Adrian Alonso 2020-11-16 1669 }
a452c44357d9c6 Adrian Alonso 2020-11-16 1670 }
a452c44357d9c6 Adrian Alonso 2020-11-16 1671
f086ba9d5389cc Peter Rosin 2015-01-28 1672 if (of_property_read_u32(np, "pll-in", &val) >= 0) {
f086ba9d5389cc Peter Rosin 2015-01-28 1673 if (val > 6) {
f086ba9d5389cc Peter Rosin 2015-01-28 1674 dev_err(dev, "Invalid pll-in\n");
f086ba9d5389cc Peter Rosin 2015-01-28 1675 ret = -EINVAL;
f086ba9d5389cc Peter Rosin 2015-01-28 1676 goto err_clk;
f086ba9d5389cc Peter Rosin 2015-01-28 1677 }
f086ba9d5389cc Peter Rosin 2015-01-28 1678 pcm512x->pll_in = val;
f086ba9d5389cc Peter Rosin 2015-01-28 1679 }
f086ba9d5389cc Peter Rosin 2015-01-28 1680
f086ba9d5389cc Peter Rosin 2015-01-28 1681 if (of_property_read_u32(np, "pll-out", &val) >= 0) {
f086ba9d5389cc Peter Rosin 2015-01-28 1682 if (val > 6) {
f086ba9d5389cc Peter Rosin 2015-01-28 1683 dev_err(dev, "Invalid pll-out\n");
f086ba9d5389cc Peter Rosin 2015-01-28 1684 ret = -EINVAL;
f086ba9d5389cc Peter Rosin 2015-01-28 1685 goto err_clk;
f086ba9d5389cc Peter Rosin 2015-01-28 1686 }
f086ba9d5389cc Peter Rosin 2015-01-28 1687 pcm512x->pll_out = val;
f086ba9d5389cc Peter Rosin 2015-01-28 1688 }
f086ba9d5389cc Peter Rosin 2015-01-28 1689
f086ba9d5389cc Peter Rosin 2015-01-28 1690 if (!pcm512x->pll_in != !pcm512x->pll_out) {
f086ba9d5389cc Peter Rosin 2015-01-28 1691 dev_err(dev,
f086ba9d5389cc Peter Rosin 2015-01-28 1692 "Error: both pll-in and pll-out, or none\n");
f086ba9d5389cc Peter Rosin 2015-01-28 1693 ret = -EINVAL;
f086ba9d5389cc Peter Rosin 2015-01-28 1694 goto err_clk;
f086ba9d5389cc Peter Rosin 2015-01-28 1695 }
f086ba9d5389cc Peter Rosin 2015-01-28 1696 if (pcm512x->pll_in && pcm512x->pll_in == pcm512x->pll_out) {
f086ba9d5389cc Peter Rosin 2015-01-28 1697 dev_err(dev, "Error: pll-in == pll-out\n");
f086ba9d5389cc Peter Rosin 2015-01-28 1698 ret = -EINVAL;
f086ba9d5389cc Peter Rosin 2015-01-28 1699 goto err_clk;
f086ba9d5389cc Peter Rosin 2015-01-28 1700 }
f086ba9d5389cc Peter Rosin 2015-01-28 1701 }
f086ba9d5389cc Peter Rosin 2015-01-28 1702 #endif
f086ba9d5389cc Peter Rosin 2015-01-28 1703
5bdef14a35bb99 Kuninori Morimoto 2018-01-29 1704 ret = devm_snd_soc_register_component(dev, &pcm512x_component_driver,
5a3af1293194d0 Mark Brown 2014-02-06 1705 &pcm512x_dai, 1);
5a3af1293194d0 Mark Brown 2014-02-06 1706 if (ret != 0) {
5a3af1293194d0 Mark Brown 2014-02-06 1707 dev_err(dev, "Failed to register CODEC: %d\n", ret);
5a3af1293194d0 Mark Brown 2014-02-06 1708 goto err_pm;
5a3af1293194d0 Mark Brown 2014-02-06 1709 }
5a3af1293194d0 Mark Brown 2014-02-06 1710
5a3af1293194d0 Mark Brown 2014-02-06 1711 return 0;
5a3af1293194d0 Mark Brown 2014-02-06 1712
5a3af1293194d0 Mark Brown 2014-02-06 1713 err_pm:
5a3af1293194d0 Mark Brown 2014-02-06 1714 pm_runtime_disable(dev);
5a3af1293194d0 Mark Brown 2014-02-06 1715 err_clk:
a452c44357d9c6 Adrian Alonso 2020-11-16 1716 for (i = 0; i < pcm512x->num_clocks; i++) {
a452c44357d9c6 Adrian Alonso 2020-11-16 1717 if (!IS_ERR(pcm512x->sclk[i]))
a452c44357d9c6 Adrian Alonso 2020-11-16 1718 clk_disable_unprepare(pcm512x->sclk[i]);
a452c44357d9c6 Adrian Alonso 2020-11-16 1719 }
5a3af1293194d0 Mark Brown 2014-02-06 1720 err:
5a3af1293194d0 Mark Brown 2014-02-06 1721 regulator_bulk_disable(ARRAY_SIZE(pcm512x->supplies),
5a3af1293194d0 Mark Brown 2014-02-06 1722 pcm512x->supplies);
5a3af1293194d0 Mark Brown 2014-02-06 1723 return ret;
5a3af1293194d0 Mark Brown 2014-02-06 1724 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 5 months
[kbuild] [chrome-os:chromeos-5.4 54/243] drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:575:34: warning: Uninitialized variable: timeout [uninitvar]
by Dan Carpenter
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 52d269f32500581166246e0e494b2b62d979dba6
commit: 0a438b290ea431bc87156be5819e9f85fa951240 [54/243] CHROMIUM: media: mtk-vcodec: Add h264 slice api driver for mt8192
compiler: hppa-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/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:575:34: warning: Uninitialized variable: timeout [uninitvar]
if (err == SLICE_HEADER_FULL || timeout || (err == TRANS_BUFFER_FULL &&
^
vim +575 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c
0a438b290ea431 Yunfei Dong 2021-01-05 473 static int vdec_h264_slice_decode(void *h_vdec, struct mtk_vcodec_mem *bs,
0a438b290ea431 Yunfei Dong 2021-01-05 474 struct vdec_fb *fb, bool *res_chg)
0a438b290ea431 Yunfei Dong 2021-01-05 475 {
0a438b290ea431 Yunfei Dong 2021-01-05 476 struct vdec_h264_slice_inst *inst = h_vdec;
0a438b290ea431 Yunfei Dong 2021-01-05 477 struct vdec_vpu_inst *vpu = &inst->vpu;
0a438b290ea431 Yunfei Dong 2021-01-05 478 struct mtk_video_dec_buf *src_buf_info;
0a438b290ea431 Yunfei Dong 2021-01-05 479 int nal_start_idx, err, timeout, i;
^^^^^^^
0a438b290ea431 Yunfei Dong 2021-01-05 480 unsigned int nal_type, data[2];
0a438b290ea431 Yunfei Dong 2021-01-05 481 struct vdec_lat_buf *lat_buf;
0a438b290ea431 Yunfei Dong 2021-01-05 482 struct vdec_h264_slice_share_info *share_info;
0a438b290ea431 Yunfei Dong 2021-01-05 483 unsigned char *buf;
0a438b290ea431 Yunfei Dong 2021-01-05 484 struct mtk_vcodec_mem *mem;
0a438b290ea431 Yunfei Dong 2021-01-05 485
0a438b290ea431 Yunfei Dong 2021-01-05 486 mtk_vcodec_debug(inst, "+ [%d] ", ++inst->num_nalu);
0a438b290ea431 Yunfei Dong 2021-01-05 487
0a438b290ea431 Yunfei Dong 2021-01-05 488 if (!inst->ctx->msg_queue.init_done) {
0a438b290ea431 Yunfei Dong 2021-01-05 489 if (vdec_msg_queue_init(inst->ctx, &inst->ctx->msg_queue,
0a438b290ea431 Yunfei Dong 2021-01-05 490 vdec_h264_slice_core_decode, sizeof(*share_info)))
0a438b290ea431 Yunfei Dong 2021-01-05 491 return -ENOMEM;
0a438b290ea431 Yunfei Dong 2021-01-05 492 }
0a438b290ea431 Yunfei Dong 2021-01-05 493
0a438b290ea431 Yunfei Dong 2021-01-05 494 /* bs NULL means flush decoder */
0a438b290ea431 Yunfei Dong 2021-01-05 495 if (!bs) {
0a438b290ea431 Yunfei Dong 2021-01-05 496 vdec_msg_queue_wait_lat_buf_full(&inst->ctx->msg_queue);
0a438b290ea431 Yunfei Dong 2021-01-05 497 return vpu_dec_reset(vpu);
0a438b290ea431 Yunfei Dong 2021-01-05 498 }
0a438b290ea431 Yunfei Dong 2021-01-05 499
0a438b290ea431 Yunfei Dong 2021-01-05 500 lat_buf = vdec_msg_queue_get_lat_buf(&inst->ctx->msg_queue);
0a438b290ea431 Yunfei Dong 2021-01-05 501 if (!lat_buf) {
0a438b290ea431 Yunfei Dong 2021-01-05 502 mtk_vcodec_err(inst, "failed to get lat buffer");
0a438b290ea431 Yunfei Dong 2021-01-05 503 return -EINVAL;
0a438b290ea431 Yunfei Dong 2021-01-05 504 }
0a438b290ea431 Yunfei Dong 2021-01-05 505 share_info = lat_buf->private_data;
0a438b290ea431 Yunfei Dong 2021-01-05 506 src_buf_info = container_of(bs, struct mtk_video_dec_buf, bs_buffer);
0a438b290ea431 Yunfei Dong 2021-01-05 507
0a438b290ea431 Yunfei Dong 2021-01-05 508 buf = (unsigned char *)bs->va;
0a438b290ea431 Yunfei Dong 2021-01-05 509 nal_start_idx = mtk_vdec_h264_find_start_code(buf, bs->size);
0a438b290ea431 Yunfei Dong 2021-01-05 510 if (nal_start_idx < 0) {
0a438b290ea431 Yunfei Dong 2021-01-05 511 err = -EINVAL;
0a438b290ea431 Yunfei Dong 2021-01-05 512 goto err_free_fb_out;
0a438b290ea431 Yunfei Dong 2021-01-05 513 }
0a438b290ea431 Yunfei Dong 2021-01-05 514
0a438b290ea431 Yunfei Dong 2021-01-05 515 inst->vsi->dec.nal_info = buf[nal_start_idx];
0a438b290ea431 Yunfei Dong 2021-01-05 516 nal_type = NAL_TYPE(buf[nal_start_idx]);
0a438b290ea431 Yunfei Dong 2021-01-05 517 mtk_vcodec_debug(inst, "\n + NALU[%d] type %d +\n", inst->num_nalu,
0a438b290ea431 Yunfei Dong 2021-01-05 518 nal_type);
0a438b290ea431 Yunfei Dong 2021-01-05 519
0a438b290ea431 Yunfei Dong 2021-01-05 520 inst->vsi->dec.bs_buf_addr = (uint64_t)bs->dma_addr;
0a438b290ea431 Yunfei Dong 2021-01-05 521 inst->vsi->dec.bs_buf_size = bs->size;
0a438b290ea431 Yunfei Dong 2021-01-05 522
0a438b290ea431 Yunfei Dong 2021-01-05 523 v4l2_m2m_buf_copy_metadata(&src_buf_info->m2m_buf.vb,
0a438b290ea431 Yunfei Dong 2021-01-05 524 &lat_buf->ts_info, true);
0a438b290ea431 Yunfei Dong 2021-01-05 525
0a438b290ea431 Yunfei Dong 2021-01-05 526 vdec_h264_slice_fill_decode_parameters(inst, share_info);
0a438b290ea431 Yunfei Dong 2021-01-05 527 *res_chg = inst->resolution_changed;
0a438b290ea431 Yunfei Dong 2021-01-05 528 if (inst->resolution_changed) {
0a438b290ea431 Yunfei Dong 2021-01-05 529 mtk_vcodec_debug(inst, "- resolution changed -");
0a438b290ea431 Yunfei Dong 2021-01-05 530 if (inst->realloc_mv_buf) {
0a438b290ea431 Yunfei Dong 2021-01-05 531 err = vdec_h264_slice_alloc_mv_buf(inst, &inst->ctx->picinfo);
0a438b290ea431 Yunfei Dong 2021-01-05 532 inst->realloc_mv_buf = false;
0a438b290ea431 Yunfei Dong 2021-01-05 533 if (err)
0a438b290ea431 Yunfei Dong 2021-01-05 534 goto err_free_fb_out;
0a438b290ea431 Yunfei Dong 2021-01-05 535 }
0a438b290ea431 Yunfei Dong 2021-01-05 536 inst->resolution_changed = false;
0a438b290ea431 Yunfei Dong 2021-01-05 537 }
0a438b290ea431 Yunfei Dong 2021-01-05 538 for (i = 0; i < H264_MAX_MV_NUM; i++) {
0a438b290ea431 Yunfei Dong 2021-01-05 539 mem = &inst->mv_buf[i];
0a438b290ea431 Yunfei Dong 2021-01-05 540 inst->vsi->mv_buf_dma[i] = mem->dma_addr;
0a438b290ea431 Yunfei Dong 2021-01-05 541 }
0a438b290ea431 Yunfei Dong 2021-01-05 542 inst->vsi->wdma_start_addr = lat_buf->ctx->msg_queue.wdma_addr.dma_addr;
0a438b290ea431 Yunfei Dong 2021-01-05 543 inst->vsi->wdma_end_addr = lat_buf->ctx->msg_queue.wdma_addr.dma_addr +
0a438b290ea431 Yunfei Dong 2021-01-05 544 lat_buf->ctx->msg_queue.wdma_addr.size;
0a438b290ea431 Yunfei Dong 2021-01-05 545 inst->vsi->wdma_err_addr = lat_buf->wdma_err_addr.dma_addr;
0a438b290ea431 Yunfei Dong 2021-01-05 546 inst->vsi->slice_bc_start_addr = lat_buf->slice_bc_addr.dma_addr;
0a438b290ea431 Yunfei Dong 2021-01-05 547 inst->vsi->slice_bc_end_addr = lat_buf->slice_bc_addr.dma_addr +
0a438b290ea431 Yunfei Dong 2021-01-05 548 lat_buf->slice_bc_addr.size;
0a438b290ea431 Yunfei Dong 2021-01-05 549
0a438b290ea431 Yunfei Dong 2021-01-05 550 inst->vsi->trans_end = inst->ctx->msg_queue.wdma_rptr_addr;
0a438b290ea431 Yunfei Dong 2021-01-05 551 inst->vsi->trans_start = inst->ctx->msg_queue.wdma_wptr_addr;
0a438b290ea431 Yunfei Dong 2021-01-05 552 mtk_vcodec_debug(inst, "lat:trans(0x%llx 0x%llx)err:0x%llx",
0a438b290ea431 Yunfei Dong 2021-01-05 553 inst->vsi->wdma_start_addr,
0a438b290ea431 Yunfei Dong 2021-01-05 554 inst->vsi->wdma_end_addr,
0a438b290ea431 Yunfei Dong 2021-01-05 555 inst->vsi->wdma_err_addr);
0a438b290ea431 Yunfei Dong 2021-01-05 556
0a438b290ea431 Yunfei Dong 2021-01-05 557 mtk_vcodec_debug(inst, "slice(0x%llx 0x%llx) rprt((0x%llx 0x%llx))",
0a438b290ea431 Yunfei Dong 2021-01-05 558 inst->vsi->slice_bc_start_addr,
0a438b290ea431 Yunfei Dong 2021-01-05 559 inst->vsi->slice_bc_end_addr,
0a438b290ea431 Yunfei Dong 2021-01-05 560 inst->vsi->trans_start,
0a438b290ea431 Yunfei Dong 2021-01-05 561 inst->vsi->trans_end);
0a438b290ea431 Yunfei Dong 2021-01-05 562 err = vpu_dec_start(vpu, data, 2);
0a438b290ea431 Yunfei Dong 2021-01-05 563 if (err) {
0a438b290ea431 Yunfei Dong 2021-01-05 564 mtk_vcodec_debug(inst, "lat decode err: %d", err);
0a438b290ea431 Yunfei Dong 2021-01-05 565 goto err_free_fb_out;
0a438b290ea431 Yunfei Dong 2021-01-05 566 }
0a438b290ea431 Yunfei Dong 2021-01-05 567
0a438b290ea431 Yunfei Dong 2021-01-05 568 if (nal_type == NAL_NON_IDR_SLICE || nal_type == NAL_IDR_SLICE) {
0a438b290ea431 Yunfei Dong 2021-01-05 569 /* wait decoder done interrupt */
0a438b290ea431 Yunfei Dong 2021-01-05 570 timeout = mtk_vcodec_wait_for_done_ctx(
0a438b290ea431 Yunfei Dong 2021-01-05 571 inst->ctx, MTK_INST_IRQ_RECEIVED, WAIT_INTR_TIMEOUT_MS);
0a438b290ea431 Yunfei Dong 2021-01-05 572 inst->vsi->dec.timeout = !!timeout;
0a438b290ea431 Yunfei Dong 2021-01-05 573 }
"timeout" not initialized for false path.
0a438b290ea431 Yunfei Dong 2021-01-05 574 err = vpu_dec_end(vpu);
0a438b290ea431 Yunfei Dong 2021-01-05 @575 if (err == SLICE_HEADER_FULL || timeout || (err == TRANS_BUFFER_FULL &&
^^^^^^^
0a438b290ea431 Yunfei Dong 2021-01-05 576 inst->ctx->msg_queue.wdma_rptr_addr ==
0a438b290ea431 Yunfei Dong 2021-01-05 577 inst->ctx->msg_queue.wdma_wptr_addr)) {
0a438b290ea431 Yunfei Dong 2021-01-05 578 err = -EINVAL;
0a438b290ea431 Yunfei Dong 2021-01-05 579 goto err_free_fb_out;
0a438b290ea431 Yunfei Dong 2021-01-05 580 } else if (err == TRANS_BUFFER_FULL){
0a438b290ea431 Yunfei Dong 2021-01-05 581 goto err_free_fb_out;
0a438b290ea431 Yunfei Dong 2021-01-05 582 }
0a438b290ea431 Yunfei Dong 2021-01-05 583
0a438b290ea431 Yunfei Dong 2021-01-05 584 share_info->trans_end = inst->ctx->msg_queue.wdma_addr.dma_addr +
0a438b290ea431 Yunfei Dong 2021-01-05 585 inst->vsi->wdma_end_addr_offset;
0a438b290ea431 Yunfei Dong 2021-01-05 586 share_info->trans_start = inst->ctx->msg_queue.wdma_wptr_addr;
0a438b290ea431 Yunfei Dong 2021-01-05 587 share_info->nal_info = inst->vsi->dec.nal_info;
0a438b290ea431 Yunfei Dong 2021-01-05 588 vdec_msg_queue_update_ube_wptr(&lat_buf->ctx->msg_queue,
0a438b290ea431 Yunfei Dong 2021-01-05 589 share_info->trans_end);
0a438b290ea431 Yunfei Dong 2021-01-05 590
0a438b290ea431 Yunfei Dong 2021-01-05 591 memcpy(&share_info->h264_slice_params, &inst->vsi->h264_slice_params,
0a438b290ea431 Yunfei Dong 2021-01-05 592 sizeof(share_info->h264_slice_params));
0a438b290ea431 Yunfei Dong 2021-01-05 593 vdec_msg_queue_buf_to_core(inst->ctx->dev, lat_buf);
0a438b290ea431 Yunfei Dong 2021-01-05 594 mtk_vcodec_debug(inst, "- NALU[%d] type=%d -\n", inst->num_nalu,
0a438b290ea431 Yunfei Dong 2021-01-05 595 nal_type);
0a438b290ea431 Yunfei Dong 2021-01-05 596 return 0;
0a438b290ea431 Yunfei Dong 2021-01-05 597
0a438b290ea431 Yunfei Dong 2021-01-05 598 err_free_fb_out:
0a438b290ea431 Yunfei Dong 2021-01-05 599 if (lat_buf)
0a438b290ea431 Yunfei Dong 2021-01-05 600 vdec_msg_queue_buf_to_lat(lat_buf);
0a438b290ea431 Yunfei Dong 2021-01-05 601 mtk_vcodec_err(inst, "- NALU[%d] err=%d -\n", inst->num_nalu, err);
0a438b290ea431 Yunfei Dong 2021-01-05 602 return err;
0a438b290ea431 Yunfei Dong 2021-01-05 603 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 5 months
[hch-misc:amd-iommu-cleanups.2 3/3] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_iommu.c:296:21: error: initialization of 'void (*)(struct pci_dev *, int)' from incompatible pointer type 'void (*)(struct pci_dev *, u32)' {aka 'void (*)(struct pci_dev *, unsigned int)'}
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git amd-iommu-cleanups.2
head: 7d6e5c6ac3134ba3b30070b40d534d35bdfe1ea4
commit: 7d6e5c6ac3134ba3b30070b40d534d35bdfe1ea4 [3/3] iommu/amd: move iommu v2 callbacks into an ops structure
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc amd-iommu-cleanups.2
git checkout 7d6e5c6ac3134ba3b30070b40d534d35bdfe1ea4
# save the attached .config to linux build tree
make W=1 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/amd/amdgpu/../amdkfd/kfd_iommu.c:296:21: error: initialization of 'void (*)(struct pci_dev *, int)' from incompatible pointer type 'void (*)(struct pci_dev *, u32)' {aka 'void (*)(struct pci_dev *, unsigned int)'} [-Werror=incompatible-pointer-types]
296 | .invalidate_ctx = iommu_pasid_shutdown_callback,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_iommu.c:296:21: note: (near initialization for 'kfd_iommu_device_ops.invalidate_ctx')
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_iommu.c:297:18: error: initialization of 'int (*)(struct pci_dev *, int, long unsigned int, u16)' {aka 'int (*)(struct pci_dev *, int, long unsigned int, short unsigned int)'} from incompatible pointer type 'int (*)(struct pci_dev *, u32, long unsigned int, u16)' {aka 'int (*)(struct pci_dev *, unsigned int, long unsigned int, short unsigned int)'} [-Werror=incompatible-pointer-types]
297 | .invalid_ppr = iommu_invalid_ppr_cb,
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_iommu.c:297:18: note: (near initialization for 'kfd_iommu_device_ops.invalid_ppr')
cc1: some warnings being treated as errors
vim +296 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_iommu.c
294
295 static const struct amd_iommu_device_ops kfd_iommu_device_ops = {
> 296 .invalidate_ctx = iommu_pasid_shutdown_callback,
> 297 .invalid_ppr = iommu_invalid_ppr_cb,
298 };
299
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
by kernel test robot
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7af08140979a6e7e12b78c93b8625c8d25b084e2
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 3 months ago
config: powerpc64-randconfig-r024-20210419 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
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 >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:115:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju(a)linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
cc1: error: arch/sh/include/mach-hp6xx: No such file or directory
by kernel test robot
Hi Masahiro,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7af08140979a6e7e12b78c93b8625c8d25b084e2
commit: 4c8dd95a723d9cccf8810be54aa62be82885c9d8 kbuild: add some extra warning flags unconditionally
date: 1 year, 11 months ago
config: sh-hp6xx_defconfig (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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4c8dd95a723d9cccf8810be54aa62be82885c9d8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 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 >>):
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/kernel/idle.c:32:6: error: no previous prototype for 'arch_cpu_idle_dead' [-Werror=missing-prototypes]
32 | void arch_cpu_idle_dead(void)
| ^~~~~~~~~~~~~~~~~~
arch/sh/kernel/idle.c:37:6: error: no previous prototype for 'arch_cpu_idle' [-Werror=missing-prototypes]
37 | void arch_cpu_idle(void)
| ^~~~~~~~~~~~~
arch/sh/kernel/idle.c:42:13: error: no previous prototype for 'select_idle_routine' [-Werror=missing-prototypes]
42 | void __init select_idle_routine(void)
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/kernel/machvec.c: In function 'early_parse_mv':
arch/sh/kernel/machvec.c:43:8: error: variable 'mv_comma' set but not used [-Werror=unused-but-set-variable]
43 | char *mv_comma;
| ^~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/kernel/ptrace_32.c: In function 'arch_ptrace':
arch/sh/kernel/ptrace_32.c:380:26: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
380 | if ((addr & 3) || addr < 0 ||
| ^
arch/sh/kernel/ptrace_32.c:420:26: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
420 | if ((addr & 3) || addr < 0 ||
| ^
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/kernel/return_address.c:49:7: error: no previous prototype for 'return_address' [-Werror=missing-prototypes]
49 | void *return_address(unsigned int depth)
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/kernel/sys_sh.c:58:16: error: no previous prototype for 'sys_cacheflush' [-Werror=missing-prototypes]
58 | asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op)
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/kernel/traps_32.c:731:6: error: no previous prototype for 'per_cpu_trap_init' [-Werror=missing-prototypes]
731 | void per_cpu_trap_init(void)
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/kernel/hw_breakpoint.c:135:5: error: no previous prototype for 'arch_bp_generic_fields' [-Werror=missing-prototypes]
135 | int arch_bp_generic_fields(int sh_len, int sh_type,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/sh/kernel/hw_breakpoint.c: In function 'arch_bp_generic_fields':
arch/sh/kernel/hw_breakpoint.c:159:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
159 | *gen_type = HW_BREAKPOINT_R;
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~
arch/sh/kernel/hw_breakpoint.c:160:2: note: here
160 | case SH_BREAKPOINT_WRITE:
| ^~~~
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/mm/cache-sh3.c:93:13: error: no previous prototype for 'sh3_cache_init' [-Werror=missing-prototypes]
93 | void __init sh3_cache_init(void)
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/mm/fault.c:391:27: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]
391 | asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
arch/sh/mm/pgtable.c:12:6: error: no previous prototype for 'pgd_ctor' [-Werror=missing-prototypes]
12 | void pgd_ctor(void *x)
| ^~~~~~~~
arch/sh/mm/pgtable.c:33:8: error: no previous prototype for 'pgd_alloc' [-Werror=missing-prototypes]
33 | pgd_t *pgd_alloc(struct mm_struct *mm)
| ^~~~~~~~~
arch/sh/mm/pgtable.c:38:6: error: no previous prototype for 'pgd_free' [-Werror=missing-prototypes]
38 | void pgd_free(struct mm_struct *mm, pgd_t *pgd)
| ^~~~~~~~
cc1: all warnings being treated as errors
..
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months