[PATCH 2/2] drm/nouveau: fix open-coded ARRAY_SIZE in volt code

Dave Airlie airlied at gmail.com
Fri Apr 20 05:13:55 PDT 2012


From: Dave Airlie <airlied at redhat.com>

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 drivers/gpu/drm/nouveau/nouveau_volt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_volt.c b/drivers/gpu/drm/nouveau/nouveau_volt.c
index b010cb9..fdc8f77 100644
--- a/drivers/gpu/drm/nouveau/nouveau_volt.c
+++ b/drivers/gpu/drm/nouveau/nouveau_volt.c
@@ -29,7 +29,7 @@
 #include "nouveau_gpio.h"
 
 static const enum dcb_gpio_tag vidtag[] = { 0x04, 0x05, 0x06, 0x1a, 0x73 };
-static int nr_vidtag = sizeof(vidtag) / sizeof(vidtag[0]);
+static int nr_vidtag = ARRAY_SIZE(vidtag);
 
 int
 nouveau_voltage_gpio_get(struct drm_device *dev)
-- 
1.7.7.6



More information about the dri-devel mailing list