mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Clean-up from big switch to stdint/stdbool
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2362 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+3
-3
@@ -475,12 +475,12 @@ int ftl_initialize(int minor, uint8_t *buffer, FAR struct mtd_dev_s *mtd)
|
||||
|
||||
dev->mtd = mtd;
|
||||
|
||||
/* Get the device geometry. (casting to uintptr first eliminates
|
||||
/* Get the device geometry. (casting to uintptr_t first eliminates
|
||||
* complaints on some architectures where the sizeof long is different
|
||||
* from the size of a pointer).
|
||||
*/
|
||||
|
||||
ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr)&dev->geo));
|
||||
ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->geo));
|
||||
if (ret < 0)
|
||||
{
|
||||
fdbg("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret);
|
||||
@@ -503,7 +503,7 @@ int ftl_initialize(int minor, uint8_t *buffer, FAR struct mtd_dev_s *mtd)
|
||||
/* Get the number of R/W blocks per erase block */
|
||||
|
||||
dev->blkper = dev->geo.erasesize / dev->geo.blocksize;
|
||||
DEBUGASSERT(dev->blkper * dev->geo.blocksize = dev->geo.erasesize);
|
||||
DEBUGASSERT(dev->blkper * dev->geo.blocksize == dev->geo.erasesize);
|
||||
|
||||
/* Configure read-ahead/write buffering */
|
||||
|
||||
|
||||
+1
-1
@@ -579,7 +579,7 @@ static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
{
|
||||
case MTDIOC_GEOMETRY:
|
||||
{
|
||||
FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)((uintptr)arg);
|
||||
FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)((uintptr_t)arg);
|
||||
if (geo)
|
||||
{
|
||||
/* Populate the geometry structure with information need to know
|
||||
|
||||
Reference in New Issue
Block a user