diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-29 13:13:08 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-06-26 08:35:06 +0200 |
commit | fcaab3b26d2534ec9f227810975ad220823ac578 (patch) | |
tree | 541be0667fd6d6d0b96d5383c825ce0710303a9b /drivers | |
parent | 623c0141f560800c4fc7a7502654994633791d36 (diff) |
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: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-15-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/raw/internals.h | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/raw/nand_timings.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/internals.h b/drivers/mtd/nand/raw/internals.h index 0f74509abc4c..bd10ec92f04a 100644 --- a/drivers/mtd/nand/raw/internals.h +++ b/drivers/mtd/nand/raw/internals.h @@ -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, struct nand_data_interface *iface, 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_set_features(struct nand_chip *chip, int addr, u8 *subfeature_param); int nand_read_page_raw_notsupp(struct nand_chip *chip, u8 *buf, diff --git a/drivers/mtd/nand/raw/nand_timings.c b/drivers/mtd/nand/raw/nand_timings.c index ce6bb87db2e8..08dc381349fa 100644 --- a/drivers/mtd/nand/raw/nand_timings.c +++ b/drivers/mtd/nand/raw/nand_timings.c @@ -283,14 +283,14 @@ static const struct nand_data_interface onfi_sdr_timings[] = { int onfi_fill_data_interface(struct nand_chip *chip, struct nand_data_interface *iface, enum nand_data_interface_type type, - int timing_mode) + unsigned int timing_mode) { struct onfi_params *onfi = chip->parameters.onfi; if (type != NAND_SDR_IFACE) return -EINVAL; - if (timing_mode < 0 || timing_mode >= ARRAY_SIZE(onfi_sdr_timings)) + if (timing_mode >= ARRAY_SIZE(onfi_sdr_timings)) return -EINVAL; *iface = onfi_sdr_timings[timing_mode]; |