public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Aspert <Nicolas.Aspert@epfl.ch>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH]Fix for macro in agp.h
Date: Tue, 08 Jan 2002 17:35:14 +0100	[thread overview]
Message-ID: <3C3B1FC2.6050103@epfl.ch> (raw)

[-- 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. 

                 reply	other threads:[~2002-01-08 16:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C3B1FC2.6050103@epfl.ch \
    --to=nicolas.aspert@epfl.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox