[PATCH 2.6.20] drm: Use ARRAY_SIZE macro when appropriate

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <airlied@...>
Cc: <linux-kernel@...>, <dri-devel@...>
Date: Tuesday, February 6, 2007 - 12:10 pm

Hi all,

A patch to use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
---
diff --git a/drivers/char/drm/drm_proc.c b/drivers/char/drm/drm_proc.c
index 62d5fe1..8943ad1 100644
--- a/drivers/char/drm/drm_proc.c
+++ b/drivers/char/drm/drm_proc.c
@@ -72,7 +72,7 @@ static struct drm_proc_list {
 #endif
 };
 
-#define DRM_PROC_ENTRIES (sizeof(drm_proc_list)/sizeof(drm_proc_list[0]))
+#define DRM_PROC_ENTRIES ARRAY_SIZE(drm_proc_list)
 
 /**
  * Initialize the DRI proc filesystem for a device.


-- 
Ahmed S. Darwish
http://darwish-07.blogspot.com
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00] A series of patches to use ARRAY_SIZE macro, Ahmed S. Darwish, (Tue Feb 6, 12:02 pm)
[PATCH 2.6.20] w1: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 12:09 pm)
Re: [PATCH 2.6.20] w1: Use ARRAY_SIZE macro when appropriate, Evgeniy Polyakov, (Tue Feb 6, 12:19 pm)
[PATCH 2.6.20] drm: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 12:10 pm)
[PATCH 2.6.20] atm: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 12:06 pm)
[PATCH 2.6.20 2/2] OSS: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 12:05 pm)
[PATCH 2.6.20 1/2] OSS: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 12:05 pm)
Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appr..., Philippe De Muyter, (Tue Feb 6, 5:18 pm)
Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appr..., Kai Germaschewski, (Thu Feb 8, 12:02 pm)
Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appr..., Philippe De Muyter, (Wed Feb 7, 5:02 pm)
[PATCH 2.6.20] KVM: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 12:03 pm)
[PATCH 2.6.20] DVB: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 12:03 pm)