[linux-next:master 3210/13205] include/linux/unaligned/be_byteshift.h:41:19: error: redefinition of 'get_unaligned_be16'
by kernel test robot
Hi Gene,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3cc2bd440f2171f093b3a8480a4b54d8c270ed38
commit: 1f4877218f7e2c2b914aeb69a8a0f47d59c74717 [3210/13205] iio: adc: mt6360: Add ADC driver for MT6360
config: arc-randconfig-r034-20201214 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 1f4877218f7e2c2b914aeb69a8a0f47d59c74717
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/iio/adc/mt6360-adc.c:12:
>> include/linux/unaligned/be_byteshift.h:41:19: error: redefinition of 'get_unaligned_be16'
41 | static inline u16 get_unaligned_be16(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/unaligned.h:26,
from arch/arc/include/asm/unaligned.h:11,
from arch/arc/include/asm/io.h:12,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from drivers/iio/adc/mt6360-adc.c:5:
include/linux/unaligned/be_struct.h:7:19: note: previous definition of 'get_unaligned_be16' was here
7 | static inline u16 get_unaligned_be16(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/adc/mt6360-adc.c:12:
>> include/linux/unaligned/be_byteshift.h:46:19: error: redefinition of 'get_unaligned_be32'
46 | static inline u32 get_unaligned_be32(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/unaligned.h:26,
from arch/arc/include/asm/unaligned.h:11,
from arch/arc/include/asm/io.h:12,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from drivers/iio/adc/mt6360-adc.c:5:
include/linux/unaligned/be_struct.h:12:19: note: previous definition of 'get_unaligned_be32' was here
12 | static inline u32 get_unaligned_be32(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/adc/mt6360-adc.c:12:
>> include/linux/unaligned/be_byteshift.h:51:19: error: redefinition of 'get_unaligned_be64'
51 | static inline u64 get_unaligned_be64(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/unaligned.h:26,
from arch/arc/include/asm/unaligned.h:11,
from arch/arc/include/asm/io.h:12,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from drivers/iio/adc/mt6360-adc.c:5:
include/linux/unaligned/be_struct.h:17:19: note: previous definition of 'get_unaligned_be64' was here
17 | static inline u64 get_unaligned_be64(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/adc/mt6360-adc.c:12:
>> include/linux/unaligned/be_byteshift.h:56:20: error: redefinition of 'put_unaligned_be16'
56 | static inline void put_unaligned_be16(u16 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/unaligned.h:26,
from arch/arc/include/asm/unaligned.h:11,
from arch/arc/include/asm/io.h:12,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from drivers/iio/adc/mt6360-adc.c:5:
include/linux/unaligned/be_struct.h:22:20: note: previous definition of 'put_unaligned_be16' was here
22 | static inline void put_unaligned_be16(u16 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/adc/mt6360-adc.c:12:
>> include/linux/unaligned/be_byteshift.h:61:20: error: redefinition of 'put_unaligned_be32'
61 | static inline void put_unaligned_be32(u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/unaligned.h:26,
from arch/arc/include/asm/unaligned.h:11,
from arch/arc/include/asm/io.h:12,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from drivers/iio/adc/mt6360-adc.c:5:
include/linux/unaligned/be_struct.h:27:20: note: previous definition of 'put_unaligned_be32' was here
27 | static inline void put_unaligned_be32(u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/adc/mt6360-adc.c:12:
>> include/linux/unaligned/be_byteshift.h:66:20: error: redefinition of 'put_unaligned_be64'
66 | static inline void put_unaligned_be64(u64 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/unaligned.h:26,
from arch/arc/include/asm/unaligned.h:11,
from arch/arc/include/asm/io.h:12,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from drivers/iio/adc/mt6360-adc.c:5:
include/linux/unaligned/be_struct.h:32:20: note: previous definition of 'put_unaligned_be64' was here
32 | static inline void put_unaligned_be64(u64 val, void *p)
| ^~~~~~~~~~~~~~~~~~
vim +/get_unaligned_be16 +41 include/linux/unaligned/be_byteshift.h
064106a91be5e76 Harvey Harrison 2008-04-29 40
064106a91be5e76 Harvey Harrison 2008-04-29 @41 static inline u16 get_unaligned_be16(const void *p)
064106a91be5e76 Harvey Harrison 2008-04-29 42 {
19f747f7370fcf4 Bart Van Assche 2020-03-13 43 return __get_unaligned_be16(p);
064106a91be5e76 Harvey Harrison 2008-04-29 44 }
064106a91be5e76 Harvey Harrison 2008-04-29 45
064106a91be5e76 Harvey Harrison 2008-04-29 @46 static inline u32 get_unaligned_be32(const void *p)
064106a91be5e76 Harvey Harrison 2008-04-29 47 {
19f747f7370fcf4 Bart Van Assche 2020-03-13 48 return __get_unaligned_be32(p);
064106a91be5e76 Harvey Harrison 2008-04-29 49 }
064106a91be5e76 Harvey Harrison 2008-04-29 50
064106a91be5e76 Harvey Harrison 2008-04-29 @51 static inline u64 get_unaligned_be64(const void *p)
064106a91be5e76 Harvey Harrison 2008-04-29 52 {
19f747f7370fcf4 Bart Van Assche 2020-03-13 53 return __get_unaligned_be64(p);
064106a91be5e76 Harvey Harrison 2008-04-29 54 }
064106a91be5e76 Harvey Harrison 2008-04-29 55
064106a91be5e76 Harvey Harrison 2008-04-29 @56 static inline void put_unaligned_be16(u16 val, void *p)
064106a91be5e76 Harvey Harrison 2008-04-29 57 {
064106a91be5e76 Harvey Harrison 2008-04-29 58 __put_unaligned_be16(val, p);
064106a91be5e76 Harvey Harrison 2008-04-29 59 }
064106a91be5e76 Harvey Harrison 2008-04-29 60
064106a91be5e76 Harvey Harrison 2008-04-29 @61 static inline void put_unaligned_be32(u32 val, void *p)
064106a91be5e76 Harvey Harrison 2008-04-29 62 {
064106a91be5e76 Harvey Harrison 2008-04-29 63 __put_unaligned_be32(val, p);
064106a91be5e76 Harvey Harrison 2008-04-29 64 }
064106a91be5e76 Harvey Harrison 2008-04-29 65
064106a91be5e76 Harvey Harrison 2008-04-29 @66 static inline void put_unaligned_be64(u64 val, void *p)
064106a91be5e76 Harvey Harrison 2008-04-29 67 {
064106a91be5e76 Harvey Harrison 2008-04-29 68 __put_unaligned_be64(val, p);
064106a91be5e76 Harvey Harrison 2008-04-29 69 }
064106a91be5e76 Harvey Harrison 2008-04-29 70
:::::: The code at line 41 was first introduced by commit
:::::: 064106a91be5e76cb42c1ddf5d3871e3a1bd2a23 kernel: add common infrastructure for unaligned access
:::::: TO: Harvey Harrison <harvey.harrison(a)gmail.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH v15 1/4] RDMA/umem: Support importing dma-buf as user memory region
by kernel test robot
Hi Jianxin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rdma/for-next]
[also build test ERROR on next-20201211]
[cannot apply to tegra-drm/drm/tegra/for-next v5.10]
[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/Jianxin-Xiong/RDMA-Add-dma-buf-s...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: i386-randconfig-r025-20200629 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/de7b8a9035076ce9b065dd12d421bab31...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jianxin-Xiong/RDMA-Add-dma-buf-support/20201211-032359
git checkout de7b8a9035076ce9b065dd12d421bab311c1cc43
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
ld: drivers/infiniband/core/umem_dmabuf.o: in function `dma_fence_wait':
>> include/linux/dma-fence.h:581: undefined reference to `dma_fence_wait_timeout'
ld: drivers/infiniband/core/umem_dmabuf.o: in function `ib_umem_dmabuf_map_pages':
>> drivers/infiniband/core/umem_dmabuf.c:26: undefined reference to `dma_buf_map_attachment'
ld: drivers/infiniband/core/umem_dmabuf.o: in function `ib_umem_dmabuf_unmap_pages':
>> drivers/infiniband/core/umem_dmabuf.c:100: undefined reference to `dma_buf_unmap_attachment'
ld: drivers/infiniband/core/umem_dmabuf.o: in function `ib_umem_dmabuf_get':
>> drivers/infiniband/core/umem_dmabuf.c:124: undefined reference to `dma_buf_get'
>> ld: drivers/infiniband/core/umem_dmabuf.c:162: undefined reference to `dma_buf_put'
>> ld: drivers/infiniband/core/umem_dmabuf.c:147: undefined reference to `dma_buf_dynamic_attach'
ld: drivers/infiniband/core/umem_dmabuf.o: in function `ib_umem_dmabuf_release':
>> drivers/infiniband/core/umem_dmabuf.c:171: undefined reference to `dma_buf_detach'
ld: drivers/infiniband/core/umem_dmabuf.c:172: undefined reference to `dma_buf_put'
vim +26 drivers/infiniband/core/umem_dmabuf.c
11
12 int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
13 {
14 struct sg_table *sgt;
15 struct scatterlist *sg;
16 struct dma_fence *fence;
17 unsigned long start, end, cur = 0;
18 unsigned int nmap = 0;
19 int i;
20
21 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv);
22
23 if (umem_dmabuf->sgt)
24 goto wait_fence;
25
> 26 sgt = dma_buf_map_attachment(umem_dmabuf->attach, DMA_BIDIRECTIONAL);
27 if (IS_ERR(sgt))
28 return PTR_ERR(sgt);
29
30 /* modify the sg list in-place to match umem address and length */
31
32 start = ALIGN_DOWN(umem_dmabuf->umem.address, PAGE_SIZE);
33 end = ALIGN(umem_dmabuf->umem.address + umem_dmabuf->umem.length,
34 PAGE_SIZE);
35 for_each_sgtable_dma_sg(sgt, sg, i) {
36 if (start < cur + sg_dma_len(sg) && cur < end)
37 nmap++;
38 if (cur <= start && start < cur + sg_dma_len(sg)) {
39 unsigned long offset = start - cur;
40
41 umem_dmabuf->first_sg = sg;
42 umem_dmabuf->first_sg_offset = offset;
43 sg_dma_address(sg) += offset;
44 sg_dma_len(sg) -= offset;
45 cur += offset;
46 }
47 if (cur < end && end <= cur + sg_dma_len(sg)) {
48 unsigned long trim = cur + sg_dma_len(sg) - end;
49
50 umem_dmabuf->last_sg = sg;
51 umem_dmabuf->last_sg_trim = trim;
52 sg_dma_len(sg) -= trim;
53 break;
54 }
55 cur += sg_dma_len(sg);
56 }
57
58 umem_dmabuf->umem.sg_head.sgl = umem_dmabuf->first_sg;
59 umem_dmabuf->umem.sg_head.nents = nmap;
60 umem_dmabuf->umem.nmap = nmap;
61 umem_dmabuf->sgt = sgt;
62
63 wait_fence:
64 /*
65 * Although the sg list is valid now, the content of the pages
66 * may be not up-to-date. Wait for the exporter to finish
67 * the migration.
68 */
69 fence = dma_resv_get_excl(umem_dmabuf->attach->dmabuf->resv);
70 if (fence)
71 return dma_fence_wait(fence, false);
72
73 return 0;
74 }
75 EXPORT_SYMBOL(ib_umem_dmabuf_map_pages);
76
77 void ib_umem_dmabuf_unmap_pages(struct ib_umem_dmabuf *umem_dmabuf)
78 {
79 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv);
80
81 if (!umem_dmabuf->sgt)
82 return;
83
84 /* retore the original sg list */
85 if (umem_dmabuf->first_sg) {
86 sg_dma_address(umem_dmabuf->first_sg) -=
87 umem_dmabuf->first_sg_offset;
88 sg_dma_len(umem_dmabuf->first_sg) +=
89 umem_dmabuf->first_sg_offset;
90 umem_dmabuf->first_sg = NULL;
91 umem_dmabuf->first_sg_offset = 0;
92 }
93 if (umem_dmabuf->last_sg) {
94 sg_dma_len(umem_dmabuf->last_sg) +=
95 umem_dmabuf->last_sg_trim;
96 umem_dmabuf->last_sg = NULL;
97 umem_dmabuf->last_sg_trim = 0;
98 }
99
> 100 dma_buf_unmap_attachment(umem_dmabuf->attach, umem_dmabuf->sgt,
101 DMA_BIDIRECTIONAL);
102
103 umem_dmabuf->sgt = NULL;
104 }
105 EXPORT_SYMBOL(ib_umem_dmabuf_unmap_pages);
106
107 struct ib_umem_dmabuf *ib_umem_dmabuf_get(struct ib_device *device,
108 unsigned long offset, size_t size,
109 int fd, int access,
110 const struct dma_buf_attach_ops *ops)
111 {
112 struct dma_buf *dmabuf;
113 struct ib_umem_dmabuf *umem_dmabuf;
114 struct ib_umem *umem;
115 unsigned long end;
116 struct ib_umem_dmabuf *ret = ERR_PTR(-EINVAL);
117
118 if (check_add_overflow(offset, (unsigned long)size, &end))
119 return ret;
120
121 if (unlikely(!ops || !ops->move_notify))
122 return ret;
123
> 124 dmabuf = dma_buf_get(fd);
125 if (IS_ERR(dmabuf))
126 return ERR_CAST(dmabuf);
127
128 if (dmabuf->size < end)
129 goto out_release_dmabuf;
130
131 umem_dmabuf = kzalloc(sizeof(*umem_dmabuf), GFP_KERNEL);
132 if (!umem_dmabuf) {
133 ret = ERR_PTR(-ENOMEM);
134 goto out_release_dmabuf;
135 }
136
137 umem = &umem_dmabuf->umem;
138 umem->ibdev = device;
139 umem->length = size;
140 umem->address = offset;
141 umem->writable = ib_access_writable(access);
142 umem->is_dmabuf = 1;
143
144 if (!ib_umem_num_pages(umem))
145 goto out_free_umem;
146
> 147 umem_dmabuf->attach = dma_buf_dynamic_attach(
148 dmabuf,
149 device->dma_device,
150 ops,
151 umem_dmabuf);
152 if (IS_ERR(umem_dmabuf->attach)) {
153 ret = ERR_CAST(umem_dmabuf->attach);
154 goto out_free_umem;
155 }
156 return umem_dmabuf;
157
158 out_free_umem:
159 kfree(umem_dmabuf);
160
161 out_release_dmabuf:
> 162 dma_buf_put(dmabuf);
163 return ret;
164 }
165 EXPORT_SYMBOL(ib_umem_dmabuf_get);
166
167 void ib_umem_dmabuf_release(struct ib_umem_dmabuf *umem_dmabuf)
168 {
169 struct dma_buf *dmabuf = umem_dmabuf->attach->dmabuf;
170
> 171 dma_buf_detach(dmabuf, umem_dmabuf->attach);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH] rtlwifi: rise completion at the last step of firmware callback
by kernel test robot
Hi Ping-Ke,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master v5.10 next-20201211]
[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/Ping-Ke-Shih/rtlwifi-rise-comple...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-ne... master
config: alpha-allmodconfig (attached as .config)
compiler: alpha-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://github.com/0day-ci/linux/commit/d6328e8677e1f940022051a1cb58c2b36...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ping-Ke-Shih/rtlwifi-rise-completion-at-the-last-step-of-firmware-callback/20201214-095732
git checkout d6328e8677e1f940022051a1cb58c2b36731a571
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
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/net/wireless/realtek/rtlwifi/core.c: In function 'rtl_fw_do_work':
>> drivers/net/wireless/realtek/rtlwifi/core.c:112:1: error: 'exit' undeclared (first use in this function)
112 | exit;
| ^~~~
drivers/net/wireless/realtek/rtlwifi/core.c:112:1: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/wireless/realtek/rtlwifi/core.c:99:3: error: label 'exit' used but not defined
99 | goto exit;
| ^~~~
vim +/exit +112 drivers/net/wireless/realtek/rtlwifi/core.c
71
72 static void rtl_fw_do_work(const struct firmware *firmware, void *context,
73 bool is_wow)
74 {
75 struct ieee80211_hw *hw = context;
76 struct rtl_priv *rtlpriv = rtl_priv(hw);
77 int err;
78
79 rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
80 "Firmware callback routine entered!\n");
81 if (!firmware) {
82 if (rtlpriv->cfg->alt_fw_name) {
83 err = request_firmware(&firmware,
84 rtlpriv->cfg->alt_fw_name,
85 rtlpriv->io.dev);
86 pr_info("Loading alternative firmware %s\n",
87 rtlpriv->cfg->alt_fw_name);
88 if (!err)
89 goto found_alt;
90 }
91 pr_err("Selected firmware is not available\n");
92 rtlpriv->max_fw_size = 0;
93 goto exit;
94 }
95 found_alt:
96 if (firmware->size > rtlpriv->max_fw_size) {
97 pr_err("Firmware is too big!\n");
98 release_firmware(firmware);
> 99 goto exit;
100 }
101 if (!is_wow) {
102 memcpy(rtlpriv->rtlhal.pfirmware, firmware->data,
103 firmware->size);
104 rtlpriv->rtlhal.fwsize = firmware->size;
105 } else {
106 memcpy(rtlpriv->rtlhal.wowlan_firmware, firmware->data,
107 firmware->size);
108 rtlpriv->rtlhal.wowlan_fwsize = firmware->size;
109 }
110 release_firmware(firmware);
111
> 112 exit;
113 complete(&rtlpriv->firmware_loading_complete);
114 }
115
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH] rtlwifi: rise completion at the last step of firmware callback
by kernel test robot
Hi Ping-Ke,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master v5.10 next-20201211]
[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/Ping-Ke-Shih/rtlwifi-rise-comple...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-ne... master
config: m68k-randconfig-r035-20201214 (attached as .config)
compiler: m68k-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://github.com/0day-ci/linux/commit/d6328e8677e1f940022051a1cb58c2b36...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ping-Ke-Shih/rtlwifi-rise-completion-at-the-last-step-of-firmware-callback/20201214-095732
git checkout d6328e8677e1f940022051a1cb58c2b36731a571
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/net/wireless/realtek/rtlwifi/core.c: In function 'rtl_fw_do_work':
>> drivers/net/wireless/realtek/rtlwifi/core.c:112:1: error: 'exit' undeclared (first use in this function)
112 | exit;
| ^~~~
drivers/net/wireless/realtek/rtlwifi/core.c:112:1: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/wireless/realtek/rtlwifi/core.c:99:3: error: label 'exit' used but not defined
99 | goto exit;
| ^~~~
vim +/exit +112 drivers/net/wireless/realtek/rtlwifi/core.c
71
72 static void rtl_fw_do_work(const struct firmware *firmware, void *context,
73 bool is_wow)
74 {
75 struct ieee80211_hw *hw = context;
76 struct rtl_priv *rtlpriv = rtl_priv(hw);
77 int err;
78
79 rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
80 "Firmware callback routine entered!\n");
81 if (!firmware) {
82 if (rtlpriv->cfg->alt_fw_name) {
83 err = request_firmware(&firmware,
84 rtlpriv->cfg->alt_fw_name,
85 rtlpriv->io.dev);
86 pr_info("Loading alternative firmware %s\n",
87 rtlpriv->cfg->alt_fw_name);
88 if (!err)
89 goto found_alt;
90 }
91 pr_err("Selected firmware is not available\n");
92 rtlpriv->max_fw_size = 0;
93 goto exit;
94 }
95 found_alt:
96 if (firmware->size > rtlpriv->max_fw_size) {
97 pr_err("Firmware is too big!\n");
98 release_firmware(firmware);
> 99 goto exit;
100 }
101 if (!is_wow) {
102 memcpy(rtlpriv->rtlhal.pfirmware, firmware->data,
103 firmware->size);
104 rtlpriv->rtlhal.fwsize = firmware->size;
105 } else {
106 memcpy(rtlpriv->rtlhal.wowlan_firmware, firmware->data,
107 firmware->size);
108 rtlpriv->rtlhal.wowlan_fwsize = firmware->size;
109 }
110 release_firmware(firmware);
111
> 112 exit;
113 complete(&rtlpriv->firmware_loading_complete);
114 }
115
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[tobetter-linux:odroid-5.10.y 37/82] drivers/media/platform/s5p-mfc/s5p_mfc.c:861:47: error: 'DMA_ATTR_NON_CONSISTENT' undeclared
by kernel test robot
tree: https://github.com/tobetter/linux odroid-5.10.y
head: d9183225205e47fb975cbdf748c1cf433a1500e4
commit: 4b805ffeb3ec84c1b6582246e79501ca18d2c164 [37/82] ODROID-XU4: media: s5p-mfc: use cacheable DMA buffers to improve performance
config: h8300-randconfig-r001-20201214 (attached as .config)
compiler: h8300-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://github.com/tobetter/linux/commit/4b805ffeb3ec84c1b6582246e79501ca...
git remote add tobetter-linux https://github.com/tobetter/linux
git fetch --no-tags tobetter-linux odroid-5.10.y
git checkout 4b805ffeb3ec84c1b6582246e79501ca18d2c164
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/err.h:5,
from include/linux/clk.h:12,
from drivers/media/platform/s5p-mfc/s5p_mfc.c:9:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:93:50: warning: ordered comparison of pointer with null pointer [-Wextra]
93 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc.c: In function 's5p_mfc_open':
>> drivers/media/platform/s5p-mfc/s5p_mfc.c:861:47: error: 'DMA_ATTR_NON_CONSISTENT' undeclared (first use in this function)
861 | q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/s5p-mfc/s5p_mfc.c:861:47: note: each undeclared identifier is reported only once for each function it appears in
vim +/DMA_ATTR_NON_CONSISTENT +861 drivers/media/platform/s5p-mfc/s5p_mfc.c
749
750 /* Open an MFC node */
751 static int s5p_mfc_open(struct file *file)
752 {
753 struct video_device *vdev = video_devdata(file);
754 struct s5p_mfc_dev *dev = video_drvdata(file);
755 struct s5p_mfc_ctx *ctx = NULL;
756 struct vb2_queue *q;
757 int ret = 0;
758
759 mfc_debug_enter();
760 if (mutex_lock_interruptible(&dev->mfc_mutex))
761 return -ERESTARTSYS;
762 dev->num_inst++; /* It is guarded by mfc_mutex in vfd */
763 /* Allocate memory for context */
764 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
765 if (!ctx) {
766 ret = -ENOMEM;
767 goto err_alloc;
768 }
769 init_waitqueue_head(&ctx->queue);
770 v4l2_fh_init(&ctx->fh, vdev);
771 file->private_data = &ctx->fh;
772 v4l2_fh_add(&ctx->fh);
773 ctx->dev = dev;
774 INIT_LIST_HEAD(&ctx->src_queue);
775 INIT_LIST_HEAD(&ctx->dst_queue);
776 ctx->src_queue_cnt = 0;
777 ctx->dst_queue_cnt = 0;
778 /* Get context number */
779 ctx->num = 0;
780 while (dev->ctx[ctx->num]) {
781 ctx->num++;
782 if (ctx->num >= MFC_NUM_CONTEXTS) {
783 mfc_debug(2, "Too many open contexts\n");
784 ret = -EBUSY;
785 goto err_no_ctx;
786 }
787 }
788 /* Mark context as idle */
789 clear_work_bit_irqsave(ctx);
790 dev->ctx[ctx->num] = ctx;
791 if (vdev == dev->vfd_dec) {
792 ctx->type = MFCINST_DECODER;
793 ctx->c_ops = get_dec_codec_ops();
794 s5p_mfc_dec_init(ctx);
795 /* Setup ctrl handler */
796 ret = s5p_mfc_dec_ctrls_setup(ctx);
797 if (ret) {
798 mfc_err("Failed to setup mfc controls\n");
799 goto err_ctrls_setup;
800 }
801 } else if (vdev == dev->vfd_enc) {
802 ctx->type = MFCINST_ENCODER;
803 ctx->c_ops = get_enc_codec_ops();
804 /* only for encoder */
805 INIT_LIST_HEAD(&ctx->ref_queue);
806 ctx->ref_queue_cnt = 0;
807 s5p_mfc_enc_init(ctx);
808 /* Setup ctrl handler */
809 ret = s5p_mfc_enc_ctrls_setup(ctx);
810 if (ret) {
811 mfc_err("Failed to setup mfc controls\n");
812 goto err_ctrls_setup;
813 }
814 } else {
815 ret = -ENOENT;
816 goto err_bad_node;
817 }
818 ctx->fh.ctrl_handler = &ctx->ctrl_handler;
819 ctx->inst_no = MFC_NO_INSTANCE_SET;
820 /* Load firmware if this is the first instance */
821 if (dev->num_inst == 1) {
822 dev->watchdog_timer.expires = jiffies +
823 msecs_to_jiffies(MFC_WATCHDOG_INTERVAL);
824 add_timer(&dev->watchdog_timer);
825 ret = s5p_mfc_power_on();
826 if (ret < 0) {
827 mfc_err("power on failed\n");
828 goto err_pwr_enable;
829 }
830 s5p_mfc_clock_on();
831 ret = s5p_mfc_load_firmware(dev);
832 if (ret) {
833 s5p_mfc_clock_off();
834 goto err_load_fw;
835 }
836 /* Init the FW */
837 ret = s5p_mfc_init_hw(dev);
838 s5p_mfc_clock_off();
839 if (ret)
840 goto err_init_hw;
841 }
842 /* Init videobuf2 queue for CAPTURE */
843 q = &ctx->vq_dst;
844 q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
845 q->drv_priv = &ctx->fh;
846 q->lock = &dev->mfc_mutex;
847 if (vdev == dev->vfd_dec) {
848 q->io_modes = VB2_MMAP;
849 q->ops = get_dec_queue_ops();
850 } else if (vdev == dev->vfd_enc) {
851 q->io_modes = VB2_MMAP | VB2_USERPTR;
852 q->ops = get_enc_queue_ops();
853 } else {
854 ret = -ENOENT;
855 goto err_queue_init;
856 }
857 /*
858 * We'll do mostly sequential access, so sacrifice TLB efficiency for
859 * faster allocation.
860 */
> 861 q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
862 q->mem_ops = &vb2_dma_contig_memops;
863 q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
864 ret = vb2_queue_init(q);
865 if (ret) {
866 mfc_err("Failed to initialize videobuf2 queue(capture)\n");
867 goto err_queue_init;
868 }
869 /* Init videobuf2 queue for OUTPUT */
870 q = &ctx->vq_src;
871 q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
872 q->drv_priv = &ctx->fh;
873 q->lock = &dev->mfc_mutex;
874 if (vdev == dev->vfd_dec) {
875 q->io_modes = VB2_MMAP;
876 q->ops = get_dec_queue_ops();
877 } else if (vdev == dev->vfd_enc) {
878 q->io_modes = VB2_MMAP | VB2_USERPTR;
879 q->ops = get_enc_queue_ops();
880 } else {
881 ret = -ENOENT;
882 goto err_queue_init;
883 }
884 /* One way to indicate end-of-stream for MFC is to set the
885 * bytesused == 0. However by default videobuf2 handles bytesused
886 * equal to 0 as a special case and changes its value to the size
887 * of the buffer. Set the allow_zero_bytesused flag so that videobuf2
888 * will keep the value of bytesused intact.
889 */
890 q->allow_zero_bytesused = 1;
891
892 /*
893 * We'll do mostly sequential access, so sacrifice TLB efficiency for
894 * faster allocation.
895 */
896 q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
897 q->mem_ops = &vb2_dma_contig_memops;
898 q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
899 ret = vb2_queue_init(q);
900 if (ret) {
901 mfc_err("Failed to initialize videobuf2 queue(output)\n");
902 goto err_queue_init;
903 }
904 mutex_unlock(&dev->mfc_mutex);
905 mfc_debug_leave();
906 return ret;
907 /* Deinit when failure occurred */
908 err_queue_init:
909 if (dev->num_inst == 1)
910 s5p_mfc_deinit_hw(dev);
911 err_init_hw:
912 err_load_fw:
913 err_pwr_enable:
914 if (dev->num_inst == 1) {
915 if (s5p_mfc_power_off() < 0)
916 mfc_err("power off failed\n");
917 del_timer_sync(&dev->watchdog_timer);
918 }
919 err_ctrls_setup:
920 s5p_mfc_dec_ctrls_delete(ctx);
921 err_bad_node:
922 dev->ctx[ctx->num] = NULL;
923 err_no_ctx:
924 v4l2_fh_del(&ctx->fh);
925 v4l2_fh_exit(&ctx->fh);
926 kfree(ctx);
927 err_alloc:
928 dev->num_inst--;
929 mutex_unlock(&dev->mfc_mutex);
930 mfc_debug_leave();
931 return ret;
932 }
933
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[tobetter-linux:odroid-5.10.y 25/82] drivers/pwm/pwm-gpio.c:60:22: warning: no previous prototype for 'gpio_pwm_timer'
by kernel test robot
tree: https://github.com/tobetter/linux odroid-5.10.y
head: d9183225205e47fb975cbdf748c1cf433a1500e4
commit: ac4713b7bc820aad62dfdd3741543be0c663d783 [25/82] ODROID-COMMON: pwm: gpio: Add a generic gpio based PWM driver
config: h8300-randconfig-r001-20201214 (attached as .config)
compiler: h8300-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://github.com/tobetter/linux/commit/ac4713b7bc820aad62dfdd3741543be0...
git remote add tobetter-linux https://github.com/tobetter/linux
git fetch --no-tags tobetter-linux odroid-5.10.y
git checkout ac4713b7bc820aad62dfdd3741543be0c663d783
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
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/pwm/pwm-gpio.c:60:22: warning: no previous prototype for 'gpio_pwm_timer' [-Wmissing-prototypes]
60 | enum hrtimer_restart gpio_pwm_timer(struct hrtimer *timer)
| ^~~~~~~~~~~~~~
vim +/gpio_pwm_timer +60 drivers/pwm/pwm-gpio.c
59
> 60 enum hrtimer_restart gpio_pwm_timer(struct hrtimer *timer)
61 {
62 struct gpio_pwm_data *gpio_data = container_of(timer,
63 struct gpio_pwm_data,
64 timer);
65 if (!gpio_data->run) {
66 gpio_pwm_off(gpio_data);
67 gpio_data->pin_on = false;
68 return HRTIMER_NORESTART;
69 }
70
71 if (!gpio_data->pin_on) {
72 hrtimer_forward_now(&gpio_data->timer,
73 ns_to_ktime(gpio_data->on_time));
74 gpio_pwm_on(gpio_data);
75 gpio_data->pin_on = true;
76 } else {
77 hrtimer_forward_now(&gpio_data->timer,
78 ns_to_ktime(gpio_data->off_time));
79 gpio_pwm_off(gpio_data);
80 gpio_data->pin_on = false;
81 }
82
83 return HRTIMER_RESTART;
84 }
85
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[tobetter-linux:odroid-5.10.y 73/82] drivers/power/reset/odroid-reboot.c:63:6: warning: no previous prototype for function 'odroid_card_reset'
by kernel test robot
tree: https://github.com/tobetter/linux odroid-5.10.y
head: d9183225205e47fb975cbdf748c1cf433a1500e4
commit: 2b66d6eb92d19311212ba528d43c66fde81b5e51 [73/82] ODROID-COMMON: power:reset: Add odroid support
config: arm64-randconfig-r003-20201214 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d38205144febf4dc42c9270c6aa3d978f1ef65e1)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/tobetter/linux/commit/2b66d6eb92d19311212ba528d43c66fd...
git remote add tobetter-linux https://github.com/tobetter/linux
git fetch --no-tags tobetter-linux odroid-5.10.y
git checkout 2b66d6eb92d19311212ba528d43c66fde81b5e51
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/power/reset/odroid-reboot.c:63:6: warning: no previous prototype for function 'odroid_card_reset' [-Wmissing-prototypes]
void odroid_card_reset(void)
^
drivers/power/reset/odroid-reboot.c:63:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void odroid_card_reset(void)
^
static
1 warning generated.
vim +/odroid_card_reset +63 drivers/power/reset/odroid-reboot.c
62
> 63 void odroid_card_reset(void)
64 {
65 int ret = 0;
66
67 if ((sd_vqsw == 0) && (sd_vmmc == 0))
68 return;
69
70 if (sd_vqen == 0) {
71 gpio_free(sd_vqsw);
72 gpio_free(sd_vmmc);
73 ret = gpio_request_one(sd_vqsw,
74 GPIOF_OUT_INIT_LOW, "REBOOT");
75 CHECK_RET(ret);
76 mdelay(10);
77 ret = gpio_direction_output(sd_vqsw, 1);
78 CHECK_RET(ret);
79 ret = gpio_request_one(sd_vmmc,
80 GPIOF_OUT_INIT_LOW, "REBOOT");
81 CHECK_RET(ret);
82 mdelay(10);
83 ret = gpio_direction_output(sd_vqsw, 0);
84 CHECK_RET(ret);
85 ret = gpio_direction_output(sd_vmmc, 1);
86 CHECK_RET(ret);
87 mdelay(5);
88 gpio_free(sd_vqsw);
89 gpio_free(sd_vmmc);
90 } else {
91 gpio_free(sd_vqsw);
92 gpio_free(sd_vqen);
93 gpio_free(sd_vmmc);
94
95 ret = gpio_request_one(sd_vqsw,
96 GPIOF_OUT_INIT_LOW, "REBOOT");
97 CHECK_RET(ret);
98 ret = gpio_request_one(sd_vqen,
99 GPIOF_OUT_INIT_LOW, "REBOOT");
100 CHECK_RET(ret);
101 ret = gpio_request_one(sd_vmmc,
102 GPIOF_OUT_INIT_LOW, "REBOOT");
103 CHECK_RET(ret);
104 mdelay(100);
105 ret = gpio_direction_input(sd_vqen);
106 CHECK_RET(ret);
107 ret = gpio_direction_input(sd_vmmc);
108 CHECK_RET(ret);
109 ret = gpio_direction_input(sd_vqsw);
110 CHECK_RET(ret);
111 mdelay(5);
112 gpio_free(sd_vqen);
113 gpio_free(sd_vmmc);
114 gpio_free(sd_vqsw);
115 }
116 }
117
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[linux-stable-rc:linux-4.14.y 8908/9999] arch/arm/kvm/../../../virt/kvm/kvm_main.c:615:12: warning: no previous prototype for 'kvm_arch_post_init_vm'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head: e1f7d50ae3a3ec342e87a9b1ce6787bfb8b3c08b
commit: 2d371f8836c5d633f9f495c9165eaf814643539d [8908/9999] kvm: x86: mmu: Recovery of shattered NX large pages
config: arm-axm55xx_defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.14.y
git checkout 2d371f8836c5d633f9f495c9165eaf814643539d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 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 >>):
arch/arm/kvm/../../../virt/kvm/kvm_main.c:140:13: warning: no previous prototype for 'kvm_arch_mmu_notifier_invalidate_range' [-Wmissing-prototypes]
__weak void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm/kvm/../../../virt/kvm/kvm_main.c:615:12: warning: no previous prototype for 'kvm_arch_post_init_vm' [-Wmissing-prototypes]
int __weak kvm_arch_post_init_vm(struct kvm *kvm)
^~~~~~~~~~~~~~~~~~~~~
>> arch/arm/kvm/../../../virt/kvm/kvm_main.c:624:13: warning: no previous prototype for 'kvm_arch_pre_destroy_vm' [-Wmissing-prototypes]
void __weak kvm_arch_pre_destroy_vm(struct kvm *kvm)
^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:14:0,
from arch/arm/kvm/../../../virt/kvm/kvm_main.c:21:
include/linux/signal.h: In function 'sigemptyset':
include/linux/signal.h:178:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 2: set->sig[1] = 0;
~~~~~~~~~~~~^~~
include/linux/signal.h:179:2: note: here
case 1: set->sig[0] = 0;
^~~~
vim +/kvm_arch_post_init_vm +615 arch/arm/kvm/../../../virt/kvm/kvm_main.c
610
611 /*
612 * Called after the VM is otherwise initialized, but just before adding it to
613 * the vm_list.
614 */
> 615 int __weak kvm_arch_post_init_vm(struct kvm *kvm)
616 {
617 return 0;
618 }
619
620 /*
621 * Called just after removing the VM from the vm_list, but before doing any
622 * other destruction.
623 */
> 624 void __weak kvm_arch_pre_destroy_vm(struct kvm *kvm)
625 {
626 }
627
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months