Commit fcaab3b2 authored by Miquel Raynal's avatar Miquel Raynal

mtd: rawnand: timings: onfi_fill_data_interface timing mode is unsigned

Turn this argument into an unsigned int, as it cannot be signed. This
also spares a check.
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-15-miquel.raynal@bootlin.com
parent 623c0141
...@@ -87,7 +87,7 @@ int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr, ...@@ -87,7 +87,7 @@ int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr,
int onfi_fill_data_interface(struct nand_chip *chip, int onfi_fill_data_interface(struct nand_chip *chip,
struct nand_data_interface *iface, struct nand_data_interface *iface,
enum nand_data_interface_type type, enum nand_data_interface_type type,
int timing_mode); unsigned int timing_mode);
int nand_get_features(struct nand_chip *chip, int addr, u8 *subfeature_param); int nand_get_features(struct nand_chip *chip, int addr, u8 *subfeature_param);
int nand_set_features(struct nand_chip *chip, int addr, u8 *subfeature_param); int nand_set_features(struct nand_chip *chip, int addr, u8 *subfeature_param);
int nand_read_page_raw_notsupp(struct nand_chip *chip, u8 *buf, int nand_read_page_raw_notsupp(struct nand_chip *chip, u8 *buf,
......
...@@ -283,14 +283,14 @@ static const struct nand_data_interface onfi_sdr_timings[] = { ...@@ -283,14 +283,14 @@ static const struct nand_data_interface onfi_sdr_timings[] = {
int onfi_fill_data_interface(struct nand_chip *chip, int onfi_fill_data_interface(struct nand_chip *chip,
struct nand_data_interface *iface, struct nand_data_interface *iface,
enum nand_data_interface_type type, enum nand_data_interface_type type,
int timing_mode) unsigned int timing_mode)
{ {
struct onfi_params *onfi = chip->parameters.onfi; struct onfi_params *onfi = chip->parameters.onfi;
if (type != NAND_SDR_IFACE) if (type != NAND_SDR_IFACE)
return -EINVAL; return -EINVAL;
if (timing_mode < 0 || timing_mode >= ARRAY_SIZE(onfi_sdr_timings)) if (timing_mode >= ARRAY_SIZE(onfi_sdr_timings))
return -EINVAL; return -EINVAL;
*iface = onfi_sdr_timings[timing_mode]; *iface = onfi_sdr_timings[timing_mode];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment