On 16/06/2025 07.02, Christoph Hellwig wrote: > On Wed, Jun 11, 2025 at 03:43:07PM +0200, Daniel Gomez wrote: >>> +struct blk_dma_iter { >>> + /* Output address range for this iteration */ >>> + dma_addr_t addr; >>> + u32 len; >>> + >>> + /* Status code. Only valid when blk_rq_dma_map_iter_* returned false */ >>> + blk_status_t status; >> >> This comment does not match with blk_rq_dma_map_iter_start(). It returns false >> and status is BLK_STS_INVAL. > > I went over you comment a few times and still don't understand it. The way I read the comment is that status is only valid when blk_rq_dma_map_iter_* returns false. But blk_rq_dma_map_iter_start() can return false and an invalid status (in the default switch case). Assuming the comment is the right thing, I'd expect a valid status for that case: --- a/block/blk-mq-dma.c +++ b/block/blk-mq-dma.c @@ -179,7 +179,6 @@ bool blk_rq_dma_map_iter_start(struct request *req, struct device *dma_dev, req->cmd_flags &= ~REQ_P2PDMA; break; default: - iter->status = BLK_STS_INVAL; return false; } }