PERFORCE change 96665 for review

Warner Losh imp at FreeBSD.org
Thu May 4 20:07:27 UTC 2006


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

Change 96665 by imp at imp_hammer on 2006/05/04 20:06:33

	More shaving...

Affected files ...

.. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#11 edit

Differences ...

==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#11 (text+ko) ====

@@ -41,7 +41,6 @@
 static void
 SendCommand(spiCommand_t *pCommand)
 {
-	unsigned	v;
 	AT91PS_SPI	pSPI = AT91C_BASE_SPI;
 
 	pSPI->SPI_PTCR = AT91C_PDC_TXTDIS | AT91C_PDC_RXTDIS;
@@ -59,7 +58,7 @@
 	pSPI->SPI_PTCR = AT91C_PDC_TXTEN | AT91C_PDC_RXTEN;
 
 	// wait for completion
-	while (!((v = pSPI->SPI_SR) & AT91C_SPI_SPENDRX))
+	while (!(pSPI->SPI_SR & AT91C_SPI_SPENDRX))
 		Delay(700);
 }
 
@@ -227,7 +226,6 @@
 	AT91PS_PIO	pPio;
 	AT91PS_SPI	pSPI = AT91C_BASE_SPI;
 	unsigned	value;
-	char		initStatus;
 
 	// enable CS0, CLK, MOSI, MISO
 	pPio = (AT91PS_PIO)AT91C_BASE_PIOA;
@@ -267,6 +265,6 @@
 	// Increment real time counter every SLCK
 	AT91C_BASE_ST->ST_RTMR = 1;
 
-	if (((initStatus = GetFlashStatus()) & 0xFC) != 0xBC)
-		printf(" Unexpected SPI flash status: 0x%x\r\n", initStatus);
+	if (((value = GetFlashStatus()) & 0xFC) != 0xBC)
+		printf(" Unexpected SPI flash status: 0x%x\r\n", value);
 }


More information about the p4-projects mailing list