]> git.neil.brown.name Git - history.git/commitdiff
[AGPGART] Fix up lots of 'comparison between signed and unsigned' warnings
authorDave Jones <davej@tetrachloride.(none)>
Mon, 10 Feb 2003 16:52:09 +0000 (15:52 -0100)
committerDave Jones <davej@tetrachloride.(none)>
Mon, 10 Feb 2003 16:52:09 +0000 (15:52 -0100)
drivers/char/agp/frontend.c
drivers/char/agp/generic.c

index 3c99ca81574dcb6eeb0d50e5fe5e90cc7a9c3495..1b1eb18dd8ad8b145f5d33a3b65487873a3a3d1c 100644 (file)
@@ -97,7 +97,9 @@ static agp_segment_priv *agp_find_seg_in_client(const agp_client * client,
                                            int size, pgprot_t page_prot)
 {
        agp_segment_priv *seg;
-       int num_segments, pg_start, pg_count, i;
+       int num_segments, i;
+       off_t pg_start;
+       size_t pg_count;
 
        pg_start = offset / 4096;
        pg_count = size / 4096;
@@ -174,7 +176,7 @@ static int agp_create_segment(agp_client * client, agp_region * region)
        agp_segment_priv **ret_seg;
        agp_segment_priv *seg;
        agp_segment *user_seg;
-       int i;
+       size_t i;
 
        seg = kmalloc((sizeof(agp_segment_priv) * region->seg_count), GFP_KERNEL);
        if (seg == NULL) {
@@ -578,8 +580,7 @@ static int agp_remove_client(pid_t id)
 
 static int agp_mmap(struct file *file, struct vm_area_struct *vma)
 {
-       int size;
-       int current_size;
+       unsigned int size, current_size;
        unsigned long offset;
        agp_client *client;
        agp_file_private *priv = (agp_file_private *) file->private_data;
index 7dcf979196d88b9d737e1bf76d6e62b00df96f9a..92fa483f4c5f44bd9a50e9e9c14ef9d328647ce2 100644 (file)
@@ -96,7 +96,7 @@ agp_memory *agp_create_memory(int scratch_pages)
 
 void agp_free_memory(agp_memory * curr)
 {
-       int i;
+       size_t i;
 
        if ((agp_bridge.type == NOT_SUPPORTED) || (curr == NULL))
                return;
@@ -124,7 +124,7 @@ agp_memory *agp_allocate_memory(size_t page_count, u32 type)
 {
        int scratch_pages;
        agp_memory *new;
-       int i;
+       size_t i;
 
        if (agp_bridge.type == NOT_SUPPORTED)
                return NULL;
@@ -585,7 +585,9 @@ int agp_generic_free_gatt_table(void)
 
 int agp_generic_insert_memory(agp_memory * mem, off_t pg_start, int type)
 {
-       int i, j, num_entries;
+       int num_entries;
+       size_t i;
+       off_t j;
        void *temp;
 
        temp = agp_bridge.current_size;
@@ -648,7 +650,7 @@ int agp_generic_insert_memory(agp_memory * mem, off_t pg_start, int type)
 
 int agp_generic_remove_memory(agp_memory * mem, off_t pg_start, int type)
 {
-       int i;
+       size_t i;
 
        if (type != 0 || mem->type != 0) {
                /* The generic routines know nothing of memory types */