Skip to contentSkip to conversation

orion5x: fix compiler cast warnings in ts78xx-setup.c

PATCH New Alexander Clouter 2 participants 2 messages Mar 5, 2011

Subsystems (4)
lore
Share & tools
lore

Alexander Clouter

author maintainer
#0 lore raw

PATCH 1/1 orion5x: fix compiler cast warnings in ts78xx-setup.c

---
 arch/arm/mach-orion5x/ts78xx-setup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-orion5x/ts78xx-setup.c +2 -2
index 82e57a6..78e3b9a 100644
@@ -200,7 +200,7 @@ static void ts78xx_ts_nand_write_buf(struct mtd_info *mtd,
 	int sz;
 
 	if (off) {
-		sz = min(4 - off, len);
+		sz = min((int) (4 - off), len);
 		writesb(io_base, buf, sz);
 		buf += sz;
 		len -= sz;
@@ -227,7 +227,7 @@ static void ts78xx_ts_nand_read_buf(struct mtd_info *mtd,
 	int sz;
 
 	if (off) {
-		sz = min(4 - off, len);
+		sz = min((int) (4 - off), len);
 		readsb(io_base, buf, sz);
 		buf += sz;
 		len -= sz;
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 orion5x: fix compiler cast warnings in ts78xx-setup.c

Hello.

Quoted 10 lines · Alexander Clouter
---
  arch/arm/mach-orion5x/ts78xx-setup.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-orion5x/ts78xx-setup.c +0 -0
index 82e57a6..78e3b9a 100644

arch/arm/mach-orion5x/ts78xx-setup.c static void ts78xx_ts_nand_write_buf(struct mtd_info *mtd, · line 203

Quoted 5 lines
arch/arm/mach-orion5x/ts78xx-setup.c +1 -1
@@ -200,7 +200,7 @@ static void ts78xx_ts_nand_write_buf(struct mtd_info *mtd,
  	int sz;
 
  	if (off) {
-		sz = min(4 - off, len);
+		sz = min((int) (4 - off), len);
    Maybe:

		sz = min_t(int, 4 - off, len);

WBR, Sergei