Skip to content

Commit 26cdb67

Browse files
David WoodhouseDavid Woodhouse
authored andcommitted
[MTD] Remove more strange u_intxx_t types
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
1 parent 3854be7 commit 26cdb67

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎drivers/mtd/mtdconcat.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
696696
int i;
697697
size_t size;
698698
struct mtd_concat *concat;
699-
u_int32_t max_erasesize, curr_erasesize;
699+
uint32_t max_erasesize, curr_erasesize;
700700
int num_erase_region;
701701

702702
printk(KERN_NOTICE "Concatenating MTD devices:\n");

‎include/linux/mtd/mtd.h‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ struct erase_info {
3939
uint64_t fail_addr;
4040
u_long time;
4141
u_long retries;
42-
u_int dev;
43-
u_int cell;
42+
unsigned dev;
43+
unsigned cell;
4444
void (*callback) (struct erase_info *self);
4545
u_long priv;
4646
u_char state;
@@ -49,8 +49,8 @@ struct erase_info {
4949

5050
struct mtd_erase_region_info {
5151
uint64_t offset; /* At which this region starts, from the beginning of the MTD */
52-
u_int32_t erasesize; /* For this region */
53-
u_int32_t numblocks; /* Number of blocks of erasesize in this region */
52+
uint32_t erasesize; /* For this region */
53+
uint32_t numblocks; /* Number of blocks of erasesize in this region */
5454
unsigned long *lockmap; /* If keeping bitmap of locks */
5555
};
5656

@@ -102,25 +102,25 @@ struct mtd_oob_ops {
102102

103103
struct mtd_info {
104104
u_char type;
105-
u_int32_t flags;
105+
uint32_t flags;
106106
uint64_t size; // Total size of the MTD
107107

108108
/* "Major" erase size for the device. Naïve users may take this
109109
* to be the only erase size available, or may use the more detailed
110110
* information below if they desire
111111
*/
112-
u_int32_t erasesize;
112+
uint32_t erasesize;
113113
/* Minimal writable flash unit size. In case of NOR flash it is 1 (even
114114
* though individual bits can be cleared), in case of NAND flash it is
115115
* one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR
116116
* it is of ECC block size, etc. It is illegal to have writesize = 0.
117117
* Any driver registering a struct mtd_info must ensure a writesize of
118118
* 1 or larger.
119119
*/
120-
u_int32_t writesize;
120+
uint32_t writesize;
121121

122-
u_int32_t oobsize; // Amount of OOB data per block (e.g. 16)
123-
u_int32_t oobavail; // Available OOB bytes per block
122+
uint32_t oobsize; // Amount of OOB data per block (e.g. 16)
123+
uint32_t oobavail; // Available OOB bytes per block
124124

125125
/*
126126
* If erasesize is a power of 2 then the shift is stored in
@@ -233,30 +233,30 @@ struct mtd_info {
233233
void (*put_device) (struct mtd_info *mtd);
234234
};
235235

236-
static inline u_int32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd)
236+
static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd)
237237
{
238238
if (mtd->erasesize_shift)
239239
return sz >> mtd->erasesize_shift;
240240
do_div(sz, mtd->erasesize);
241241
return sz;
242242
}
243243

244-
static inline u_int32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd)
244+
static inline uint32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd)
245245
{
246246
if (mtd->erasesize_shift)
247247
return sz & mtd->erasesize_mask;
248248
return do_div(sz, mtd->erasesize);
249249
}
250250

251-
static inline u_int32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
251+
static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
252252
{
253253
if (mtd->writesize_shift)
254254
return sz >> mtd->writesize_shift;
255255
do_div(sz, mtd->writesize);
256256
return sz;
257257
}
258258

259-
static inline u_int32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd)
259+
static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd)
260260
{
261261
if (mtd->writesize_shift)
262262
return sz & mtd->writesize_mask;

‎include/linux/mtd/partitions.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct mtd_partition {
3838
char *name; /* identifier string */
3939
uint64_t size; /* partition size */
4040
uint64_t offset; /* offset within the master MTD space */
41-
u_int32_t mask_flags; /* master MTD flags to mask out for this partition */
41+
uint32_t mask_flags; /* master MTD flags to mask out for this partition */
4242
struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/
4343
struct mtd_info **mtdp; /* pointer to store the MTD object */
4444
};

0 commit comments

Comments
 (0)