From eb10ac21048b457b0af1f8167911e4978de209e9 Mon Sep 17 00:00:00 2001 From: Haojie Li Date: Tue, 25 Aug 2026 14:40:41 +0800 Subject: [PATCH] dma-buf: fix comment in dma_buf_llseek to match implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment in dma_buf_llseek() referenced a "SEEK_END(0), SEEK_CUR(0) pattern", but the implementation does not support SEEK_CUR - it only handles SEEK_END and SEEK_SET, returning -EINVAL for anything else. Replace SEEK_CUR with SEEK_SET in the comment so that it accurately describes the supported idiomatic pattern. Signed-off-by: Haojie Li Link: https://lore.kernel.org/r/20260825064041.328640-1-lihaojie@kylinos.cn Reviewed-by: Christian König Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index d504c636dc29..60571a2ecc23 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -260,7 +260,7 @@ static loff_t dma_buf_llseek(struct file *file, loff_t offset, int whence) /* only support discovering the end of the buffer, * but also allow SEEK_SET to maintain the idiomatic - * SEEK_END(0), SEEK_CUR(0) pattern. + * SEEK_END(0), SEEK_SET(0) pattern. */ if (whence == SEEK_END) base = dmabuf->size;