Re: [PATCH V9 6/9] nvmet: add bio init helper for different backends
From: Damien Le Moal <hidden>
Date: 2021-01-12 06:28:41
Also in:
linux-nvme
From: Damien Le Moal <hidden>
Date: 2021-01-12 06:28:41
Also in:
linux-nvme
On 2021/01/12 14:57, Chaitanya Kulkarni wrote:
On 1/11/21 21:40, Damien Le Moal wrote:quoted
quoted
bio = nvmet_req_bio_get(req, NULL); - bio_set_dev(bio, req->ns->bdev); - bio->bi_iter.bi_sector = sect; - bio->bi_opf = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE; + nvmet_bio_init(bio, req->ns->bdev, op, sect, NULL, NULL);op is used only here I think. So is that variable really necessary ?This is just my personal preference as without using op we will have to add a new line to a function call, I like to keep the function call in one line as much as I can.
A new line in the code costs nothing. An unnecessary variable costs stack space... -- Damien Le Moal Western Digital Research