summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-04-26 17:41:27 +0200
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-04-29 08:56:48 +0200
commitf6b74db84cd1ab7c447e412a4b83f9933a68589b (patch)
treefe53d4f1131a1fec8a56784a1cc26128682feefe /drivers/mtd/nand
parente637f5fe8e0cbee455b75afbc0cf2a0cc76997f4 (diff)
downloadop-kernel-dev-f6b74db84cd1ab7c447e412a4b83f9933a68589b.zip
op-kernel-dev-f6b74db84cd1ab7c447e412a4b83f9933a68589b.tar.gz
mtd: rawnand: gpmi: remove unnecessary variables
Use this->auxiliary_virt and this->auxiliary_phys directly rather than creating extra local variables for them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index 148faee..f6aa358 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -959,8 +959,6 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip,
struct mtd_info *mtd = nand_to_mtd(chip);
void *payload_virt;
dma_addr_t payload_phys;
- void *auxiliary_virt;
- dma_addr_t auxiliary_phys;
unsigned int i;
unsigned char *status;
unsigned int max_bitflips = 0;
@@ -984,11 +982,8 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip,
}
}
- auxiliary_virt = this->auxiliary_virt;
- auxiliary_phys = this->auxiliary_phys;
-
/* go! */
- ret = gpmi_read_page(this, payload_phys, auxiliary_phys);
+ ret = gpmi_read_page(this, payload_phys, this->auxiliary_phys);
if (direct)
dma_unmap_single(this->dev, payload_phys, nfc_geo->payload_size,
@@ -1000,7 +995,7 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip,
}
/* Loop over status bytes, accumulating ECC status. */
- status = auxiliary_virt + nfc_geo->auxiliary_status_offset;
+ status = this->auxiliary_virt + nfc_geo->auxiliary_status_offset;
if (!direct)
memcpy(buf, this->payload_virt, nfc_geo->payload_size);
@@ -1058,7 +1053,7 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip,
buf + i * nfc_geo->ecc_chunk_size,
nfc_geo->ecc_chunk_size,
eccbuf, eccbytes,
- auxiliary_virt,
+ this->auxiliary_virt,
nfc_geo->metadata_size,
nfc_geo->ecc_strength);
} else {
@@ -1086,7 +1081,7 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip,
}
/* handle the block mark swapping */
- block_mark_swapping(this, buf, auxiliary_virt);
+ block_mark_swapping(this, buf, this->auxiliary_virt);
if (oob_required) {
/*
@@ -1100,7 +1095,7 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip,
* the block mark.
*/
memset(chip->oob_poi, ~0, mtd->oobsize);
- chip->oob_poi[0] = ((uint8_t *) auxiliary_virt)[0];
+ chip->oob_poi[0] = ((uint8_t *)this->auxiliary_virt)[0];
}
return max_bitflips;
OpenPOWER on IntegriCloud