lkml.org 
[lkml]   [2000]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Warning cleanup for agpgart_be.c [test3-7]
Date
There's not really a neat way of doing this, but this is as close as I
could get...

Rusty.
diff -urN -X /tmp/fileZ910DB --minimal linux-2.4.0-test3-7/drivers/char/agp/agpgart_be.c working-2.4.0-test3-7/drivers/char/agp/agpgart_be.c
--- linux-2.4.0-test3-7/drivers/char/agp/agpgart_be.c Thu Jun 29 01:25:39 2000
+++ working-2.4.0-test3-7/drivers/char/agp/agpgart_be.c Mon Jul 10 21:21:09 2000
@@ -46,6 +46,52 @@
#include <linux/agp_backend.h>
#include "agp.h"

+#ifdef CONFIG_AGP_INTEL
+#define NEED_AGP_GENERIC_AGP_ENABLE
+#define NEED_AGP_GENERIC_CREATE_GATT_TABLE
+#define NEED_AGP_GENERIC_FREE_GATT_TABLE
+#define NEED_AGP_GENERIC_INSERT_MEMORY
+#define NEED_AGP_GENERIC_REMOVE_MEMORY
+#define NEED_AGP_GENERIC_ALLOC_BY_TYPE
+#define NEED_AGP_GENERIC_FREE_BY_TYPE
+#endif /* CONFIG_AGP_INTEL */
+
+#ifdef CONFIG_AGP_VIA
+#define NEED_AGP_GENERIC_AGP_ENABLE
+#define NEED_AGP_GENERIC_CREATE_GATT_TABLE
+#define NEED_AGP_GENERIC_FREE_GATT_TABLE
+#define NEED_AGP_GENERIC_INSERT_MEMORY
+#define NEED_AGP_GENERIC_REMOVE_MEMORY
+#define NEED_AGP_GENERIC_ALLOC_BY_TYPE
+#define NEED_AGP_GENERIC_FREE_BY_TYPE
+#endif /* CONFIG_AGP_VIA */
+
+#ifdef CONFIG_AGP_SIS
+#define NEED_AGP_GENERIC_AGP_ENABLE
+#define NEED_AGP_GENERIC_CREATE_GATT_TABLE
+#define NEED_AGP_GENERIC_FREE_GATT_TABLE
+#define NEED_AGP_GENERIC_INSERT_MEMORY
+#define NEED_AGP_GENERIC_REMOVE_MEMORY
+#define NEED_AGP_GENERIC_ALLOC_BY_TYPE
+#define NEED_AGP_GENERIC_FREE_BY_TYPE
+#endif /* CONFIG_AGP_SIS */
+
+#ifdef CONFIG_AGP_AMD
+#define NEED_AGP_GENERIC_AGP_ENABLE
+#define NEED_AGP_GENERIC_ALLOC_BY_TYPE
+#define NEED_AGP_GENERIC_FREE_BY_TYPE
+#endif /* CONFIG_AGP_AMD */
+
+#ifdef CONFIG_AGP_ALI
+#define NEED_AGP_GENERIC_AGP_ENABLE
+#define NEED_AGP_GENERIC_CREATE_GATT_TABLE
+#define NEED_AGP_GENERIC_FREE_GATT_TABLE
+#define NEED_AGP_GENERIC_INSERT_MEMORY
+#define NEED_AGP_GENERIC_REMOVE_MEMORY
+#define NEED_AGP_GENERIC_ALLOC_BY_TYPE
+#define NEED_AGP_GENERIC_FREE_BY_TYPE
+#endif /* CONFIG_AGP_ALI */
+
MODULE_AUTHOR("Jeff Hartmann <jhartmann@precisioninsight.com>");
MODULE_PARM(agp_try_unsupported, "1i");
EXPORT_SYMBOL(agp_free_memory);
@@ -404,8 +450,9 @@
* SiS chipsets.
*/

-/* Generic Agp routines - Start */

+#ifdef NEED_AGP_GENERIC_AGP_ENABLE
+/* Generic Agp routines - Start */
static void agp_generic_agp_enable(u32 mode)
{
struct pci_dev *device = NULL;
@@ -531,7 +578,9 @@
pci_write_config_dword(device, cap_ptr + 8, command);
}
}
+#endif /* NEED_AGP_GENERIC_AGP_ENABLE */

+#ifdef NEED_AGP_GENERIC_CREATE_GATT_TABLE
static int agp_generic_create_gatt_table(void)
{
char *table;
@@ -650,7 +699,9 @@

return 0;
}
+#endif /* NEED_AGP_GENERIC_CREATE_GATT_TABLE */

+#ifdef NEED_AGP_GENERIC_FREE_GATT_TABLE
static int agp_generic_free_gatt_table(void)
{
int i;
@@ -698,7 +749,9 @@
free_pages((unsigned long) agp_bridge.gatt_table_real, page_order);
return 0;
}
+#endif /* NEED_AGP_GENERIC_FREE_GATT_TABLE */

+#ifdef NEED_AGP_GENERIC_INSERT_MEMORY
static int agp_generic_insert_memory(agp_memory * mem,
off_t pg_start, int type)
{
@@ -756,7 +809,9 @@
agp_bridge.tlb_flush(mem);
return 0;
}
+#endif /* NEED_AGP_GENERIC_INSERT_MEMORY */

+#ifdef NEED_AGP_GENERIC_REMOVE_MEMORY
static int agp_generic_remove_memory(agp_memory * mem, off_t pg_start,
int type)
{
@@ -774,12 +829,16 @@
agp_bridge.tlb_flush(mem);
return 0;
}
+#endif /* NEED_AGP_GENERIC_REMOVE_MEMORY */

+#ifdef NEED_AGP_GENERIC_ALLOC_BY_TYPE
static agp_memory *agp_generic_alloc_by_type(size_t page_count, int type)
{
return NULL;
}
+#endif /* NEED_AGP_GENERIC_ALLOC_BY_TYPE */

+#ifdef NEED_AGP_GENERIC_FREE_BY_TYPE
static void agp_generic_free_by_type(agp_memory * curr)
{
if (curr->memory != NULL) {
@@ -788,6 +847,7 @@
agp_free_key(curr->key);
kfree(curr);
}
+#endif /* NEED_AGP_GENERIC_FREE_BY_TYPE */

void agp_enable(u32 mode)
{
--
Hacking time.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.046 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site