提交 d095e232 编写于 作者: D Dan Carpenter 提交者: Ben Skeggs

drm/nouveau: sizeof() vs ARRAY_SIZE()

ARRAY_SIZE() was intended here, sizeof() is too large.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 b08ebe7e
......@@ -42,7 +42,7 @@ nv50_vram_flags_valid(struct drm_device *dev, u32 tile_flags)
{
int type = (tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK) >> 8;
if (likely(type < sizeof(types) && types[type]))
if (likely(type < ARRAY_SIZE(types) && types[type]))
return true;
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册