From c8461c515299d1cca58dea67990ac7cce25e6763 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Thu, 24 Apr 2014 14:12:25 +0200 Subject: imx233: fix comments Change-Id: I2e907feaec39e6ec1614ed19676b13a1d4f7f6b2 --- firmware/target/arm/imx233/sdmmc-imx233.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'firmware/target/arm/imx233/sdmmc-imx233.c') diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index f552246245..8f293543ab 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c @@ -554,7 +554,7 @@ static int init_mmc_drive(int drive) } #endif -// low-level function, don't call directly! +/* low-level function, don't call directly! */ static int __xfer_sectors(int drive, unsigned long start, int count, void *buf, bool read) { uint32_t resp; @@ -596,7 +596,7 @@ static int __xfer_sectors(int drive, unsigned long start, int count, void *buf, static int transfer_sectors(int drive, unsigned long start, int count, void *buf, bool read) { int ret = 0; - // the function doesn't work when count is 0 + /* the function doesn't work when count is 0 */ if(count == 0) return ret; @@ -663,12 +663,12 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf void *ptr = CACHEALIGN_UP(buf); if(buf != ptr) { - // copy count-1 sector and then move within the buffer + /* copy count-1 sector and then move within the buffer */ ret = __xfer_sectors(drive, start, count - 1, ptr, read); memmove(buf, ptr, 512 * (count - 1)); if(ret >= 0) { - // transfer the last sector the aligned_buffer and copy + /* transfer the last sector the aligned_buffer and copy */ ret = __xfer_sectors(drive, start + count - 1, 1, aligned_buffer[drive], read); memcpy(buf + 512 * (count - 1), aligned_buffer[drive], 512); @@ -682,15 +682,15 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf void *ptr = CACHEALIGN_UP(buf); if(buf != ptr) { - // transfer the first sector to aligned_buffer and copy + /* transfer the first sector to aligned_buffer and copy */ memcpy(aligned_buffer[drive], buf, 512); ret = __xfer_sectors(drive, start, 1, aligned_buffer[drive], read); if(ret >= 0) { - // move within the buffer and transfer + /* move within the buffer and transfer */ memmove(ptr, buf + 512, 512 * (count - 1)); ret = __xfer_sectors(drive, start + 1, count - 1, ptr, read); - // move back + /* move back */ memmove(buf + 512, ptr, 512 * (count - 1)); memcpy(buf, aligned_buffer[drive], 512); } @@ -712,7 +712,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf return ret; } -// user specificies the sdmmc drive +/* user specifies the sdmmc drive */ static int part_read_fn(intptr_t user, unsigned long start, int count, void* buf) { return transfer_sectors(user, start, count, buf, true); -- cgit v1.2.3