[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1277726097-24534-1-git-send-email-segooon@gmail.com>
Date: Mon, 28 Jun 2010 15:54:56 +0400
From: Kulikov Vasiliy <segooon@...il.com>
To: trivial@...nel.org
Cc: Kernel Janitors <kernel-janitors@...r.kernel.org>,
David Airlie <airlied@...ux.ie>, Eric Anholt <eric@...olt.net>,
Zhao Yakui <yakui.zhao@...el.com>,
Zhenyu Wang <zhenyuw@...ux.intel.com>,
Ma Ling <ling.ma@...el.com>,
Ian Romanick <ian.d.romanick@...el.com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH 04/16] trivial: use ARRAY_SIZE
Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
---
drivers/gpu/drm/i915/intel_sdvo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 76993ac..03c231b 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -392,13 +392,13 @@ static void intel_sdvo_debug_write(struct intel_encoder *intel_encoder, u8 cmd,
DRM_LOG_KMS("%02X ", ((u8 *)args)[i]);
for (; i < 8; i++)
DRM_LOG_KMS(" ");
- for (i = 0; i < sizeof(sdvo_cmd_names) / sizeof(sdvo_cmd_names[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(sdvo_cmd_names); i++) {
if (cmd == sdvo_cmd_names[i].cmd) {
DRM_LOG_KMS("(%s)", sdvo_cmd_names[i].name);
break;
}
}
- if (i == sizeof(sdvo_cmd_names)/ sizeof(sdvo_cmd_names[0]))
+ if (i == ARRAY_SIZE(sdvo_cmd_names))
DRM_LOG_KMS("(%02X)", cmd);
DRM_LOG_KMS("\n");
}
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists