[plbossart-sound:test/topology-ktest 5/7] sound/soc/soc-topology-test.c:60:5: warning: no previous prototype for 'd_probe'
by kernel test robot
tree: https://github.com/plbossart/sound test/topology-ktest
head: 435db31343ff7801bdf6d7da608c85d8f53353d3
commit: 2e3a9e7d28656d8eeabda33de7b2349f013ac9a1 [5/7] ASoC: topology: KUnit: Add KUnit tests passing various arguments to snd_soc_tplg_component_load
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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/plbossart/sound/commit/2e3a9e7d28656d8eeabda33de7b2349...
git remote add plbossart-sound https://github.com/plbossart/sound
git fetch --no-tags plbossart-sound test/topology-ktest
git checkout 2e3a9e7d28656d8eeabda33de7b2349f013ac9a1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 >>):
>> sound/soc/soc-topology-test.c:60:5: warning: no previous prototype for 'd_probe' [-Wmissing-prototypes]
60 | int d_probe(struct snd_soc_component *component)
| ^~~~~~~
>> sound/soc/soc-topology-test.c:73:6: warning: no previous prototype for 'd_remove' [-Wmissing-prototypes]
73 | void d_remove(struct snd_soc_component *component)
| ^~~~~~~~
>> sound/soc/soc-topology-test.c:121:5: warning: no previous prototype for 'd_probe_null_comp' [-Wmissing-prototypes]
121 | int d_probe_null_comp(struct snd_soc_component *component)
| ^~~~~~~~~~~~~~~~~
>> sound/soc/soc-topology-test.c:229:5: warning: no previous prototype for 'd_probe_null_fw' [-Wmissing-prototypes]
229 | int d_probe_null_fw(struct snd_soc_component *component)
| ^~~~~~~~~~~~~~~
vim +/d_probe +60 sound/soc/soc-topology-test.c
59
> 60 int d_probe(struct snd_soc_component *component)
61 {
62 struct kunit_soc_component *kunit_comp =
63 container_of(component, struct kunit_soc_component, comp);
64 int ret;
65
66 ret = snd_soc_tplg_component_load(component, NULL, &kunit_comp->fw);
67 KUNIT_EXPECT_EQ_MSG(kunit_comp->kunit, kunit_comp->expect, ret,
68 "Failed topology load");
69
70 return 0;
71 }
72
> 73 void d_remove(struct snd_soc_component *component)
74 {
75 struct kunit_soc_component *kunit_comp =
76 container_of(component, struct kunit_soc_component, comp);
77 int ret;
78
79 ret = snd_soc_tplg_component_remove(component);
80 KUNIT_EXPECT_EQ(kunit_comp->kunit, 0, ret);
81 }
82
83 /*
84 * ASoC minimal boiler plate
85 */
86 SND_SOC_DAILINK_DEF(dummy, DAILINK_COMP_ARRAY(COMP_DUMMY()));
87
88 SND_SOC_DAILINK_DEF(platform, DAILINK_COMP_ARRAY(COMP_PLATFORM("sound-soc-topology-test")));
89
90 static struct snd_soc_dai_link kunit_dai_links[] = {
91 {
92 .name = "KUNIT Audio Port",
93 .id = 0,
94 .stream_name = "Audio Playback/Capture",
95 .nonatomic = 1,
96 .dynamic = 1,
97 .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
98 .dpcm_playback = 1,
99 .dpcm_capture = 1,
100 SND_SOC_DAILINK_REG(dummy, dummy, platform),
101 },
102 };
103
104 static const struct snd_soc_component_driver test_component = {
105 .name = "sound-soc-topology-test",
106 .probe = d_probe,
107 .remove = d_remove,
108 .non_legacy_dai_naming = 1,
109 };
110
111 /* ===== TEST CASES ========================================================= */
112
113 // TEST CASE
114 // Test passing NULL component as parameter to snd_soc_tplg_component_load
115
116 /*
117 * need to override generic probe function with one using NULL when calling
118 * topology load during component initialization, we don't need .remove
119 * handler as load should fail
120 */
> 121 int d_probe_null_comp(struct snd_soc_component *component)
122 {
123 struct kunit_soc_component *kunit_comp =
124 container_of(component, struct kunit_soc_component, comp);
125 int ret;
126
127 /* instead of passing component pointer as first argument, pass NULL here */
128 ret = snd_soc_tplg_component_load(NULL, NULL, &kunit_comp->fw);
129 KUNIT_EXPECT_EQ_MSG(kunit_comp->kunit, kunit_comp->expect, ret,
130 "Failed topology load");
131
132 return 0;
133 }
134
135 static const struct snd_soc_component_driver test_component_null_comp = {
136 .name = "sound-soc-topology-test",
137 .probe = d_probe_null_comp,
138 .non_legacy_dai_naming = 1,
139 };
140
141 static void snd_soc_tplg_test_load_with_null_comp(struct kunit *test)
142 {
143 struct kunit_soc_component *kunit_comp;
144 int ret;
145
146 /* prepare */
147 kunit_comp = kunit_kzalloc(test, sizeof(*kunit_comp), GFP_KERNEL);
148 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, kunit_comp);
149 kunit_comp->kunit = test;
150 kunit_comp->expect = -EINVAL; /* expect failure */
151
152 kunit_comp->card.dev = test_dev,
153 kunit_comp->card.name = "kunit-card",
154 kunit_comp->card.owner = THIS_MODULE,
155 kunit_comp->card.dai_link = kunit_dai_links,
156 kunit_comp->card.num_links = ARRAY_SIZE(kunit_dai_links),
157 kunit_comp->card.fully_routed = true,
158
159 /* run test */
160 ret = snd_soc_register_card(&kunit_comp->card);
161 if (ret != 0 && ret != -EPROBE_DEFER)
162 KUNIT_FAIL(test, "Failed to register card");
163
164 ret = snd_soc_component_initialize(&kunit_comp->comp, &test_component_null_comp, test_dev);
165 KUNIT_EXPECT_EQ(test, 0, ret);
166
167 ret = snd_soc_add_component(&kunit_comp->comp, NULL, 0);
168 KUNIT_EXPECT_EQ(test, 0, ret);
169
170 /* cleanup */
171 ret = snd_soc_unregister_card(&kunit_comp->card);
172 KUNIT_EXPECT_EQ(test, 0, ret);
173
174 snd_soc_unregister_component(test_dev);
175 }
176
177 // TEST CASE
178 // Test passing NULL ops as parameter to snd_soc_tplg_component_load
179
180 /*
181 * NULL ops is default case, we pass empty topology (fw), so we don't have
182 * anything to parse and just do nothing, which results in return 0; from
183 * calling soc_tplg_dapm_complete in soc_tplg_process_headers
184 */
185 static void snd_soc_tplg_test_load_with_null_ops(struct kunit *test)
186 {
187 struct kunit_soc_component *kunit_comp;
188 int ret;
189
190 /* prepare */
191 kunit_comp = kunit_kzalloc(test, sizeof(*kunit_comp), GFP_KERNEL);
192 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, kunit_comp);
193 kunit_comp->kunit = test;
194 kunit_comp->expect = 0; /* expect success */
195
196 kunit_comp->card.dev = test_dev,
197 kunit_comp->card.name = "kunit-card",
198 kunit_comp->card.owner = THIS_MODULE,
199 kunit_comp->card.dai_link = kunit_dai_links,
200 kunit_comp->card.num_links = ARRAY_SIZE(kunit_dai_links),
201 kunit_comp->card.fully_routed = true,
202
203 /* run test */
204 ret = snd_soc_register_card(&kunit_comp->card);
205 if (ret != 0 && ret != -EPROBE_DEFER)
206 KUNIT_FAIL(test, "Failed to register card");
207
208 ret = snd_soc_component_initialize(&kunit_comp->comp, &test_component, test_dev);
209 KUNIT_EXPECT_EQ(test, 0, ret);
210
211 ret = snd_soc_add_component(&kunit_comp->comp, NULL, 0);
212 KUNIT_EXPECT_EQ(test, 0, ret);
213
214 /* cleanup */
215 ret = snd_soc_unregister_card(&kunit_comp->card);
216 KUNIT_EXPECT_EQ(test, 0, ret);
217
218 snd_soc_unregister_component(test_dev);
219 }
220
221 // TEST CASE
222 // Test passing NULL fw as parameter to snd_soc_tplg_component_load
223
224 /*
225 * need to override generic probe function with one using NULL pointer to fw
226 * when calling topology load during component initialization, we don't need
227 * .remove handler as load should fail
228 */
> 229 int d_probe_null_fw(struct snd_soc_component *component)
230 {
231 struct kunit_soc_component *kunit_comp =
232 container_of(component, struct kunit_soc_component, comp);
233 int ret;
234
235 /* instead of passing fw pointer as third argument, pass NULL here */
236 ret = snd_soc_tplg_component_load(component, NULL, NULL);
237 KUNIT_EXPECT_EQ_MSG(kunit_comp->kunit, kunit_comp->expect, ret,
238 "Failed topology load");
239
240 return 0;
241 }
242
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
arch/mips/bmips/dma.c:55:13: warning: no previous prototype for 'dma_to_phys'
by kernel test robot
Hi Christoph,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 65f0d2414b7079556fbbcc070b3d1c9f9587606d
commit: 7bc5c428a660d4d1bc95ba54bf4cb6bccf8c3029 dma-direct: remove __dma_to_phys
date: 4 months ago
config: mips-randconfig-r023-20210113 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# 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 7bc5c428a660d4d1bc95ba54bf4cb6bccf8c3029
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/mips/bmips/dma.c:43:12: warning: no previous prototype for '__phys_to_dma' [-Wmissing-prototypes]
43 | dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t pa)
| ^~~~~~~~~~~~~
>> arch/mips/bmips/dma.c:55:13: warning: no previous prototype for 'dma_to_phys' [-Wmissing-prototypes]
55 | phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
| ^~~~~~~~~~~
arch/mips/bmips/dma.c:67:6: warning: no previous prototype for 'arch_sync_dma_for_cpu_all' [-Wmissing-prototypes]
67 | void arch_sync_dma_for_cpu_all(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/dma_to_phys +55 arch/mips/bmips/dma.c
54
> 55 phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
56 {
57 struct bmips_dma_range *r;
58
59 for (r = bmips_dma_ranges; r && r->size; r++) {
60 if (dma_addr >= r->parent_addr &&
61 dma_addr < (r->parent_addr + r->size))
62 return dma_addr - r->parent_addr + r->child_addr;
63 }
64 return dma_addr;
65 }
66
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[tip:x86/urgent 2/2] arch/x86/kernel/cpu/amd.c:545:3: error: '__max_die_per_package' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/urgent
head: 76e2fc63ca40977af893b724b00cc2f8e9ce47a4
commit: 76e2fc63ca40977af893b724b00cc2f8e9ce47a4 [2/2] x86/cpu/amd: Set __max_die_per_package on AMD
config: i386-randconfig-r015-20210113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=76...
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip x86/urgent
git checkout 76e2fc63ca40977af893b724b00cc2f8e9ce47a4
# 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 >>):
arch/x86/kernel/cpu/amd.c: In function 'bsp_init_amd':
>> arch/x86/kernel/cpu/amd.c:545:3: error: '__max_die_per_package' undeclared (first use in this function); did you mean 'topology_max_die_per_package'?
545 | __max_die_per_package = nodes_per_socket = ((ecx >> 8) & 7) + 1;
| ^~~~~~~~~~~~~~~~~~~~~
| topology_max_die_per_package
arch/x86/kernel/cpu/amd.c:545:3: note: each undeclared identifier is reported only once for each function it appears in
vim +545 arch/x86/kernel/cpu/amd.c
508
509 static void bsp_init_amd(struct cpuinfo_x86 *c)
510 {
511 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) {
512
513 if (c->x86 > 0x10 ||
514 (c->x86 == 0x10 && c->x86_model >= 0x2)) {
515 u64 val;
516
517 rdmsrl(MSR_K7_HWCR, val);
518 if (!(val & BIT(24)))
519 pr_warn(FW_BUG "TSC doesn't count with P0 frequency!\n");
520 }
521 }
522
523 if (c->x86 == 0x15) {
524 unsigned long upperbit;
525 u32 cpuid, assoc;
526
527 cpuid = cpuid_edx(0x80000005);
528 assoc = cpuid >> 16 & 0xff;
529 upperbit = ((cpuid >> 24) << 10) / assoc;
530
531 va_align.mask = (upperbit - 1) & PAGE_MASK;
532 va_align.flags = ALIGN_VA_32 | ALIGN_VA_64;
533
534 /* A random value per boot for bit slice [12:upper_bit) */
535 va_align.bits = get_random_int() & va_align.mask;
536 }
537
538 if (cpu_has(c, X86_FEATURE_MWAITX))
539 use_mwaitx_delay();
540
541 if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
542 u32 ecx;
543
544 ecx = cpuid_ecx(0x8000001e);
> 545 __max_die_per_package = nodes_per_socket = ((ecx >> 8) & 7) + 1;
546 } else if (boot_cpu_has(X86_FEATURE_NODEID_MSR)) {
547 u64 value;
548
549 rdmsrl(MSR_FAM10H_NODE_ID, value);
550 __max_die_per_package = nodes_per_socket = ((value >> 3) & 7) + 1;
551 }
552
553 if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) &&
554 !boot_cpu_has(X86_FEATURE_VIRT_SSBD) &&
555 c->x86 >= 0x15 && c->x86 <= 0x17) {
556 unsigned int bit;
557
558 switch (c->x86) {
559 case 0x15: bit = 54; break;
560 case 0x16: bit = 33; break;
561 case 0x17: bit = 10; break;
562 default: return;
563 }
564 /*
565 * Try to cache the base value so further operations can
566 * avoid RMW. If that faults, do not enable SSBD.
567 */
568 if (!rdmsrl_safe(MSR_AMD64_LS_CFG, &x86_amd_ls_cfg_base)) {
569 setup_force_cpu_cap(X86_FEATURE_LS_CFG_SSBD);
570 setup_force_cpu_cap(X86_FEATURE_SSBD);
571 x86_amd_ls_cfg_ssbd_mask = 1ULL << bit;
572 }
573 }
574
575 resctrl_cpu_detect(c);
576 }
577
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH] initramfs: Provide a common initrd reserve function
by kernel test robot
Hi Kefeng,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.11-rc3 next-20210113]
[cannot apply to soc/for-next arm/for-next linux/master]
[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/Kefeng-Wang/initramfs-Provide-a-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e609571b5ffa3528bf85292de1ceaddac342bc1c
config: i386-tinyconfig (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/1336e01e9195f537da5a004080c0cf9f2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kefeng-Wang/initramfs-Provide-a-common-initrd-reserve-function/20210113-224338
git checkout 1336e01e9195f537da5a004080c0cf9f265678d7
# 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 >>):
In file included from arch/x86/include/asm/microcode.h:7,
from arch/x86/mm/init.c:22:
>> include/linux/initrd.h:21:27: error: redefinition of 'reserve_initrd_mem'
21 | static inline void __init reserve_initrd_mem(void) {}
| ^~~~~~~~~~~~~~~~~~
In file included from arch/x86/mm/init.c:2:
include/linux/initrd.h:21:27: note: previous definition of 'reserve_initrd_mem' was here
21 | static inline void __init reserve_initrd_mem(void) {}
| ^~~~~~~~~~~~~~~~~~
vim +/reserve_initrd_mem +21 include/linux/initrd.h
17
18 #ifdef CONFIG_BLK_DEV_INITRD
19 extern void __init reserve_initrd_mem(void);
20 #else
> 21 static inline void __init reserve_initrd_mem(void) {}
22 #endif
23
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH] fs/proc: Expose RSEQ configuration
by kernel test robot
Hi Piotr,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on userns/for-next]
[also build test WARNING on linus/master hnaz-linux-mm/master v5.11-rc3 next-20210113]
[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/Piotr-Figiel/fs-proc-Expose-RSEQ...
base: https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-next
config: mips-randconfig-r011-20210113 (attached as .config)
compiler: mipsel-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/ac6c42405fbb35bb266d602e4d9a303e6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Piotr-Figiel/fs-proc-Expose-RSEQ-configuration/20210114-014431
git checkout ac6c42405fbb35bb266d602e4d9a303e68fadc21
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/proc/base.c: In function 'proc_pid_rseq':
>> fs/proc/base.c:674:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
674 | seq_printf(m, "0x%llx 0x%x\n", (uint64_t)task->rseq, task->rseq_sig);
| ^
vim +674 fs/proc/base.c
665
666 #ifdef CONFIG_RSEQ
667 static int proc_pid_rseq(struct seq_file *m, struct pid_namespace *ns,
668 struct pid *pid, struct task_struct *task)
669 {
670 int res = lock_trace(task);
671
672 if (res)
673 return res;
> 674 seq_printf(m, "0x%llx 0x%x\n", (uint64_t)task->rseq, task->rseq_sig);
675 unlock_trace(task);
676 return 0;
677 }
678 #endif /* CONFIG_RSEQ */
679 #endif /* CONFIG_HAVE_ARCH_TRACEHOOK */
680
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH v3 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps
by kernel test robot
Hi Minchan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20210112]
[cannot apply to s390/features robh/for-next linux/master linus/master hnaz-linux-mm/master v5.11-rc3 v5.11-rc2 v5.11-rc1 v5.11-rc3]
[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/Minchan-Kim/Chunk-Heap-Support-o...
base: df869cab4b3519d603806234861aa0a39df479c0
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/531ebc21d3c2584784d44714e3b4f1df4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Minchan-Kim/Chunk-Heap-Support-on-DMA-HEAP/20210113-092747
git checkout 531ebc21d3c2584784d44714e3b4f1df46b80eee
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/dma-buf/heaps/chunk_heap.c: In function 'chunk_heap_do_vmap':
drivers/dma-buf/heaps/chunk_heap.c:215:24: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
215 | struct page **pages = vmalloc(sizeof(struct page *) * npages);
| ^~~~~~~
| kvmalloc
>> drivers/dma-buf/heaps/chunk_heap.c:215:24: warning: initialization of 'struct page **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/dma-buf/heaps/chunk_heap.c:228:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
228 | vaddr = vmap(pages, npages, VM_MAP, PAGE_KERNEL);
| ^~~~
| kmap
drivers/dma-buf/heaps/chunk_heap.c:228:30: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MTE'?
228 | vaddr = vmap(pages, npages, VM_MAP, PAGE_KERNEL);
| ^~~~~~
| VM_MTE
drivers/dma-buf/heaps/chunk_heap.c:228:30: note: each undeclared identifier is reported only once for each function it appears in
drivers/dma-buf/heaps/chunk_heap.c:229:2: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
229 | vfree(pages);
| ^~~~~
| kvfree
drivers/dma-buf/heaps/chunk_heap.c: In function 'chunk_heap_vunmap':
drivers/dma-buf/heaps/chunk_heap.c:268:3: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration]
268 | vunmap(buffer->vaddr);
| ^~~~~~
| kunmap
cc1: some warnings being treated as errors
vim +215 drivers/dma-buf/heaps/chunk_heap.c
210
211 static void *chunk_heap_do_vmap(struct chunk_heap_buffer *buffer)
212 {
213 struct sg_table *table = &buffer->sg_table;
214 int npages = PAGE_ALIGN(buffer->len) / PAGE_SIZE;
> 215 struct page **pages = vmalloc(sizeof(struct page *) * npages);
216 struct page **tmp = pages;
217 struct sg_page_iter piter;
218 void *vaddr;
219
220 if (!pages)
221 return ERR_PTR(-ENOMEM);
222
223 for_each_sgtable_page(table, &piter, 0) {
224 WARN_ON(tmp - pages >= npages);
225 *tmp++ = sg_page_iter_page(&piter);
226 }
227
228 vaddr = vmap(pages, npages, VM_MAP, PAGE_KERNEL);
229 vfree(pages);
230
231 if (!vaddr)
232 return ERR_PTR(-ENOMEM);
233
234 return vaddr;
235 }
236
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH] fs/proc: Expose RSEQ configuration
by kernel test robot
Hi Piotr,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on userns/for-next]
[also build test WARNING on linus/master hnaz-linux-mm/master v5.11-rc3 next-20210113]
[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/Piotr-Figiel/fs-proc-Expose-RSEQ...
base: https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-next
config: i386-randconfig-s002-20210113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://github.com/0day-ci/linux/commit/ac6c42405fbb35bb266d602e4d9a303e6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Piotr-Figiel/fs-proc-Expose-RSEQ-configuration/20210114-014431
git checkout ac6c42405fbb35bb266d602e4d9a303e68fadc21
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
fs/proc/base.c:674:41: sparse: sparse: cast removes address space '__user' of expression
fs/proc/base.c:2248:25: sparse: sparse: cast to restricted fmode_t
fs/proc/base.c:2305:42: sparse: sparse: cast from restricted fmode_t
fs/proc/base.c:2402:48: sparse: sparse: cast from restricted fmode_t
fs/proc/base.c: note: in included file (through include/linux/rcuwait.h, include/linux/percpu-rwsem.h, include/linux/fs.h, ...):
include/linux/sched/signal.h:708:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:708:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:708:37: sparse: got struct spinlock [noderef] __rcu *
>> fs/proc/base.c:674:50: sparse: sparse: non size-preserving pointer to integer cast
fs/proc/base.c:1117:36: sparse: sparse: context imbalance in '__set_oom_adj' - unexpected unlock
vim +674 fs/proc/base.c
665
666 #ifdef CONFIG_RSEQ
667 static int proc_pid_rseq(struct seq_file *m, struct pid_namespace *ns,
668 struct pid *pid, struct task_struct *task)
669 {
670 int res = lock_trace(task);
671
672 if (res)
673 return res;
> 674 seq_printf(m, "0x%llx 0x%x\n", (uint64_t)task->rseq, task->rseq_sig);
675 unlock_trace(task);
676 return 0;
677 }
678 #endif /* CONFIG_RSEQ */
679 #endif /* CONFIG_HAVE_ARCH_TRACEHOOK */
680
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months