All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]Fix for macro in agp.h
@ 2002-01-08 16:35 Nicolas Aspert
  0 siblings, 0 replies; only message in thread
From: Nicolas Aspert @ 2002-01-08 16:35 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: lkml

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

Hello

Here is a $0.02 patch that fixes the dirty 'A_IDX*' macros in agp.h. 
These were referring to a variable 'i' that is local to the routine 
where these macros are called (namely 'agp_generic_create_gatt_table' in 
'agpgart_be.c').
The patch is against 2.4.17
Thanks Phil Brown for pointing this one...

Best regards
-- 
Nicolas Aspert      Signal Processing Laboratory (LTS)
Swiss Federal Institute of Technology (EPFL)

[-- Attachment #2: patch-fix_A_IDX-2.4.17 --]
[-- Type: text/plain, Size: 1947 bytes --]

diff -Nru -x CVS -x tcp_diag.c linux-2.4.17.clean/drivers/char/agp/agp.h linux-2.4.17.dirty/drivers/char/agp/agp.h
--- linux-2.4.17.clean/drivers/char/agp/agp.h	Wed Dec 19 12:57:53 2001
+++ linux-2.4.17.dirty/drivers/char/agp/agp.h	Tue Jan  8 17:20:18 2002
@@ -143,11 +143,11 @@
 #define A_SIZE_32(x)	((aper_size_info_32 *) x)
 #define A_SIZE_LVL2(x)  ((aper_size_info_lvl2 *) x)
 #define A_SIZE_FIX(x)	((aper_size_info_fixed *) x)
-#define A_IDX8()	(A_SIZE_8(agp_bridge.aperture_sizes) + i)
-#define A_IDX16()	(A_SIZE_16(agp_bridge.aperture_sizes) + i)
-#define A_IDX32()	(A_SIZE_32(agp_bridge.aperture_sizes) + i)
-#define A_IDXLVL2()	(A_SIZE_LVL2(agp_bridge.aperture_sizes) + i)
-#define A_IDXFIX()	(A_SIZE_FIX(agp_bridge.aperture_sizes) + i)
+#define A_IDX8(idx)	(A_SIZE_8(agp_bridge.aperture_sizes) + (idx))
+#define A_IDX16(idx)	(A_SIZE_16(agp_bridge.aperture_sizes) + (idx))
+#define A_IDX32(idx)	(A_SIZE_32(agp_bridge.aperture_sizes) + (idx))
+#define A_IDXLVL2(idx)	(A_SIZE_LVL2(agp_bridge.aperture_sizes) + (idx))
+#define A_IDXFIX(idx)	(A_SIZE_FIX(agp_bridge.aperture_sizes) + (idx))
 #define MAXKEY		(4096 * 32)
 
 #define AGPGART_MODULE_NAME	"agpgart"
diff -Nru -x CVS -x tcp_diag.c linux-2.4.17.clean/drivers/char/agp/agpgart_be.c linux-2.4.17.dirty/drivers/char/agp/agpgart_be.c
--- linux-2.4.17.clean/drivers/char/agp/agpgart_be.c	Mon Jan  7 08:10:27 2002
+++ linux-2.4.17.dirty/drivers/char/agp/agpgart_be.c	Tue Jan  8 17:16:37 2002
@@ -586,13 +586,13 @@
 				i++;
 				switch (agp_bridge.size_type) {
 				case U8_APER_SIZE:
-					agp_bridge.current_size = A_IDX8();
+					agp_bridge.current_size = A_IDX8(i);
 					break;
 				case U16_APER_SIZE:
-					agp_bridge.current_size = A_IDX16();
+					agp_bridge.current_size = A_IDX16(i);
 					break;
 				case U32_APER_SIZE:
-					agp_bridge.current_size = A_IDX32();
+					agp_bridge.current_size = A_IDX32(i);
 					break;
 					/* This case will never really 
 					 * happen. 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-08 16:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-08 16:35 [PATCH]Fix for macro in agp.h Nicolas Aspert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.