[kbuild] [chrome-os:chromeos-5.4 11/13] drivers/gpu/drm/virtio/virtgpu_kms.c:315 virtio_gpu_driver_open() warn: possible memory leak of 'vfpriv'
by Dan Carpenter
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: aaac331bb0ff1bdb6ca7d9f12634a7028df6addc
commit: b182d75023cbf6ff0ab079ac0377399d6096d7c2 [11/13] CHROMIUM: drm/virtio: implement context init: support init ioctl
config: i386-randconfig-m021-20210318 (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:
drivers/gpu/drm/virtio/virtgpu_kms.c:315 virtio_gpu_driver_open() warn: possible memory leak of 'vfpriv'
vim +/vfpriv +315 drivers/gpu/drm/virtio/virtgpu_kms.c
62fb7a5e10962a Gerd Hoffmann 2014-10-28 295 int virtio_gpu_driver_open(struct drm_device *dev, struct drm_file *file)
62fb7a5e10962a Gerd Hoffmann 2014-10-28 296 {
62fb7a5e10962a Gerd Hoffmann 2014-10-28 297 struct virtio_gpu_device *vgdev = dev->dev_private;
62fb7a5e10962a Gerd Hoffmann 2014-10-28 298 struct virtio_gpu_fpriv *vfpriv;
b182d75023cbf6 Ryan Neph 2021-02-02 299 int handle;
a86f25518e3ab7 Michał Mirosław 2017-08-31 300 char dbgname[TASK_COMM_LEN];
62fb7a5e10962a Gerd Hoffmann 2014-10-28 301
62fb7a5e10962a Gerd Hoffmann 2014-10-28 302 /* can't create contexts without 3d renderer */
62fb7a5e10962a Gerd Hoffmann 2014-10-28 303 if (!vgdev->has_virgl_3d)
62fb7a5e10962a Gerd Hoffmann 2014-10-28 304 return 0;
62fb7a5e10962a Gerd Hoffmann 2014-10-28 305
62fb7a5e10962a Gerd Hoffmann 2014-10-28 306 /* allocate a virt GPU context for this opener */
62fb7a5e10962a Gerd Hoffmann 2014-10-28 307 vfpriv = kzalloc(sizeof(*vfpriv), GFP_KERNEL);
62fb7a5e10962a Gerd Hoffmann 2014-10-28 308 if (!vfpriv)
62fb7a5e10962a Gerd Hoffmann 2014-10-28 309 return -ENOMEM;
62fb7a5e10962a Gerd Hoffmann 2014-10-28 310
a86f25518e3ab7 Michał Mirosław 2017-08-31 311 get_task_comm(dbgname, current);
62fb7a5e10962a Gerd Hoffmann 2014-10-28 312
b182d75023cbf6 Ryan Neph 2021-02-02 313 handle = ida_alloc(&vgdev->ctx_id_ida, GFP_KERNEL);
b182d75023cbf6 Ryan Neph 2021-02-02 314 if (handle < 0)
b182d75023cbf6 Ryan Neph 2021-02-02 @315 return handle;
kfree(vfpriv);
b182d75023cbf6 Ryan Neph 2021-02-02 316
b182d75023cbf6 Ryan Neph 2021-02-02 317 vfpriv->ctx_id = handle + 1;
b182d75023cbf6 Ryan Neph 2021-02-02 318
b182d75023cbf6 Ryan Neph 2021-02-02 319 /* create the default context without context_init flags for
b182d75023cbf6 Ryan Neph 2021-02-02 320 * back-compatibility
b182d75023cbf6 Ryan Neph 2021-02-02 321 */
b182d75023cbf6 Ryan Neph 2021-02-02 322 virtio_gpu_cmd_context_create(vgdev, vfpriv->ctx_id, 0, strlen(dbgname),
b182d75023cbf6 Ryan Neph 2021-02-02 323 dbgname);
b182d75023cbf6 Ryan Neph 2021-02-02 324
62fb7a5e10962a Gerd Hoffmann 2014-10-28 325 file->driver_priv = vfpriv;
62fb7a5e10962a Gerd Hoffmann 2014-10-28 326 return 0;
62fb7a5e10962a Gerd Hoffmann 2014-10-28 327 }
---
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, 6 months
[peterz-queue:locking/jump_label 10/13] arch/x86/kernel/jump_label.c:23:14: error: storage size of 'insn' isn't known
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/jump_label
head: 8fb8d36194a6d1ac0ea7ae64a4044c203177828f
commit: db137d1c529ef853ec57d11e258e299804b8d599 [10/13] jump_label,x86: Emit short JMP
config: x86_64-randconfig-m001-20210318 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/jump_label
git checkout db137d1c529ef853ec57d11e258e299804b8d599
# 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 >>):
arch/x86/kernel/jump_label.c: In function 'arch_jump_entry_size':
arch/x86/kernel/jump_label.c:23:9: error: variable 'insn' has initializer but incomplete type
23 | struct insn insn = {};
| ^~~~
>> arch/x86/kernel/jump_label.c:23:14: error: storage size of 'insn' isn't known
23 | struct insn insn = {};
| ^~~~
arch/x86/kernel/jump_label.c:25:2: error: implicit declaration of function 'insn_decode_kernel' [-Werror=implicit-function-declaration]
25 | insn_decode_kernel(&insn, (void *)jump_entry_code(entry));
| ^~~~~~~~~~~~~~~~~~
arch/x86/kernel/jump_label.c:23:14: warning: unused variable 'insn' [-Wunused-variable]
23 | struct insn insn = {};
| ^~~~
arch/x86/kernel/jump_label.c:29:1: error: control reaches end of non-void function [-Werror=return-type]
29 | }
| ^
cc1: some warnings being treated as errors
vim +23 arch/x86/kernel/jump_label.c
20
21 int arch_jump_entry_size(struct jump_entry *entry)
22 {
> 23 struct insn insn = {};
24
25 insn_decode_kernel(&insn, (void *)jump_entry_code(entry));
26 BUG_ON(insn.length != 2 && insn.length != 5);
27
28 return insn.length;
29 }
30
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[atishp04:sbi_pmu_v1 11/14] drivers/perf/riscv_pmu.c:36:15: warning: no previous prototype for function 'csr_read_num'
by kernel test robot
tree: https://github.com/atishp04/linux sbi_pmu_v1
head: d82bc37d5a962b33af712da468a82d2ced9eb194
commit: 5009c84a60b998b44c7c8481984b5553bfc0986c [11/14] RISC-V: Add a perf platform driver
config: riscv-randconfig-r001-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
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
# https://github.com/atishp04/linux/commit/5009c84a60b998b44c7c8481984b5553...
git remote add atishp04 https://github.com/atishp04/linux
git fetch --no-tags atishp04 sbi_pmu_v1
git checkout 5009c84a60b998b44c7c8481984b5553bfc0986c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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/perf/riscv_pmu.c:36:15: warning: no previous prototype for function 'csr_read_num' [-Wmissing-prototypes]
unsigned long csr_read_num(int csr_num)
^
drivers/perf/riscv_pmu.c:36:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned long csr_read_num(int csr_num)
^
static
1 warning generated.
vim +/csr_read_num +36 drivers/perf/riscv_pmu.c
35
> 36 unsigned long csr_read_num(int csr_num)
37 {
38 #define switchcase_csr_read(__csr_num, __val) {\
39 case __csr_num: \
40 __val = csr_read(__csr_num); \
41 break; }
42 #define switchcase_csr_read_2(__csr_num, __val) {\
43 switchcase_csr_read(__csr_num + 0, __val) \
44 switchcase_csr_read(__csr_num + 1, __val)}
45 #define switchcase_csr_read_4(__csr_num, __val) {\
46 switchcase_csr_read_2(__csr_num + 0, __val) \
47 switchcase_csr_read_2(__csr_num + 2, __val)}
48 #define switchcase_csr_read_8(__csr_num, __val) {\
49 switchcase_csr_read_4(__csr_num + 0, __val) \
50 switchcase_csr_read_4(__csr_num + 4, __val)}
51 #define switchcase_csr_read_16(__csr_num, __val) {\
52 switchcase_csr_read_8(__csr_num + 0, __val) \
53 switchcase_csr_read_8(__csr_num + 8, __val)}
54 #define switchcase_csr_read_32(__csr_num, __val) {\
55 switchcase_csr_read_16(__csr_num + 0, __val) \
56 switchcase_csr_read_16(__csr_num + 16, __val)}
57
58 unsigned long ret = 0;
59
60 switch (csr_num) {
61 switchcase_csr_read_32(CSR_CYCLE, ret)
62 switchcase_csr_read_32(CSR_CYCLEH, ret)
63 default :
64 break;
65 };
66
67 return ret;
68
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[chrome-os:chromeos-4.4 4/214] include/linux/clk.h:199:57: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: 165087594d83615eb48f64ee09830ccccd7f4ae4
commit: dee1850ff865c718860372afc1b2ff90da07abfa [4/214] BACKPORT: clk: Provide bulk prepare_enable disable_unprepare variants
config: nios2-randconfig-p001-20210318 (attached as .config)
compiler: nios2-linux-gcc (GCC) 7.5.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-4.4
git checkout dee1850ff865c718860372afc1b2ff90da07abfa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=nios2
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 drivers/tty/serial/sccnxp.c:18:0:
>> include/linux/clk.h:199:57: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:223:60: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:528:18: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:539:16: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:546:54: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_put(int num_clks, struct clk_bulk_data *clks) {}
^~~~~~~~~~~~~
include/linux/clk.h:555:56: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:564:16: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks) {}
^~~~~~~~~~~~~
include/linux/clk.h:624:15: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h: In function 'clk_bulk_prepare_enable':
>> include/linux/clk.h:628:35: warning: passing argument 2 of 'clk_bulk_prepare' from incompatible pointer type [-Wincompatible-pointer-types]
ret = clk_bulk_prepare(num_clks, clks);
^~~~
include/linux/clk.h:199:19: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~
>> include/linux/clk.h:631:34: warning: passing argument 2 of 'clk_bulk_enable' from incompatible pointer type [-Wincompatible-pointer-types]
ret = clk_bulk_enable(num_clks, clks);
^~~~
include/linux/clk.h:555:19: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~
>> include/linux/clk.h:633:32: warning: passing argument 2 of 'clk_bulk_unprepare' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_unprepare(num_clks, clks);
^~~~
include/linux/clk.h:223:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~~~
include/linux/clk.h: At top level:
include/linux/clk.h:639:19: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h: In function 'clk_bulk_disable_unprepare':
>> include/linux/clk.h:641:29: warning: passing argument 2 of 'clk_bulk_disable' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_disable(num_clks, clks);
^~~~
include/linux/clk.h:563:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_disable(int num_clks,
^~~~~~~~~~~~~~~~
include/linux/clk.h:642:31: warning: passing argument 2 of 'clk_bulk_unprepare' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_unprepare(num_clks, clks);
^~~~
include/linux/clk.h:223:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~~~
drivers/tty/serial/sccnxp.c: In function 'sccnxp_verify_port':
drivers/tty/serial/sccnxp.c:775:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (s->irq == port->irq)
^~
drivers/tty/serial/sccnxp.c: In function 'sccnxp_probe':
drivers/tty/serial/sccnxp.c:902:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((uartclk < s->chip->freq_min) || (uartclk > s->chip->freq_max)) {
^
drivers/tty/serial/sccnxp.c:902:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((uartclk < s->chip->freq_min) || (uartclk > s->chip->freq_max)) {
^
--
In file included from drivers/tty/serial/sc16is7xx.c:17:0:
>> include/linux/clk.h:199:57: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:223:60: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:528:18: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:539:16: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:546:54: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_put(int num_clks, struct clk_bulk_data *clks) {}
^~~~~~~~~~~~~
include/linux/clk.h:555:56: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:564:16: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks) {}
^~~~~~~~~~~~~
include/linux/clk.h:624:15: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h: In function 'clk_bulk_prepare_enable':
>> include/linux/clk.h:628:35: warning: passing argument 2 of 'clk_bulk_prepare' from incompatible pointer type [-Wincompatible-pointer-types]
ret = clk_bulk_prepare(num_clks, clks);
^~~~
include/linux/clk.h:199:19: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~
>> include/linux/clk.h:631:34: warning: passing argument 2 of 'clk_bulk_enable' from incompatible pointer type [-Wincompatible-pointer-types]
ret = clk_bulk_enable(num_clks, clks);
^~~~
include/linux/clk.h:555:19: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~
>> include/linux/clk.h:633:32: warning: passing argument 2 of 'clk_bulk_unprepare' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_unprepare(num_clks, clks);
^~~~
include/linux/clk.h:223:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~~~
include/linux/clk.h: At top level:
include/linux/clk.h:639:19: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h: In function 'clk_bulk_disable_unprepare':
>> include/linux/clk.h:641:29: warning: passing argument 2 of 'clk_bulk_disable' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_disable(num_clks, clks);
^~~~
include/linux/clk.h:563:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_disable(int num_clks,
^~~~~~~~~~~~~~~~
include/linux/clk.h:642:31: warning: passing argument 2 of 'clk_bulk_unprepare' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_unprepare(num_clks, clks);
^~~~
include/linux/clk.h:223:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~~~
drivers/tty/serial/sc16is7xx.c: In function 'sc16is7xx_verify_port':
drivers/tty/serial/sc16is7xx.c:1080:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (s->irq != port->irq)
^~
--
In file included from drivers/tty/serial/8250/8250_dw.c:28:0:
>> include/linux/clk.h:199:57: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:223:60: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:528:18: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:539:16: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:546:54: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_put(int num_clks, struct clk_bulk_data *clks) {}
^~~~~~~~~~~~~
include/linux/clk.h:555:56: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:564:16: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks) {}
^~~~~~~~~~~~~
include/linux/clk.h:624:15: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h: In function 'clk_bulk_prepare_enable':
>> include/linux/clk.h:628:35: warning: passing argument 2 of 'clk_bulk_prepare' from incompatible pointer type [-Wincompatible-pointer-types]
ret = clk_bulk_prepare(num_clks, clks);
^~~~
include/linux/clk.h:199:19: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~
>> include/linux/clk.h:631:34: warning: passing argument 2 of 'clk_bulk_enable' from incompatible pointer type [-Wincompatible-pointer-types]
ret = clk_bulk_enable(num_clks, clks);
^~~~
include/linux/clk.h:555:19: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~
>> include/linux/clk.h:633:32: warning: passing argument 2 of 'clk_bulk_unprepare' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_unprepare(num_clks, clks);
^~~~
include/linux/clk.h:223:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~~~
include/linux/clk.h: At top level:
include/linux/clk.h:639:19: warning: 'struct clk_bulk_data' declared inside parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h: In function 'clk_bulk_disable_unprepare':
>> include/linux/clk.h:641:29: warning: passing argument 2 of 'clk_bulk_disable' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_disable(num_clks, clks);
^~~~
include/linux/clk.h:563:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_disable(int num_clks,
^~~~~~~~~~~~~~~~
include/linux/clk.h:642:31: warning: passing argument 2 of 'clk_bulk_unprepare' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_unprepare(num_clks, clks);
^~~~
include/linux/clk.h:223:20: note: expected 'struct clk_bulk_data *' but argument is of type 'struct clk_bulk_data *'
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~~~~
drivers/tty/serial/8250/8250_dw.c: In function 'dw8250_serial_out':
drivers/tty/serial/8250/8250_dw.c:109:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((value & ~UART_LCR_SPAR) == (lcr & ~UART_LCR_SPAR))
^~
drivers/tty/serial/8250/8250_dw.c: In function 'dw8250_serial_out32':
drivers/tty/serial/8250/8250_dw.c:173:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((value & ~UART_LCR_SPAR) == (lcr & ~UART_LCR_SPAR))
^~
At top level:
drivers/tty/serial/8250/8250_dw.c:643:36: warning: 'dw8250_acpi_match' defined but not used [-Wunused-const-variable=]
static const struct acpi_device_id dw8250_acpi_match[] = {
^~~~~~~~~~~~~~~~~
vim +199 include/linux/clk.h
e228c54ae37236 Dong Aisheng 2017-05-19 198
e228c54ae37236 Dong Aisheng 2017-05-19 @199 static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
e228c54ae37236 Dong Aisheng 2017-05-19 200 {
e228c54ae37236 Dong Aisheng 2017-05-19 201 might_sleep();
e228c54ae37236 Dong Aisheng 2017-05-19 202 return 0;
e228c54ae37236 Dong Aisheng 2017-05-19 203 }
93abe8e4b13ae9 Viresh Kumar 2012-07-30 204 #endif
93abe8e4b13ae9 Viresh Kumar 2012-07-30 205
:::::: The code at line 199 was first introduced by commit
:::::: e228c54ae3723655ad86be34cbac9dfdc42c47d1 BACKPORT: clk: add clk_bulk_get accessories
:::::: TO: Dong Aisheng <aisheng.dong(a)nxp.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, 6 months
[security:landlock_lsm 8/12] kernel/sys_ni.c:270:1: warning: no previous prototype for function '__x64_sys_landlock_create_ruleset'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git landlock_lsm
head: f642729df39003efe2a9bfa341a95759d712eb35
commit: c5eafae25eb54cc5354f0675a88a34f03c08f559 [8/12] landlock: Add syscall implementations
config: x86_64-randconfig-r004-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.gi...
git remote add security https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git
git fetch --no-tags security landlock_lsm
git checkout c5eafae25eb54cc5354f0675a88a34f03c08f559
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sys_ni.c:265:1: warning: no previous prototype for function '__ia32_sys_request_key' [-Wmissing-prototypes]
COND_SYSCALL(request_key);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:23:1: note: expanded from here
__ia32_sys_request_key
^
kernel/sys_ni.c:265:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:266:1: warning: no previous prototype for function '__x64_sys_keyctl' [-Wmissing-prototypes]
COND_SYSCALL(keyctl);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:27:1: note: expanded from here
__x64_sys_keyctl
^
kernel/sys_ni.c:266:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:266:1: warning: no previous prototype for function '__ia32_sys_keyctl' [-Wmissing-prototypes]
COND_SYSCALL(keyctl);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:31:1: note: expanded from here
__ia32_sys_keyctl
^
kernel/sys_ni.c:266:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:267:1: warning: no previous prototype for function '__ia32_compat_sys_keyctl' [-Wmissing-prototypes]
COND_SYSCALL_COMPAT(keyctl);
^
arch/x86/include/asm/syscall_wrapper.h:218:2: note: expanded from macro 'COND_SYSCALL_COMPAT'
__IA32_COMPAT_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:148:2: note: expanded from macro '__IA32_COMPAT_COND_SYSCALL'
__COND_SYSCALL(ia32, compat_sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:35:1: note: expanded from here
__ia32_compat_sys_keyctl
^
kernel/sys_ni.c:267:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:218:2: note: expanded from macro 'COND_SYSCALL_COMPAT'
__IA32_COMPAT_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:148:2: note: expanded from macro '__IA32_COMPAT_COND_SYSCALL'
__COND_SYSCALL(ia32, compat_sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
>> kernel/sys_ni.c:270:1: warning: no previous prototype for function '__x64_sys_landlock_create_ruleset' [-Wmissing-prototypes]
COND_SYSCALL(landlock_create_ruleset);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:39:1: note: expanded from here
__x64_sys_landlock_create_ruleset
^
kernel/sys_ni.c:270:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
>> kernel/sys_ni.c:270:1: warning: no previous prototype for function '__ia32_sys_landlock_create_ruleset' [-Wmissing-prototypes]
COND_SYSCALL(landlock_create_ruleset);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:43:1: note: expanded from here
__ia32_sys_landlock_create_ruleset
^
kernel/sys_ni.c:270:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
>> kernel/sys_ni.c:271:1: warning: no previous prototype for function '__x64_sys_landlock_add_rule' [-Wmissing-prototypes]
COND_SYSCALL(landlock_add_rule);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:47:1: note: expanded from here
__x64_sys_landlock_add_rule
^
kernel/sys_ni.c:271:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
>> kernel/sys_ni.c:271:1: warning: no previous prototype for function '__ia32_sys_landlock_add_rule' [-Wmissing-prototypes]
COND_SYSCALL(landlock_add_rule);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:51:1: note: expanded from here
__ia32_sys_landlock_add_rule
^
kernel/sys_ni.c:271:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
>> kernel/sys_ni.c:272:1: warning: no previous prototype for function '__x64_sys_landlock_restrict_self' [-Wmissing-prototypes]
COND_SYSCALL(landlock_restrict_self);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:55:1: note: expanded from here
__x64_sys_landlock_restrict_self
^
kernel/sys_ni.c:272:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
>> kernel/sys_ni.c:272:1: warning: no previous prototype for function '__ia32_sys_landlock_restrict_self' [-Wmissing-prototypes]
COND_SYSCALL(landlock_restrict_self);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:59:1: note: expanded from here
__ia32_sys_landlock_restrict_self
^
kernel/sys_ni.c:272:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:277:1: warning: no previous prototype for function '__x64_sys_fadvise64_64' [-Wmissing-prototypes]
COND_SYSCALL(fadvise64_64);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:63:1: note: expanded from here
__x64_sys_fadvise64_64
^
kernel/sys_ni.c:277:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:277:1: warning: no previous prototype for function '__ia32_sys_fadvise64_64' [-Wmissing-prototypes]
COND_SYSCALL(fadvise64_64);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:67:1: note: expanded from here
__ia32_sys_fadvise64_64
^
kernel/sys_ni.c:277:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:280:1: warning: no previous prototype for function '__x64_sys_swapon' [-Wmissing-prototypes]
COND_SYSCALL(swapon);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:71:1: note: expanded from here
__x64_sys_swapon
^
kernel/sys_ni.c:280:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:280:1: warning: no previous prototype for function '__ia32_sys_swapon' [-Wmissing-prototypes]
vim +/__x64_sys_landlock_create_ruleset +270 kernel/sys_ni.c
268
269 /* security/landlock/syscalls.c */
> 270 COND_SYSCALL(landlock_create_ruleset);
> 271 COND_SYSCALL(landlock_add_rule);
> 272 COND_SYSCALL(landlock_restrict_self);
273
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
arch/powerpc/lib/sstep.c:1172:21: error: variable 'suffix' set but not used
by kernel test robot
Hi Jordan,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8b12a62a4e3ed4ae99c715034f557eb391d6b196
commit: 650b55b707fdfa764e9f2b81314d3eb4216fb962 powerpc: Add prefixed instructions to instruction data type
date: 10 months ago
config: powerpc-mpc866_ads_defconfig (attached as .config)
compiler: powerpc-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 650b55b707fdfa764e9f2b81314d3eb4216fb962
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/lib/sstep.c: In function 'analyse_instr':
>> arch/powerpc/lib/sstep.c:1172:21: error: variable 'suffix' set but not used [-Werror=unused-but-set-variable]
1172 | unsigned int word, suffix;
| ^~~~~~
arch/powerpc/lib/sstep.c:1168:31: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
1168 | unsigned int opcode, ra, rb, rc, rd, spr, u;
| ^~
cc1: all warnings being treated as errors
vim +/suffix +1172 arch/powerpc/lib/sstep.c
1153
1154 /*
1155 * Decode an instruction, and return information about it in *op
1156 * without changing *regs.
1157 * Integer arithmetic and logical instructions, branches, and barrier
1158 * instructions can be emulated just using the information in *op.
1159 *
1160 * Return value is 1 if the instruction can be emulated just by
1161 * updating *regs with the information in *op, -1 if we need the
1162 * GPRs but *regs doesn't contain the full register set, or 0
1163 * otherwise.
1164 */
1165 int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
1166 struct ppc_inst instr)
1167 {
1168 unsigned int opcode, ra, rb, rc, rd, spr, u;
1169 unsigned long int imm;
1170 unsigned long int val, val2;
1171 unsigned int mb, me, sh;
> 1172 unsigned int word, suffix;
1173 long ival;
1174
1175 word = ppc_inst_val(instr);
1176 suffix = ppc_inst_suffix(instr);
1177
1178 op->type = COMPUTE;
1179
1180 opcode = ppc_inst_primary_opcode(instr);
1181 switch (opcode) {
1182 case 16: /* bc */
1183 op->type = BRANCH;
1184 imm = (signed short)(word & 0xfffc);
1185 if ((word & 2) == 0)
1186 imm += regs->nip;
1187 op->val = truncate_if_32bit(regs->msr, imm);
1188 if (word & 1)
1189 op->type |= SETLK;
1190 if (branch_taken(word, regs, op))
1191 op->type |= BRTAKEN;
1192 return 1;
1193 #ifdef CONFIG_PPC64
1194 case 17: /* sc */
1195 if ((word & 0xfe2) == 2)
1196 op->type = SYSCALL;
1197 else
1198 op->type = UNKNOWN;
1199 return 0;
1200 #endif
1201 case 18: /* b */
1202 op->type = BRANCH | BRTAKEN;
1203 imm = word & 0x03fffffc;
1204 if (imm & 0x02000000)
1205 imm -= 0x04000000;
1206 if ((word & 2) == 0)
1207 imm += regs->nip;
1208 op->val = truncate_if_32bit(regs->msr, imm);
1209 if (word & 1)
1210 op->type |= SETLK;
1211 return 1;
1212 case 19:
1213 switch ((word >> 1) & 0x3ff) {
1214 case 0: /* mcrf */
1215 op->type = COMPUTE + SETCC;
1216 rd = 7 - ((word >> 23) & 0x7);
1217 ra = 7 - ((word >> 18) & 0x7);
1218 rd *= 4;
1219 ra *= 4;
1220 val = (regs->ccr >> ra) & 0xf;
1221 op->ccval = (regs->ccr & ~(0xfUL << rd)) | (val << rd);
1222 return 1;
1223
1224 case 16: /* bclr */
1225 case 528: /* bcctr */
1226 op->type = BRANCH;
1227 imm = (word & 0x400)? regs->ctr: regs->link;
1228 op->val = truncate_if_32bit(regs->msr, imm);
1229 if (word & 1)
1230 op->type |= SETLK;
1231 if (branch_taken(word, regs, op))
1232 op->type |= BRTAKEN;
1233 return 1;
1234
1235 case 18: /* rfid, scary */
1236 if (regs->msr & MSR_PR)
1237 goto priv;
1238 op->type = RFI;
1239 return 0;
1240
1241 case 150: /* isync */
1242 op->type = BARRIER | BARRIER_ISYNC;
1243 return 1;
1244
1245 case 33: /* crnor */
1246 case 129: /* crandc */
1247 case 193: /* crxor */
1248 case 225: /* crnand */
1249 case 257: /* crand */
1250 case 289: /* creqv */
1251 case 417: /* crorc */
1252 case 449: /* cror */
1253 op->type = COMPUTE + SETCC;
1254 ra = (word >> 16) & 0x1f;
1255 rb = (word >> 11) & 0x1f;
1256 rd = (word >> 21) & 0x1f;
1257 ra = (regs->ccr >> (31 - ra)) & 1;
1258 rb = (regs->ccr >> (31 - rb)) & 1;
1259 val = (word >> (6 + ra * 2 + rb)) & 1;
1260 op->ccval = (regs->ccr & ~(1UL << (31 - rd))) |
1261 (val << (31 - rd));
1262 return 1;
1263 }
1264 break;
1265 case 31:
1266 switch ((word >> 1) & 0x3ff) {
1267 case 598: /* sync */
1268 op->type = BARRIER + BARRIER_SYNC;
1269 #ifdef __powerpc64__
1270 switch ((word >> 21) & 3) {
1271 case 1: /* lwsync */
1272 op->type = BARRIER + BARRIER_LWSYNC;
1273 break;
1274 case 2: /* ptesync */
1275 op->type = BARRIER + BARRIER_PTESYNC;
1276 break;
1277 }
1278 #endif
1279 return 1;
1280
1281 case 854: /* eieio */
1282 op->type = BARRIER + BARRIER_EIEIO;
1283 return 1;
1284 }
1285 break;
1286 }
1287
1288 /* Following cases refer to regs->gpr[], so we need all regs */
1289 if (!FULL_REGS(regs))
1290 return -1;
1291
1292 rd = (word >> 21) & 0x1f;
1293 ra = (word >> 16) & 0x1f;
1294 rb = (word >> 11) & 0x1f;
1295 rc = (word >> 6) & 0x1f;
1296
1297 switch (opcode) {
1298 #ifdef __powerpc64__
1299 case 2: /* tdi */
1300 if (rd & trap_compare(regs->gpr[ra], (short) word))
1301 goto trap;
1302 return 1;
1303 #endif
1304 case 3: /* twi */
1305 if (rd & trap_compare((int)regs->gpr[ra], (short) word))
1306 goto trap;
1307 return 1;
1308
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8b12a62a4e3ed4ae99c715034f557eb391d6b196
commit: 000591f1ca3312d9a29e15a9e3fe5c4171f75586 csky: Enable LOCKDEP_SUPPORT
date: 12 months ago
config: csky-randconfig-r012-20210318 (attached as .config)
compiler: csky-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 000591f1ca3312d9a29e15a9e3fe5c4171f75586
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky
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 >>):
>> csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean '-fbacktrace'?
--
>> csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean '-fbacktrace'?
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x20): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:116: scripts/dtc/dtc] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1260: scripts_dtc] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:180: sub-make] Error 2
make: Target 'prepare' not remade because of errors.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- LOCKDEP && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[jarkko-linux-tpmdd:master 13/13] drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared; did you mean
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
head: c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
commit: c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea [13/13] char: tpm: move to use request_irq by IRQF_NO_AUTOEN flag
config: ia64-randconfig-r011-20210318 (attached as .config)
compiler: ia64-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/jarkko/linux-tpmdd.git/co...
git remote add jarkko-linux-tpmdd git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
git fetch --no-tags jarkko-linux-tpmdd master
git checkout c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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/char/tpm/tpm_tis_i2c_cr50.c: In function 'tpm_cr50_i2c_probe':
>> drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared (first use in this function); did you mean 'IRQ_NOAUTOEN'?
709 | IRQF_NO_AUTOEN,
| ^~~~~~~~~~~~~~
| IRQ_NOAUTOEN
drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: note: each undeclared identifier is reported only once for each function it appears in
vim +709 drivers/char/tpm/tpm_tis_i2c_cr50.c
662
663 /**
664 * tpm_cr50_i2c_probe() - Driver probe function.
665 * @client: I2C client information.
666 * @id: I2C device id.
667 *
668 * Return:
669 * - 0: Success.
670 * - -errno: A POSIX error code.
671 */
672 static int tpm_cr50_i2c_probe(struct i2c_client *client,
673 const struct i2c_device_id *id)
674 {
675 struct tpm_i2c_cr50_priv_data *priv;
676 struct device *dev = &client->dev;
677 struct tpm_chip *chip;
678 u32 vendor;
679 u8 buf[4];
680 int rc;
681
682 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
683 return -ENODEV;
684
685 chip = tpmm_chip_alloc(dev, &cr50_i2c);
686 if (IS_ERR(chip))
687 return PTR_ERR(chip);
688
689 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
690 if (!priv)
691 return -ENOMEM;
692
693 /* cr50 is a TPM 2.0 chip */
694 chip->flags |= TPM_CHIP_FLAG_TPM2;
695 chip->flags |= TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED;
696
697 /* Default timeouts */
698 chip->timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
699 chip->timeout_b = msecs_to_jiffies(TIS_LONG_TIMEOUT);
700 chip->timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
701 chip->timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
702
703 dev_set_drvdata(&chip->dev, priv);
704 init_completion(&priv->tpm_ready);
705
706 if (client->irq > 0) {
707 rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
708 IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
> 709 IRQF_NO_AUTOEN,
710 dev->driver->name, chip);
711 if (rc < 0) {
712 dev_err(dev, "Failed to probe IRQ %d\n", client->irq);
713 return rc;
714 }
715
716 priv->irq = client->irq;
717 } else {
718 dev_warn(dev, "No IRQ, will use %ums delay for TPM ready\n",
719 TPM_CR50_TIMEOUT_NOIRQ_MS);
720 }
721
722 rc = tpm_cr50_request_locality(chip);
723 if (rc < 0) {
724 dev_err(dev, "Could not request locality\n");
725 return rc;
726 }
727
728 /* Read four bytes from DID_VID register */
729 rc = tpm_cr50_i2c_read(chip, TPM_I2C_DID_VID(0), buf, sizeof(buf));
730 if (rc < 0) {
731 dev_err(dev, "Could not read vendor id\n");
732 tpm_cr50_release_locality(chip, true);
733 return rc;
734 }
735
736 vendor = le32_to_cpup((__le32 *)buf);
737 if (vendor != TPM_CR50_I2C_DID_VID) {
738 dev_err(dev, "Vendor ID did not match! ID was %08x\n", vendor);
739 tpm_cr50_release_locality(chip, true);
740 return -ENODEV;
741 }
742
743 dev_info(dev, "cr50 TPM 2.0 (i2c 0x%02x irq %d id 0x%x)\n",
744 client->addr, client->irq, vendor >> 16);
745
746 return tpm_chip_register(chip);
747 }
748
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v5 5/5] drm/bridge: anx7625: add HDMI audio function
by kernel test robot
Hi Xin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linux/master linus/master v5.12-rc3 next-20210318]
[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/Xin-Ji/Add-MIPI-rx-DPI-support/2...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-randconfig-r014-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
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
# https://github.com/0day-ci/linux/commit/ea2fa662ee036a3e1e2e25233653d7227...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Ji/Add-MIPI-rx-DPI-support/20210319-104013
git checkout ea2fa662ee036a3e1e2e25233653d7227b510b48
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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/gpu/drm/bridge/analogix/anx7625.c:1496:6: warning: variable 'mipi_lanes' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (ep0) {
^~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1506:22: note: uninitialized use occurs here
pdata->mipi_lanes = mipi_lanes;
^~~~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1496:2: note: remove the 'if' if its condition is always true
if (ep0) {
^~~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1484:26: note: initialize the variable 'mipi_lanes' to silence this warning
int bus_type, mipi_lanes;
^
= 0
drivers/gpu/drm/bridge/analogix/anx7625.c:1496:6: warning: variable 'bus_type' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (ep0) {
^~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1503:6: note: uninitialized use occurs here
if (bus_type == 5) /* bus type is Parallel(DSI) */
^~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1496:2: note: remove the 'if' if its condition is always true
if (ep0) {
^~~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1484:14: note: initialize the variable 'bus_type' to silence this warning
int bus_type, mipi_lanes;
^
= 0
>> drivers/gpu/drm/bridge/analogix/anx7625.c:1588:5: warning: no previous prototype for function 'anx7625_audio_hw_params' [-Wmissing-prototypes]
int anx7625_audio_hw_params(struct device *dev, void *data,
^
drivers/gpu/drm/bridge/analogix/anx7625.c:1588:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int anx7625_audio_hw_params(struct device *dev, void *data,
^
static
3 warnings generated.
vim +/anx7625_audio_hw_params +1588 drivers/gpu/drm/bridge/analogix/anx7625.c
1477
1478 static int anx7625_parse_dt(struct device *dev,
1479 struct anx7625_platform_data *pdata)
1480 {
1481 struct device_node *np = dev->of_node, *ep0;
1482 struct drm_panel *panel;
1483 int ret;
1484 int bus_type, mipi_lanes;
1485
1486 anx7625_get_swing_setting(dev, pdata);
1487
1488 pdata->is_dpi = 1; /* default dpi mode */
1489 pdata->mipi_host_node = of_graph_get_remote_node(np, 0, 0);
1490 if (!pdata->mipi_host_node) {
1491 DRM_DEV_ERROR(dev, "fail to get internal panel.\n");
1492 return -ENODEV;
1493 }
1494
1495 ep0 = of_graph_get_endpoint_by_regs(np, 0, 0);
> 1496 if (ep0) {
1497 if (of_property_read_u32(ep0, "bus-type", &bus_type))
1498 bus_type = 0;
1499
1500 mipi_lanes = of_property_count_u32_elems(ep0, "data-lanes");
1501 }
1502
1503 if (bus_type == 5) /* bus type is Parallel(DSI) */
1504 pdata->is_dpi = 0;
1505
1506 pdata->mipi_lanes = mipi_lanes;
1507 if (pdata->mipi_lanes > MAX_LANES_SUPPORT || pdata->mipi_lanes <= 0)
1508 pdata->mipi_lanes = MAX_LANES_SUPPORT;
1509
1510 if (pdata->is_dpi)
1511 DRM_DEV_DEBUG_DRIVER(dev, "found MIPI DPI host node.\n");
1512 else
1513 DRM_DEV_DEBUG_DRIVER(dev, "found MIPI DSI host node.\n");
1514
1515 if (of_property_read_bool(np, "analogix,audio-enable"))
1516 pdata->audio_en = 1;
1517
1518 ret = drm_of_find_panel_or_bridge(np, 1, 0, &panel, NULL);
1519 if (ret < 0) {
1520 if (ret == -ENODEV)
1521 return 0;
1522 return ret;
1523 }
1524 if (!panel)
1525 return -ENODEV;
1526
1527 pdata->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
1528 if (IS_ERR(pdata->panel_bridge))
1529 return PTR_ERR(pdata->panel_bridge);
1530 DRM_DEV_DEBUG_DRIVER(dev, "get panel node.\n");
1531
1532 return 0;
1533 }
1534
1535 static inline struct anx7625_data *bridge_to_anx7625(struct drm_bridge *bridge)
1536 {
1537 return container_of(bridge, struct anx7625_data, bridge);
1538 }
1539
1540 static struct edid *anx7625_get_edid(struct anx7625_data *ctx)
1541 {
1542 struct device *dev = &ctx->client->dev;
1543 struct s_edid_data *p_edid = &ctx->slimport_edid_p;
1544 int edid_num;
1545 u8 *edid;
1546
1547 edid = kmalloc(FOUR_BLOCK_SIZE, GFP_KERNEL);
1548 if (!edid) {
1549 DRM_DEV_ERROR(dev, "Fail to allocate buffer\n");
1550 return NULL;
1551 }
1552
1553 if (ctx->slimport_edid_p.edid_block_num > 0) {
1554 memcpy(edid, ctx->slimport_edid_p.edid_raw_data,
1555 FOUR_BLOCK_SIZE);
1556 return (struct edid *)edid;
1557 }
1558
1559 anx7625_low_power_mode_check(ctx, 1);
1560 edid_num = sp_tx_edid_read(ctx, p_edid->edid_raw_data);
1561 anx7625_low_power_mode_check(ctx, 0);
1562
1563 if (edid_num < 1) {
1564 DRM_DEV_ERROR(dev, "Fail to read EDID: %d\n", edid_num);
1565 kfree(edid);
1566 return NULL;
1567 }
1568
1569 p_edid->edid_block_num = edid_num;
1570
1571 memcpy(edid, ctx->slimport_edid_p.edid_raw_data, FOUR_BLOCK_SIZE);
1572 return (struct edid *)edid;
1573 }
1574
1575 static enum drm_connector_status anx7625_sink_detect(struct anx7625_data *ctx)
1576 {
1577 struct device *dev = &ctx->client->dev;
1578
1579 DRM_DEV_DEBUG_DRIVER(dev, "sink detect\n");
1580
1581 if (ctx->pdata.panel_bridge)
1582 return connector_status_connected;
1583
1584 return ctx->hpd_status ? connector_status_connected :
1585 connector_status_disconnected;
1586 }
1587
> 1588 int anx7625_audio_hw_params(struct device *dev, void *data,
1589 struct hdmi_codec_daifmt *fmt,
1590 struct hdmi_codec_params *params)
1591 {
1592 struct anx7625_data *ctx = dev_get_drvdata(dev);
1593 int wl, ch, rate;
1594 int ret = 0;
1595
1596 if (fmt->fmt != HDMI_DSP_A) {
1597 DRM_DEV_ERROR(dev, "only supports DSP_A\n");
1598 return -EINVAL;
1599 }
1600
1601 DRM_DEV_DEBUG_DRIVER(dev, "setting %d Hz, %d bit, %d channels\n",
1602 params->sample_rate, params->sample_width,
1603 params->cea.channels);
1604
1605 ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
1606 AUDIO_CHANNEL_STATUS_6,
1607 ~I2S_SLAVE_MODE,
1608 TDM_SLAVE_MODE);
1609
1610 /* Word length */
1611 switch (params->sample_width) {
1612 case 16:
1613 wl = AUDIO_W_LEN_16_20MAX;
1614 break;
1615 case 18:
1616 wl = AUDIO_W_LEN_18_20MAX;
1617 break;
1618 case 20:
1619 wl = AUDIO_W_LEN_20_20MAX;
1620 break;
1621 case 24:
1622 wl = AUDIO_W_LEN_24_24MAX;
1623 break;
1624 default:
1625 DRM_DEV_DEBUG_DRIVER(dev, "wordlength: %d bit not support",
1626 params->sample_width);
1627 return -EINVAL;
1628 }
1629 ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
1630 AUDIO_CHANNEL_STATUS_5,
1631 0xf0, wl);
1632
1633 /* Channel num */
1634 switch (params->cea.channels) {
1635 case 2:
1636 ch = I2S_CH_2;
1637 break;
1638 case 4:
1639 ch = TDM_CH_4;
1640 break;
1641 case 6:
1642 ch = TDM_CH_6;
1643 break;
1644 case 8:
1645 ch = TDM_CH_8;
1646 break;
1647 default:
1648 DRM_DEV_DEBUG_DRIVER(dev, "channel number: %d not support",
1649 params->cea.channels);
1650 return -EINVAL;
1651 }
1652 ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
1653 AUDIO_CHANNEL_STATUS_6, 0x1f, ch << 5);
1654 if (ch > I2S_CH_2)
1655 ret |= anx7625_write_or(ctx, ctx->i2c.tx_p2_client,
1656 AUDIO_CHANNEL_STATUS_6, AUDIO_LAYOUT);
1657 else
1658 ret |= anx7625_write_and(ctx, ctx->i2c.tx_p2_client,
1659 AUDIO_CHANNEL_STATUS_6, ~AUDIO_LAYOUT);
1660
1661 /* FS */
1662 switch (params->sample_rate) {
1663 case 32000:
1664 rate = AUDIO_FS_32K;
1665 break;
1666 case 44100:
1667 rate = AUDIO_FS_441K;
1668 break;
1669 case 48000:
1670 rate = AUDIO_FS_48K;
1671 break;
1672 case 88200:
1673 rate = AUDIO_FS_882K;
1674 break;
1675 case 96000:
1676 rate = AUDIO_FS_96K;
1677 break;
1678 case 176400:
1679 rate = AUDIO_FS_1764K;
1680 break;
1681 case 192000:
1682 rate = AUDIO_FS_192K;
1683 break;
1684 default:
1685 DRM_DEV_DEBUG_DRIVER(dev, "sample rate: %d not support",
1686 params->sample_rate);
1687 return -EINVAL;
1688 }
1689 ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
1690 AUDIO_CHANNEL_STATUS_4,
1691 0xf0, rate);
1692 ret |= anx7625_write_or(ctx, ctx->i2c.rx_p0_client,
1693 AP_AV_STATUS, AP_AUDIO_CHG);
1694 if (ret < 0) {
1695 DRM_DEV_ERROR(dev, "IO error : config audio.\n");
1696 return -EIO;
1697 }
1698
1699 return 0;
1700 }
1701
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months