On Sun, Nov 23, 2025 at 10:51:21PM +0000, Pavel Begunkov wrote:
+static inline struct dma_token * +dma_token_create(struct file *file, struct dma_token_params *params) +{
- struct dma_token *res;
- if (!file->f_op->dma_map)
return ERR_PTR(-EOPNOTSUPP);- res = file->f_op->dma_map(file, params);
Calling the file operation ->dmap_map feels really misleading.
create_token as in the function name is already much better, but it really is not just dma, but dmabuf related, and that should really be encoded in the name.
Also why not pass the dmabuf and direction directly instead of wrapping it in the odd params struct making the whole thing hard to follow?