Commit 9fc785f1 authored by Corentin Labbe's avatar Corentin Labbe Committed by Dave Airlie

agp: remove unused variable size in agp_generic_create_gatt_table

This patch fix the following warning:
drivers/char/agp/generic.c:853:6: attention : variable ‘size’ set but not used [-Wunused-but-set-variable]
by removing the unused variable size in agp_generic_create_gatt_table
Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1574324085-4338-2-git-send-email-clabbe@baylibre.com
parent 909a6065
...@@ -850,7 +850,6 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge) ...@@ -850,7 +850,6 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
{ {
char *table; char *table;
char *table_end; char *table_end;
int size;
int page_order; int page_order;
int num_entries; int num_entries;
int i; int i;
...@@ -864,25 +863,22 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge) ...@@ -864,25 +863,22 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
table = NULL; table = NULL;
i = bridge->aperture_size_idx; i = bridge->aperture_size_idx;
temp = bridge->current_size; temp = bridge->current_size;
size = page_order = num_entries = 0; page_order = num_entries = 0;
if (bridge->driver->size_type != FIXED_APER_SIZE) { if (bridge->driver->size_type != FIXED_APER_SIZE) {
do { do {
switch (bridge->driver->size_type) { switch (bridge->driver->size_type) {
case U8_APER_SIZE: case U8_APER_SIZE:
size = A_SIZE_8(temp)->size;
page_order = page_order =
A_SIZE_8(temp)->page_order; A_SIZE_8(temp)->page_order;
num_entries = num_entries =
A_SIZE_8(temp)->num_entries; A_SIZE_8(temp)->num_entries;
break; break;
case U16_APER_SIZE: case U16_APER_SIZE:
size = A_SIZE_16(temp)->size;
page_order = A_SIZE_16(temp)->page_order; page_order = A_SIZE_16(temp)->page_order;
num_entries = A_SIZE_16(temp)->num_entries; num_entries = A_SIZE_16(temp)->num_entries;
break; break;
case U32_APER_SIZE: case U32_APER_SIZE:
size = A_SIZE_32(temp)->size;
page_order = A_SIZE_32(temp)->page_order; page_order = A_SIZE_32(temp)->page_order;
num_entries = A_SIZE_32(temp)->num_entries; num_entries = A_SIZE_32(temp)->num_entries;
break; break;
...@@ -890,7 +886,7 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge) ...@@ -890,7 +886,7 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
case FIXED_APER_SIZE: case FIXED_APER_SIZE:
case LVL2_APER_SIZE: case LVL2_APER_SIZE:
default: default:
size = page_order = num_entries = 0; page_order = num_entries = 0;
break; break;
} }
...@@ -920,7 +916,6 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge) ...@@ -920,7 +916,6 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
} }
} while (!table && (i < bridge->driver->num_aperture_sizes)); } while (!table && (i < bridge->driver->num_aperture_sizes));
} else { } else {
size = ((struct aper_size_info_fixed *) temp)->size;
page_order = ((struct aper_size_info_fixed *) temp)->page_order; page_order = ((struct aper_size_info_fixed *) temp)->page_order;
num_entries = ((struct aper_size_info_fixed *) temp)->num_entries; num_entries = ((struct aper_size_info_fixed *) temp)->num_entries;
table = alloc_gatt_pages(page_order); table = alloc_gatt_pages(page_order);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment