projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b08ebe7
)
drm/nouveau: sizeof() vs ARRAY_SIZE()
author
Dan Carpenter
<error27@gmail.com>
Mon, 20 Dec 2010 09:26:26 +0000
(12:26 +0300)
committer
Ben Skeggs
<bskeggs@redhat.com>
Tue, 21 Dec 2010 01:53:32 +0000
(11:53 +1000)
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>
drivers/gpu/drm/nouveau/nv50_vram.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/nouveau/nv50_vram.c
b/drivers/gpu/drm/nouveau/nv50_vram.c
index 47489ed0a5a8245a1dbc70af590d52eaaa165195..58e98ad36347b7b5b82c81f23d2636da8227b9ad 100644
(file)
--- a/
drivers/gpu/drm/nouveau/nv50_vram.c
+++ b/
drivers/gpu/drm/nouveau/nv50_vram.c
@@
-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;
}