From: kernel test robot <lkp@intel.com>
To: Alistair Popple <apopple@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Lyude Paul <lyude@redhat.com>
Subject: drivers/gpu/drm/nouveau/nouveau_dmem.c:205:13: sparse: sparse: incorrect type in assignment (different base types)
Date: Sun, 8 Oct 2023 10:08:09 +0800 [thread overview]
Message-ID: <202310081010.okVQwwej-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b9ddbb0cde2adcedda26045cc58f31316a492215
commit: d9b719394a1147614351961ac454589111c76e76 nouveau/dmem: refactor nouveau_dmem_fault_copy_one()
date: 12 months ago
config: x86_64-randconfig-123-20231008 (https://download.01.org/0day-ci/archive/20231008/202310081010.okVQwwej-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231008/202310081010.okVQwwej-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310081010.okVQwwej-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:205:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted vm_fault_t [usertype] ret @@ got int @@
drivers/gpu/drm/nouveau/nouveau_dmem.c:205:13: sparse: expected restricted vm_fault_t [usertype] ret
drivers/gpu/drm/nouveau/nouveau_dmem.c:205:13: sparse: got int
vim +205 drivers/gpu/drm/nouveau/nouveau_dmem.c
161
162 static vm_fault_t nouveau_dmem_migrate_to_ram(struct vm_fault *vmf)
163 {
164 struct nouveau_drm *drm = page_to_drm(vmf->page);
165 struct nouveau_dmem *dmem = drm->dmem;
166 struct nouveau_fence *fence;
167 struct nouveau_svmm *svmm;
168 struct page *spage, *dpage;
169 unsigned long src = 0, dst = 0;
170 dma_addr_t dma_addr = 0;
171 vm_fault_t ret = 0;
172 struct migrate_vma args = {
173 .vma = vmf->vma,
174 .start = vmf->address,
175 .end = vmf->address + PAGE_SIZE,
176 .src = &src,
177 .dst = &dst,
178 .pgmap_owner = drm->dev,
179 .flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE,
180 };
181
182 /*
183 * FIXME what we really want is to find some heuristic to migrate more
184 * than just one page on CPU fault. When such fault happens it is very
185 * likely that more surrounding page will CPU fault too.
186 */
187 if (migrate_vma_setup(&args) < 0)
188 return VM_FAULT_SIGBUS;
189 if (!args.cpages)
190 return 0;
191
192 spage = migrate_pfn_to_page(src);
193 if (!spage || !(src & MIGRATE_PFN_MIGRATE))
194 goto done;
195
196 dpage = alloc_page_vma(GFP_HIGHUSER, vmf->vma, vmf->address);
197 if (!dpage)
198 goto done;
199
200 dst = migrate_pfn(page_to_pfn(dpage));
201
202 svmm = spage->zone_device_data;
203 mutex_lock(&svmm->mutex);
204 nouveau_svmm_invalidate(svmm, args.start, args.end);
> 205 ret = nouveau_dmem_copy_one(drm, spage, dpage, &dma_addr);
206 mutex_unlock(&svmm->mutex);
207 if (ret) {
208 ret = VM_FAULT_SIGBUS;
209 goto done;
210 }
211
212 nouveau_fence_new(dmem->migrate.chan, false, &fence);
213 migrate_vma_pages(&args);
214 nouveau_dmem_fence_done(&fence);
215 dma_unmap_page(drm->dev->dev, dma_addr, PAGE_SIZE, DMA_BIDIRECTIONAL);
216 done:
217 migrate_vma_finalize(&args);
218 return ret;
219 }
220
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-10-08 2:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-08 2:08 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-08-11 19:01 drivers/gpu/drm/nouveau/nouveau_dmem.c:205:13: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
2023-03-19 1:15 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202310081010.okVQwwej-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lyude@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.