提交 c1a900cf 编写于 作者: M Michael Walle 提交者: Michael Tokarev

milkymist-pfpu: fix potential integer overflow

Since the lm32 is a 32 bit architecture, just return a 32 bit value which
is then converted to a 64 bit value.

Spotted by coverity, CID 1005506.
Signed-off-by: NMichael Walle <michael@walle.cc>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 f96fe6b5
......@@ -137,7 +137,7 @@ struct MilkymistPFPUState {
};
typedef struct MilkymistPFPUState MilkymistPFPUState;
static inline hwaddr
static inline uint32_t
get_dma_address(uint32_t base, uint32_t x, uint32_t y)
{
return base + 8 * (128 * y + x);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册