diff --git a/jedec.c b/jedec.c
index 5c71980..0e426d6 100644
--- a/jedec.c
+++ b/jedec.c
@@ -99,7 +99,7 @@
 		probe_timing_enter = probe_timing_exit = 0;
 	} else if (flash->probe_timing == TIMING_FIXME) { /* == _IGNORED */
 		printf_debug("Chip lacks correct probe timing information, "
-			     "using default 10mS/40uS\n");
+			     "using default 10mS/40uS. ");
 		probe_timing_enter = 10000;
 		probe_timing_exit = 40;
 	} else {
diff --git a/spi.c b/spi.c
index 09cfc90..8d82c4e 100644
--- a/spi.c
+++ b/spi.c
@@ -163,7 +163,7 @@
 	printf_debug("RDID returned");
 	for (i = 0; i < bytes; i++)
 		printf_debug(" 0x%02x", readarr[i]);
-	printf_debug("\n");
+	printf_debug(". ");
 	return 0;
 }
 
@@ -184,7 +184,7 @@
 	}
 	if (ret)
 		return ret;
-	printf_debug("REMS returned %02x %02x.\n", readarr[0], readarr[1]);
+	printf_debug("REMS returned %02x %02x. ", readarr[0], readarr[1]);
 	return 0;
 }
 
@@ -205,7 +205,7 @@
 	}
 	if (ret)
 		return ret;
-	printf_debug("RES returned %02x.\n", readarr[0]);
+	printf_debug("RES returned %02x. ", readarr[0]);
 	return 0;
 }
 
@@ -218,7 +218,7 @@
 	result = spi_send_command(sizeof(cmd), 0, cmd, NULL);
 
 	if (result)
-		printf_debug("%s failed\n", __func__);
+		fprintf(stderr, "%s failed\n", __func__);
 
 	return result;
 }
@@ -241,12 +241,12 @@
 		return 0;
 
 	if (!oddparity(readarr[0]))
-		printf_debug("RDID byte 0 parity violation.\n");
+		printf_debug("RDID byte 0 parity violation. ");
 
 	/* Check if this is a continuation vendor ID */
 	if (readarr[0] == 0x7f) {
 		if (!oddparity(readarr[1]))
-			printf_debug("RDID byte 1 parity violation.\n");
+			printf_debug("RDID byte 1 parity violation. ");
 		id1 = (readarr[0] << 8) | readarr[1];
 		id2 = readarr[2];
 		if (bytes > 3) {
@@ -373,7 +373,7 @@
 	}
 	ret = spi_send_command(sizeof(cmd), sizeof(readarr), cmd, readarr);
 	if (ret)
-		printf_debug("RDSR failed!\n");
+		fprintf(stderr, "RDSR failed!\n");
 
 	return readarr[0];
 }
@@ -506,13 +506,14 @@
 	
 	result = spi_disable_blockprotect();
 	if (result) {
-		printf_debug("spi_disable_blockprotect failed\n");
+		fprintf(stderr, "spi_disable_blockprotect failed\n");
 		return result;
 	}
 	
 	result = spi_send_multicommand(spicommands);
 	if (result) {
-		printf_debug("%s failed during command execution\n", __func__);
+		fprintf(stderr, "%s failed during command execution\n",
+			__func__);
 		return result;
 	}
 	/* Wait until the Write-In-Progress bit is cleared.
@@ -551,13 +552,13 @@
 
 	result = spi_disable_blockprotect();
 	if (result) {
-		printf_debug("spi_disable_blockprotect failed\n");
+		fprintf(stderr, "spi_disable_blockprotect failed\n");
 		return result;
 	}
 
 	result = spi_send_multicommand(spicommands);
 	if (result) {
-		printf_debug("%s failed during command execution\n", __func__);
+		fprintf(stderr, "%s failed during command execution\n", __func__);
 		return result;
 	}
 	/* Wait until the Write-In-Progress bit is cleared.
@@ -607,7 +608,8 @@
 
 	result = spi_send_multicommand(spicommands);
 	if (result) {
-		printf_debug("%s failed during command execution\n", __func__);
+		fprintf(stderr, "%s failed during command execution\n",
+			__func__);
 		return result;
 	}
 	/* Wait until the Write-In-Progress bit is cleared.
@@ -650,7 +652,7 @@
 
 	result = spi_send_multicommand(spicommands);
 	if (result) {
-		printf_debug("%s failed during command execution\n", __func__);
+		fprintf(stderr, "%s failed during command execution\n", __func__);
 		return result;
 	}
 	/* Wait until the Write-In-Progress bit is cleared.
@@ -678,7 +680,7 @@
 	for (i = 0; i < total_size / erase_size; i++) {
 		rc = spi_block_erase_d8(flash, i * erase_size, erase_size);
 		if (rc) {
-			printf("Error erasing block at 0x%x\n", i);
+			fprintf(stderr, "Error erasing block at 0x%x\n", i);
 			break;
 		}
 	}
@@ -712,7 +714,8 @@
 
 	result = spi_send_multicommand(spicommands);
 	if (result) {
-		printf_debug("%s failed during command execution\n", __func__);
+		fprintf(stderr, "%s failed during command execution\n",
+			__func__);
 		return result;
 	}
 	/* Wait until the Write-In-Progress bit is cleared.
@@ -730,7 +733,8 @@
 int spi_block_erase_60(struct flashchip *flash, unsigned int addr, unsigned int blocklen)
 {
 	if ((addr != 0) || (blocklen != flash->total_size * 1024)) {
-		fprintf(stderr, "%s called with incorrect arguments\n", __func__);
+		fprintf(stderr, "%s called with incorrect arguments\n",
+			__func__);
 		return -1;
 	}
 	return spi_chip_erase_60(flash);
@@ -739,7 +743,8 @@
 int spi_block_erase_c7(struct flashchip *flash, unsigned int addr, unsigned int blocklen)
 {
 	if ((addr != 0) || (blocklen != flash->total_size * 1024)) {
-		fprintf(stderr, "%s called with incorrect arguments\n", __func__);
+		fprintf(stderr, "%s called with incorrect arguments\n",
+			__func__);
 		return -1;
 	}
 	return spi_chip_erase_c7(flash);
@@ -754,7 +759,7 @@
 	result = spi_send_command(sizeof(cmd), JEDEC_EWSR_INSIZE, cmd, NULL);
 
 	if (result)
-		printf_debug("%s failed\n", __func__);
+		fprintf(stderr, "%s failed\n", __func__);
 
 	return result;
 }
@@ -786,7 +791,8 @@
 
 	result = spi_send_multicommand(spicommands);
 	if (result) {
-		printf_debug("%s failed during command execution\n", __func__);
+		fprintf(stderr, "%s failed during command execution\n",
+			__func__);
 	}
 	return result;
 }
@@ -814,7 +820,8 @@
 
 	result = spi_send_multicommand(spicommands);
 	if (result) {
-		printf_debug("%s failed during command execution\n", __func__);
+		fprintf(stderr, "%s failed during command execution\n",
+			__func__);
 	}
 	return result;
 }
@@ -848,11 +855,11 @@
 	}};
 
 	if (!len) {
-		printf_debug ("%s called for zero-length write\n", __func__);
+		fprintf(stderr, "%s called for zero-length write\n", __func__);
 		return 1;
 	}
 	if (len > 256) {
-		printf_debug ("%s called for too long a write\n", __func__);
+		fprintf(stderr, "%s called for too long a write\n", __func__);
 		return 1;
 	}
 
@@ -860,7 +867,8 @@
 
 	result = spi_send_multicommand(spicommands);
 	if (result) {
-		printf_debug("%s failed during command execution\n", __func__);
+		fprintf(stderr, "%s failed during command execution\n",
+			__func__);
 	}
 	return result;
 }
@@ -876,7 +884,7 @@
 		printf_debug("Some block protection in effect, disabling\n");
 		result = spi_write_status_register(status & ~0x3c);
 		if (result) {
-			printf_debug("spi_write_status_register failed\n");
+			fprintf(stderr, "spi_write_status_register failed\n");
 			return result;
 		}
 	}
diff --git a/w29ee011.c b/w29ee011.c
index 77724be..a26cd80 100644
--- a/w29ee011.c
+++ b/w29ee011.c
@@ -28,11 +28,10 @@
 	extern char *chip_to_probe;
 
 	if (!chip_to_probe || strcmp(chip_to_probe, "W29EE011")) {
-		printf_debug("\n===\n");
-		printf_debug("  Probing disabled for Winbond W29EE011 because the probing sequence puts the\n");
-		printf_debug("  AMIC A49LF040A in a funky state.\n");
-		printf_debug("  Use 'flashrom -c W29EE011' if you have a board with this chip.");
-		printf_debug("\n===\n");
+		printf_debug("Probing disabled for Winbond W29EE011 because "
+			     "the probing sequence puts the AMIC A49LF040A in "
+			     "a funky state. Use 'flashrom -c W29EE011' if you "
+			     "have a board with this chip.\n");
 		return 0;
 	}
 
