]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: remove needless goto from blk_mq_get_driver_tag
authorAndré Almeida <andrealmeid@collabora.com>
Fri, 25 Oct 2019 20:16:51 +0000 (14:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Oct 2019 20:28:10 +0000 (14:28 -0600)
commit2164343e19ecc8a2cad719d91332ed882e4276c7
tree412538fe967fcfccd7e14826a568cd433c7bc287
parentd94d54ad9641da8cf422254d1c63209cc065e1c7
blk-mq: remove needless goto from blk_mq_get_driver_tag

The only usage of the label "done" is when (rq->tag != -1) at the
beginning of the function. Rather than jumping to label, we can just
remove this label and execute the code at the "if". Besides that, the
code that would be executed after the label "done" is the return of the
logical expression (rq->tag != -1) but since we are already inside the
if, we now that this is true. Remove the label and replace the goto with
the proper result of the label.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c