[PATCH 05/16] trivial: use ARRAY_SIZE
Jiri Kosina
jkosina at suse.cz
Tue Jul 20 08:14:52 PDT 2010
On Mon, 28 Jun 2010, Kulikov Vasiliy wrote:
> Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
>
> Signed-off-by: Kulikov Vasiliy <segooon at gmail.com>
> ---
> drivers/gpu/drm/i915/intel_tv.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
> index 6d553c2..d2d4e40 100644
> --- a/drivers/gpu/drm/i915/intel_tv.c
> +++ b/drivers/gpu/drm/i915/intel_tv.c
> @@ -1424,7 +1424,7 @@ intel_tv_get_modes(struct drm_connector *connector)
> int j, count = 0;
> u64 tmp;
>
> - for (j = 0; j < sizeof(input_res_table) / sizeof(input_res_table[0]);
> + for (j = 0; j < ARRAY_SIZE(input_res_table);
> j++) {
> struct input_res *input = &input_res_table[j];
Folded into the sdvo change you did and applied.
--
Jiri Kosina
SUSE Labs, Novell Inc.
More information about the dri-devel
mailing list