Skip to content

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Jul 9, 2024

Reverts #314

@opsiff opsiff merged commit 203f542 into linux-6.6.y Jul 9, 2024
dma_unmap_single(fw->device->dev, fw->phys, sg_dma_len(&fw->mem.sgl),
DMA_TO_DEVICE);
kfree(fw->img);
dma_free_coherent(fw->device->dev, sg_dma_len(&fw->mem.sgl), fw->img, fw->phys);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • nvkm_firmware_ctor函数中,len变量被重新定义,可能会导致混淆。建议使用不同的变量名以提高代码可读性。
  • dma_addr_t类型在函数中未定义,需要确保该类型已在其他地方定义。
  • nvkm_firmware_ctor函数中,fw->img的内存分配应该在fw->len已知的情况下进行,以避免潜在的越界问题。
  • sg_init_one函数调用缺少错误处理,如果分配内存失败,应该有相应的错误处理机制。
  • dma_alloc_coherentdma_free_coherent函数的调用应该检查返回值,以确保内存分配和释放操作的成功。

是否建议立即修改:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants