Re: [PATCH] lightnvm: remove unused rq parameter of nvme_nvm_rqtocmd() to kill warning

From: Jens Axboe
Date: Sun May 07 2017 - 21:54:37 EST


On 05/07/2017 08:14 AM, Geert Uytterhoeven wrote:
> With gcc 4.1.2:

Wow, that's ancient.

> 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 2e13f33a2464fc3a ("lightnvm: create cmd before
> allocating request"), the request is passed to nvme_nvm_rqtocmd() before
> it is allocated.
>
> Fortunately, as of commit 91276162de9476b8 ("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.

Thanks, applied.

--
Jens Axboe