mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00:00
drm/nouveau: sizeof() vs ARRAY_SIZE()
ARRAY_SIZE() was intended here, sizeof() is too large. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
b08ebe7e77
commit
d095e23206
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user