On 16/06/2025 14.42, Christoph Hellwig wrote: > On Mon, Jun 16, 2025 at 02:37:43PM +0200, Daniel Gomez wrote: >> >> 2. In the if/switch case default case (line 181-183): >> It sets the status to invalid and *iter_start() returns false: >> >> default: >> iter->status = BLK_STS_INVAL; >> return false; >> >> >> Removing the invalid assignment "makes it" valid (because of the >> initialization) > > Huhhh? How do you make a field access valid by dropping an assignment? > It should be valid already. But if the initialized value at line 160 can be changed through the previous code then, this should suffice: diff --git a/block/blk-mq-dma.c b/block/blk-mq-dma.c index 37f8fba077e6..7d5ebe1a3f49 100644 --- a/block/blk-mq-dma.c +++ b/block/blk-mq-dma.c @@ -179,7 +179,7 @@ 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; + iter->status = BLK_STS_OK; return false; } }