History

mtd: rawnand: Use unsigned types for nand_chip unsigned values

page_shift, phys_erase_shift, bbt_erase_shift, chip_shift, pagemask, subpagesize and badblockbits are all positive values, so declare them as unsigned.

Miquel Raynal committed 6 years ago

Commit c4cabc01 parent 85f54c51 file · +7 −7Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/mtd/rawnand.h+7−7
@@ -1110,11 +1110,11 @@ struct nand_chip { · 1109 unmodified lines
11101110 unsigned int options;
11111111 unsigned int bbt_options;
11121112
1113− int page_shift;
1114− int phys_erase_shift;
1115− int bbt_erase_shift;
1116− int chip_shift;
1117− int pagemask;
1113+ unsigned int page_shift;
1114+ unsigned int phys_erase_shift;
1115+ unsigned int bbt_erase_shift;
1116+ unsigned int chip_shift;
1117+ unsigned int pagemask;
11181118 u8 *data_buf;
11191119
11201120 struct {
@@ -1122,10 +1122,10 @@ struct nand_chip { · 1 unmodified line
11221122 int page;
11231123 } pagecache;
11241124
1125− int subpagesize;
1125+ unsigned int subpagesize;
11261126 int onfi_timing_mode_default;
11271127 unsigned int badblockpos;
1128− int badblockbits;
1128+ unsigned int badblockbits;
11291129
11301130 struct nand_id id;
11311131 struct nand_parameters parameters;