]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: remove unused rq parameter of nvme_nvm_rqtocmd() to kill warning
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 7 May 2017 14:14:44 +0000 (16:14 +0200)
committerJens Axboe <axboe@fb.com>
Mon, 8 May 2017 01:52:45 +0000 (19:52 -0600)
commitc0d4db776133efb9ca6a9a3fff269cc7082482ef
tree658726be94c2af5902aa113f679fbf1700f400ca
parenta5c6600a365c4e5a994c6141e019d4a491920fc3
lightnvm: remove unused rq parameter of nvme_nvm_rqtocmd() to kill warning

With gcc 4.1.2:

    drivers/nvme/host/lightnvm.c: In function ‘nvme_nvm_submit_io’:
    drivers/nvme/host/lightnvm.c:498: warning: ‘rq’ is used uninitialized in this function

Indeed, since commit 3cc88353f9cb93c7 ("lightnvm: create cmd before
allocating request"), the request is passed to nvme_nvm_rqtocmd() before
it is allocated.

Fortunately, as of commit 3499e14998f4e947 ("lightnvm: refactor end_io
functions for sync"), nvme_nvm_rqtocmd () no longer uses the passed
request, so this warning is a false positive.

Drop the unused parameter to clean up the code and kill the warning.

Fixes: 3cc88353f9cb93c7 ("lightnvm: create cmd before allocating request")
Fixes: 3499e14998f4e947 ("lightnvm: refactor end_io functions for sync")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/lightnvm.c