From b36b29b4c320f01b77b8836f01a853c447fd3799 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 4 Jul 2014 07:28:12 -0600 Subject: [PATCH] SMARTFS: Increase some variables from uint16_t to uint32_t to handle larger device sizes. From Ken Pettit --- drivers/mtd/smart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/smart.c b/drivers/mtd/smart.c index ea1fe387df5..002a9fe5da3 100644 --- a/drivers/mtd/smart.c +++ b/drivers/mtd/smart.c @@ -572,7 +572,7 @@ static ssize_t smart_bytewrite(struct smart_struct_s *dev, size_t offset, { /* Perform block-based read-modify-write */ - uint16_t startblock; + uint32_t startblock; uint16_t nblocks; /* First calculate the start block and number of blocks affected */ @@ -1462,7 +1462,7 @@ static inline int smart_writesector(struct smart_struct_s *dev, unsigned long ar int ret; uint16_t x; bool needsrelocate = FALSE; - uint16_t mtdblock; + uint32_t mtdblock; uint16_t physsector; struct smart_read_write_s *req; struct smart_sect_header_s *header;