From 48a753442291eb66a562446ea4a5f2ead85bb6f1 Mon Sep 17 00:00:00 2001 From: Karthick Shanmugham Date: Wed, 7 Oct 2020 12:56:47 +0530 Subject: [PATCH] ipq5018: Fix compilation issue for unused-const-variable 1. Modified to the declare block_drvr struct and const variable only on HAVE_BLOCK_DEVICE config enabled. 2. Removed unused const training_block_64 Signed-off-by: Karthick Shanmugham Change-Id: Icfe05aec82a124429443aadf735767366b168d6b --- disk/part.c | 6 +++--- drivers/mtd/nand/qpic_nand.c | 6 ------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/disk/part.c b/disk/part.c index 909712e501..7fe2e7db5a 100644 --- a/disk/part.c +++ b/disk/part.c @@ -20,6 +20,9 @@ #define PRINTF(fmt,args...) #endif +DECLARE_GLOBAL_DATA_PTR; + +#ifdef HAVE_BLOCK_DEVICE struct block_drvr { char *name; block_dev_desc_t* (*get_dev)(int dev); @@ -55,9 +58,6 @@ static const struct block_drvr block_drvr[] = { { }, }; -DECLARE_GLOBAL_DATA_PTR; - -#ifdef HAVE_BLOCK_DEVICE static block_dev_desc_t *get_dev_hwpart(const char *ifname, int dev, int hwpart) { const struct block_drvr *drvr = block_drvr; diff --git a/drivers/mtd/nand/qpic_nand.c b/drivers/mtd/nand/qpic_nand.c index f30041c579..e0b6e66832 100644 --- a/drivers/mtd/nand/qpic_nand.c +++ b/drivers/mtd/nand/qpic_nand.c @@ -122,12 +122,6 @@ struct qpic_serial_nand_params *serial_params; * An array holding the fixed pattern to compare with * training pattern. */ -static const unsigned int training_block_64[] = { - 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, - 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, - 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, - 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, -}; static const unsigned int training_block_128[] = { 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F,