git: ead64e845440 - main - flash: Remove unused variables.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Apr 2022 23:09:50 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ead64e84544012f569ad5b28f36915dba26d6fa7 commit ead64e84544012f569ad5b28f36915dba26d6fa7 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-13 23:08:22 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-13 23:08:22 +0000 flash: Remove unused variables. --- sys/dev/flash/cqspi.c | 10 ++++------ sys/dev/flash/n25q.c | 4 ---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/dev/flash/cqspi.c b/sys/dev/flash/cqspi.c index 54752792798d..b1b1f4cbc7ad 100644 --- a/sys/dev/flash/cqspi.c +++ b/sys/dev/flash/cqspi.c @@ -336,10 +336,9 @@ static int cqspi_wait_ready(struct cqspi_softc *sc) { uint8_t data; - int ret; do { - ret = cqspi_cmd_read(sc, CMD_READ_STATUS, &data, 1); + cqspi_cmd_read(sc, CMD_READ_STATUS, &data, 1); } while (data & STATUS_WIP); return (0); @@ -392,17 +391,16 @@ static int cqspi_erase(device_t dev, device_t child, off_t offset) { struct cqspi_softc *sc; - int ret; sc = device_get_softc(dev); cqspi_wait_idle(sc); cqspi_wait_ready(sc); - ret = cqspi_cmd_write(sc, CMD_WRITE_ENABLE, 0, 0); + cqspi_cmd_write(sc, CMD_WRITE_ENABLE, 0, 0); cqspi_wait_idle(sc); cqspi_wait_ready(sc); - ret = cqspi_cmd_write_addr(sc, CMD_QUAD_SECTOR_ERASE, offset, 4); + cqspi_cmd_write_addr(sc, CMD_QUAD_SECTOR_ERASE, offset, 4); cqspi_wait_idle(sc); @@ -422,7 +420,7 @@ cqspi_write(device_t dev, device_t child, struct bio *bp, sc = device_get_softc(dev); cqspi_wait_ready(sc); - reg = cqspi_cmd_write(sc, CMD_WRITE_ENABLE, 0, 0); + cqspi_cmd_write(sc, CMD_WRITE_ENABLE, 0, 0); cqspi_wait_idle(sc); cqspi_wait_ready(sc); diff --git a/sys/dev/flash/n25q.c b/sys/dev/flash/n25q.c index cf7bfeef1ee1..b64d3fa57474 100644 --- a/sys/dev/flash/n25q.c +++ b/sys/dev/flash/n25q.c @@ -189,12 +189,10 @@ n25q_get_device_ident(struct n25q_softc *sc) static int n25q_write(device_t dev, struct bio *bp, off_t offset, caddr_t data, off_t count) { - struct n25q_softc *sc; device_t pdev; int err; pdev = device_get_parent(dev); - sc = device_get_softc(dev); dprintf("%s: offset 0x%llx count %lld bytes\n", __func__, offset, count); @@ -239,12 +237,10 @@ n25q_read(device_t dev, struct bio *bp, off_t offset, caddr_t data, off_t count) static int n25q_set_4b_mode(device_t dev, uint8_t command) { - struct n25q_softc *sc; device_t pdev; int err; pdev = device_get_parent(dev); - sc = device_get_softc(dev); err = QSPI_WRITE_REG(pdev, dev, command, 0, 0);