Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2008 06:05:58 GMT
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 152851 for review
Message-ID:  <200811120605.mAC65wBu047949@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152851

Change 152851 by gonzo@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)
 		{



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811120605.mAC65wBu047949>