PERFORCE change 152851 for review

Oleksandr Tymoshenko gonzo at FreeBSD.org
Tue Nov 11 22:05:59 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=152851

Change 152851 by gonzo at gonzo_jeeves on 2008/11/12 06:05:49

	Reduse a dozen of lines to one. I must have been bone tired when
	wrote this code.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/malta/gt_pci.c#6 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/malta/gt_pci.c#6 (text+ko) ====

@@ -457,21 +457,7 @@
 		*	Should we set the mode explicitly during chip
 		*	Initialization?
 		*/ 
-		switch(reg % 4)
-		{
-		case 3:
-			shift = 24;
-			break;
-		case 2:
-			shift = 16;
-			break;
-		case 1:
-			shift = 8;
-			break;
-		default:
-			shift = 0;
-			break;
-		}	
+		shift = 8 * (reg & 3);
 
 		switch(bytes)
 		{


More information about the p4-projects mailing list