diff mbox series

lightnvm: remove unused variable 'geo'

Message ID 20190810073936.28700-1-anders.roxell@linaro.org
State New
Headers show
Series lightnvm: remove unused variable 'geo' | expand

Commit Message

Anders Roxell Aug. 10, 2019, 7:39 a.m. UTC
The variable 'geo' is no longer used.

../drivers/lightnvm/pblk-read.c: In function ‘pblk_submit_read_gc’:
../drivers/lightnvm/pblk-read.c:421:18: warning: unused variable ‘geo’
 [-Wunused-variable]
  struct nvm_geo *geo = &dev->geo;
                  ^~~

Rework to remove the unused variable 'geo' and also the unused variable
'dev' that got unused when the 'geo' variable was removed.

Fixes: ba6f7da99aaf ("lightnvm: remove set but not used variables 'data_len' and 'rq_len'")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

---
 drivers/lightnvm/pblk-read.c | 2 --
 1 file changed, 2 deletions(-)

-- 
2.20.1

Comments

Jens Axboe Aug. 11, 2019, 3:45 a.m. UTC | #1
On 8/10/19 12:39 AM, Anders Roxell wrote:
> The variable 'geo' is no longer used.

> 

> ../drivers/lightnvm/pblk-read.c: In function ‘pblk_submit_read_gc’:

> ../drivers/lightnvm/pblk-read.c:421:18: warning: unused variable ‘geo’

>   [-Wunused-variable]

>    struct nvm_geo *geo = &dev->geo;

>                    ^~~

> 

> Rework to remove the unused variable 'geo' and also the unused variable

> 'dev' that got unused when the 'geo' variable was removed.


This was fixed a few days ago:

http://git.kernel.dk/cgit/linux-block/commit/?h=for-5.4/block&id=f0e6f41669d9e07f45b472e4de33d7c233a847bd

-- 
Jens Axboe
diff mbox series

Patch

diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c
index 0cdc48f9cfbf..8efd14e683dc 100644
--- a/drivers/lightnvm/pblk-read.c
+++ b/drivers/lightnvm/pblk-read.c
@@ -417,8 +417,6 @@  static int read_rq_gc(struct pblk *pblk, struct nvm_rq *rqd,
 
 int pblk_submit_read_gc(struct pblk *pblk, struct pblk_gc_rq *gc_rq)
 {
-	struct nvm_tgt_dev *dev = pblk->dev;
-	struct nvm_geo *geo = &dev->geo;
 	struct nvm_rq rqd;
 	int ret = NVM_IO_OK;