forked from Minki/linux
davinci: aemif: signedness bug in davinci_aemif_setup_timing()
aemif_calc_rate() can return a negative error value, so all the variables that get tested for this value need to be signed. The maximum bit width of WSETUP(WSETUP_MAX) appears to be 30 bits (0xf << 26). Using a signed instead of an unsigned integer shouldn't make a difference here. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
This commit is contained in:
parent
1a07bfb521
commit
12cdd3d719
@ -90,7 +90,7 @@ int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
|
||||
void __iomem *base, unsigned cs)
|
||||
{
|
||||
unsigned set, val;
|
||||
unsigned ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup;
|
||||
int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup;
|
||||
unsigned offset = A1CR_OFFSET + cs * 4;
|
||||
struct clk *aemif_clk;
|
||||
unsigned long clkrate;
|
||||
|
Loading…
Reference in New Issue
Block a user