diff --git a/spi.c b/spi.c
index fa29fb6..dcd9f19 100644
--- a/spi.c
+++ b/spi.c
@@ -150,8 +150,8 @@
 static int probe_spi_rdid_generic(struct flashchip *flash, int bytes)
 {
 	unsigned char readarr[4];
-	uint32_t manuf_id;
-	uint32_t model_id;
+	uint32_t id1;
+	uint32_t id2;
 
 	if (spi_rdid(readarr, bytes))
 		return 0;
@@ -163,21 +163,20 @@
 	if (readarr[0] == 0x7f) {
 		if (!oddparity(readarr[1]))
 			printf_debug("RDID byte 1 parity violation.\n");
-		manuf_id = (readarr[0] << 8) | readarr[1];
-		model_id = readarr[2];
+		id1 = (readarr[0] << 8) | readarr[1];
+		id2 = readarr[2];
 		if (bytes > 3) {
-			model_id <<= 8;
-			model_id |= readarr[3];
+			id2 <<= 8;
+			id2 |= readarr[3];
 		}
 	} else {
-		manuf_id = readarr[0];
-		model_id = (readarr[1] << 8) | readarr[2];
+		id1 = readarr[0];
+		id2 = (readarr[1] << 8) | readarr[2];
 	}
 
-	printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, manuf_id,
-		     model_id);
+	printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
 
-	if (manuf_id == flash->manufacture_id && model_id == flash->model_id) {
+	if (id1 == flash->manufacture_id && id2 == flash->model_id) {
 		/* Print the status register to tell the
 		 * user about possible write protection.
 		 */
@@ -187,7 +186,7 @@
 	}
 
 	/* Test if this is a pure vendor match. */
-	if (manuf_id == flash->manufacture_id &&
+	if (id1 == flash->manufacture_id &&
 	    GENERIC_DEVICE_ID == flash->model_id)
 		return 1;
 
@@ -221,18 +220,17 @@
 int probe_spi_rems(struct flashchip *flash)
 {
 	unsigned char readarr[JEDEC_REMS_INSIZE];
-	uint32_t manuf_id, model_id;
+	uint32_t id1, id2;
 
 	if (spi_rems(readarr))
 		return 0;
 
-	manuf_id = readarr[0];
-	model_id = readarr[1];
+	id1 = readarr[0];
+	id2 = readarr[1];
 
-	printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, manuf_id,
-		     model_id);
+	printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, id1, id2);
 
-	if (manuf_id == flash->manufacture_id && model_id == flash->model_id) {
+	if (id1 == flash->manufacture_id && id2 == flash->model_id) {
 		/* Print the status register to tell the
 		 * user about possible write protection.
 		 */
@@ -242,7 +240,7 @@
 	}
 
 	/* Test if this is a pure vendor match. */
-	if (manuf_id == flash->manufacture_id &&
+	if (id1 == flash->manufacture_id &&
 	    GENERIC_DEVICE_ID == flash->model_id)
 		return 1;
 
@@ -252,7 +250,7 @@
 int probe_spi_res(struct flashchip *flash)
 {
 	unsigned char readarr[3];
-	uint32_t model_id;
+	uint32_t id2;
 
 	/* Check if RDID was successful and did not return 0xff 0xff 0xff.
 	 * In that case, RES is pointless.
@@ -264,9 +262,9 @@
 	if (spi_res(readarr))
 		return 0;
 
-	model_id = readarr[0];
-	printf_debug("%s: id 0x%x\n", __FUNCTION__, model_id);
-	if (model_id != flash->model_id)
+	id2 = readarr[0];
+	printf_debug("%s: id 0x%x\n", __FUNCTION__, id2);
+	if (id2 != flash->model_id)
 		return 0;
 
 	/* Print the status register to tell the
diff --git a/w39v080fa.c b/w39v080fa.c
index 36abbfd..ba4673a 100644
--- a/w39v080fa.c
+++ b/w39v080fa.c
@@ -23,7 +23,7 @@
 int probe_winbond_fwhub(struct flashchip *flash)
 {
 	chipaddr bios = flash->virtual_memory;
-	uint8_t vid, did;
+	uint8_t id1, id2;
 
 	/* Product Identification Entry */
 	chip_writeb(0xAA, bios + 0x5555);
@@ -32,8 +32,8 @@
 	myusec_delay(10);
 
 	/* Read product ID */
-	vid = chip_readb(bios);
-	did = chip_readb(bios + 0x01);
+	id1 = chip_readb(bios);
+	id2 = chip_readb(bios + 0x01);
 
 	/* Product Identifixation Exit */
 	chip_writeb(0xAA, bios + 0x5555);
@@ -41,9 +41,9 @@
 	chip_writeb(0xF0, bios + 0x5555);
 	myusec_delay(10);
 
-	printf_debug("%s: vid 0x%x, did 0x%x\n", __FUNCTION__, vid, did);
+	printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, id1, id2);
 
-	if (vid != flash->manufacture_id || did != flash->model_id)
+	if (id1 != flash->manufacture_id || id2 != flash->model_id)
 		return 0;
 
 	map_flash_registers(flash);
