lkml.org 
[lkml]   [2007]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[PATCH 2.6.20] intel-agp: Use ARRAY_SIZE macro when appropriate
    From
    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/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
    index ab0a9c0..7233310 100644
    --- a/drivers/char/agp/intel-agp.c
    +++ b/drivers/char/agp/intel-agp.c
    @@ -5,6 +5,7 @@
    #include <linux/module.h>
    #include <linux/pci.h>
    #include <linux/init.h>
    +#include <linux/kernel.h>
    #include <linux/pagemap.h>
    #include <linux/agp_backend.h>
    #include "agp.h"
    @@ -803,7 +804,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
    */
    static int intel_i9xx_fetch_size(void)
    {
    - int num_sizes = sizeof(intel_i830_sizes) / sizeof(*intel_i830_sizes);
    + int num_sizes = ARRAY_SIZE(intel_i830_sizes);
    int aper_size; /* size in megabytes */
    int i;


    --
    Ahmed S. Darwish
    http://darwish-07.blogspot.com
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-02-06 17:15    [W:0.022 / U:0.848 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site