mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mtd: nand: Declare tBERS, tR and tPROG as u64 to avoid integer overflow
All timings in nand_sdr_timings are expressed in picoseconds but some
of them may not fit in an u32.
Signed-off-by: Boris Brezillon <[email protected]>
Fixes: 204e7ecd47 ("mtd: nand: Add a few more timings to nand_sdr_timings")
Reported-by: Alexander Dahl <[email protected]>
Cc: <[email protected]>
Reviewed-by: Alexander Dahl <[email protected]>
Tested-by: Alexander Dahl <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
This commit is contained in:
parent
a11bf5ed95
commit
6d29231000
2 changed files with 6 additions and 6 deletions
|
|
@ -311,9 +311,9 @@ int onfi_init_data_interface(struct nand_chip *chip,
|
|||
struct nand_sdr_timings *timings = &iface->timings.sdr;
|
||||
|
||||
/* microseconds -> picoseconds */
|
||||
timings->tPROG_max = 1000000UL * le16_to_cpu(params->t_prog);
|
||||
timings->tBERS_max = 1000000UL * le16_to_cpu(params->t_bers);
|
||||
timings->tR_max = 1000000UL * le16_to_cpu(params->t_r);
|
||||
timings->tPROG_max = 1000000ULL * le16_to_cpu(params->t_prog);
|
||||
timings->tBERS_max = 1000000ULL * le16_to_cpu(params->t_bers);
|
||||
timings->tR_max = 1000000ULL * le16_to_cpu(params->t_r);
|
||||
|
||||
/* nanoseconds -> picoseconds */
|
||||
timings->tCCS_min = 1000UL * le16_to_cpu(params->t_ccs);
|
||||
|
|
|
|||
Loading…
Reference in a new issue