Skip to contentSkip to conversation

suspect code in drivers/char/agp/generic.c

DISCUSSION Jeremy Fitzhardinge 2 participants 2 messages Aug 12, 2005

lore
Share & tools
lore
#0 lore raw

I was just looking at agp_copy_info(), which contains this code:

   318 	if (bridge->mode & AGPSTAT_MODE_3_0)
   319 		info->mode = bridge->mode & ~AGP3_RESERVED_MASK;
   320 	else
   321 		info->mode = bridge->mode & ~AGP2_RESERVED_MASK;
   322 	info->mode = bridge->mode;

This looks wrong to me, since line 322 overrides the previous 4 lines' work...

I have no idea whether this is actually causing a problem, but I'd thought I'd call attention to it.

J

#1 lore raw
Quoted 8 lines · Jeremy Fitzhardinge

I was just looking at agp_copy_info(), which contains this code:

   318 	if (bridge->mode & AGPSTAT_MODE_3_0)
   319 		info->mode = bridge->mode & ~AGP3_RESERVED_MASK;
   320 	else
   321 		info->mode = bridge->mode & ~AGP2_RESERVED_MASK;
   322 	info->mode = bridge->mode;
Quoted 5 lines

This looks wrong to me, since line 322 overrides the previous 4 lines' work...

I have no idea whether this is actually causing a problem, but I'd thought I'd call attention to it.

Ugh, that crept in when the multiple gart support got added. Line 322 shouldn't be there. I'll nuke it in agpgart.git

Whilst its clearly wrong, I'd like the corrected version to take a quick spin in -mm before we add this to 2.6.13, just in case.

Dave