diff --git a/arch b/arch index 24f87df3fa..1c26392beb 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 24f87df3fa8d9fec9044e2c2bb37d12260fd02de +Subproject commit 1c26392bebcb3135b214e12594b701c172bd1236 diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index a0260a1f4d..6ed8529ac3 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -329,7 +329,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, buffer += dev->geo.erasesize; } - /* Finally, handler any partial blocks after the last full erase block */ + /* Finally, handle any partial blocks after the last full erase block */ if (remaining > 0) { diff --git a/drivers/mtd/mtd_progmem.c b/drivers/mtd/mtd_progmem.c index ac9be0f497..8fcda67aae 100644 --- a/drivers/mtd/mtd_progmem.c +++ b/drivers/mtd/mtd_progmem.c @@ -41,6 +41,7 @@ #include #include +#include #include #include @@ -199,15 +200,13 @@ static ssize_t progmem_bread(FAR struct mtd_dev_s *dev, off_t startblock, { FAR struct progmem_dev_s *priv = (FAR struct progmem_dev_s *)dev; FAR const uint8_t *src; - size_t offset; /* Read the specified blocks into the provided user buffer and return * status (The positive, number of blocks actually read or a negated * errno). */ - offset = startblock << priv->blkshift; - src = (FAR const uint8_t *)up_progmem_getaddress(offset); + src = (FAR const uint8_t *)up_progmem_getaddress(startblock); memcpy(buffer, src, nblocks << priv->blkshift); return nblocks; }