mirror of https://gitee.com/openkylin/linux.git
mtd: clean up whitespace in linux/mtd/map.h
As the only comments I got for the "mtd: cfi: reduce stack size" patch were about whitespace changes, it appears necessary to fix up the rest of the file as well, which contains the exact same mistakes. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
parent
d09957fbb4
commit
7234bea69d
|
@ -274,10 +274,12 @@ void map_destroy(struct mtd_info *mtd);
|
|||
static inline int map_word_equal(struct map_info *map, map_word val1, map_word val2)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < map_words(map); i++) {
|
||||
if (val1.x[i] != val2.x[i])
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -286,9 +288,9 @@ static inline map_word map_word_and(struct map_info *map, map_word val1, map_wor
|
|||
map_word r;
|
||||
int i;
|
||||
|
||||
for (i=0; i<map_words(map); i++) {
|
||||
for (i = 0; i < map_words(map); i++)
|
||||
r.x[i] = val1.x[i] & val2.x[i];
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -297,9 +299,9 @@ static inline map_word map_word_clr(struct map_info *map, map_word val1, map_wor
|
|||
map_word r;
|
||||
int i;
|
||||
|
||||
for (i=0; i<map_words(map); i++) {
|
||||
for (i = 0; i < map_words(map); i++)
|
||||
r.x[i] = val1.x[i] & ~val2.x[i];
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -308,9 +310,9 @@ static inline map_word map_word_or(struct map_info *map, map_word val1, map_word
|
|||
map_word r;
|
||||
int i;
|
||||
|
||||
for (i=0; i<map_words(map); i++) {
|
||||
for (i = 0; i < map_words(map); i++)
|
||||
r.x[i] = val1.x[i] | val2.x[i];
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -334,6 +336,7 @@ static inline int map_word_bitsset(struct map_info *map, map_word val1, map_word
|
|||
if (val1.x[i] & val2.x[i])
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -365,10 +368,12 @@ static inline map_word map_word_load_partial(struct map_info *map, map_word orig
|
|||
|
||||
if (map_bankwidth_is_large(map)) {
|
||||
char *dest = (char *)&orig;
|
||||
|
||||
memcpy(dest+start, buf, len);
|
||||
} else {
|
||||
for (i = start; i < start+len; i++) {
|
||||
int bitpos;
|
||||
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
bitpos = i * 8;
|
||||
#else /* __BIG_ENDIAN */
|
||||
|
@ -394,6 +399,7 @@ static inline map_word map_word_ff(struct map_info *map)
|
|||
|
||||
if (map_bankwidth(map) < MAP_FF_LIMIT) {
|
||||
int bw = 8 * map_bankwidth(map);
|
||||
|
||||
r.x[0] = (1UL << bw) - 1;
|
||||
} else {
|
||||
for (i = 0; i < map_words(map); i++)
|
||||
|
|
Loading…
Reference in New Issue