m68k: Atari SCSI driver compile fixes

Atari SCSI driver compile fixes

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index 81e4f56..c912733 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -272,8 +272,9 @@
 	(struct NCR5380_hostdata *)(in)->hostdata
 #define	HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata)
 
-#define	NEXT(cmd)	((cmd)->host_scribble)
-#define	NEXTADDR(cmd)	((Scsi_Cmnd **)&((cmd)->host_scribble))
+#define	NEXT(cmd)		((Scsi_Cmnd *)(cmd)->host_scribble)
+#define	SET_NEXT(cmd,next)	((cmd)->host_scribble = (void *)(next))
+#define	NEXTADDR(cmd)		((Scsi_Cmnd **)&(cmd)->host_scribble)
 
 #define	HOSTNO		instance->host_no
 #define	H_NO(cmd)	(cmd)->device->host->host_no
@@ -479,7 +480,7 @@
 	     virt_to_phys(page_address(cmd->SCp.buffer[1].page) +
 			  cmd->SCp.buffer[1].offset) == endaddr;) {
 		MER_PRINTK("VTOP(%p) == %08lx -> merging\n",
-			   cmd->SCp.buffer[1].address, endaddr);
+			   page_address(cmd->SCp.buffer[1].page), endaddr);
 #if (NDEBUG & NDEBUG_MERGING)
 		++cnt;
 #endif
@@ -1002,7 +1003,7 @@
 	 * in a queue
 	 */
 
-	NEXT(cmd) = NULL;
+	SET_NEXT(cmd, NULL);
 	cmd->scsi_done = done;
 
 	cmd->result = 0;
@@ -1034,14 +1035,14 @@
 	}
 	if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) {
 		LIST(cmd, hostdata->issue_queue);
-		NEXT(cmd) = hostdata->issue_queue;
+		SET_NEXT(cmd, hostdata->issue_queue);
 		hostdata->issue_queue = cmd;
 	} else {
 		for (tmp = (Scsi_Cmnd *)hostdata->issue_queue;
 		     NEXT(tmp); tmp = NEXT(tmp))
 			;
 		LIST(cmd, tmp);
-		NEXT(tmp) = cmd;
+		SET_NEXT(tmp, cmd);
 	}
 	local_irq_restore(flags);
 
@@ -1149,12 +1150,12 @@
 					local_irq_disable();
 					if (prev) {
 						REMOVE(prev, NEXT(prev), tmp, NEXT(tmp));
-						NEXT(prev) = NEXT(tmp);
+						SET_NEXT(prev, NEXT(tmp));
 					} else {
 						REMOVE(-1, hostdata->issue_queue, tmp, NEXT(tmp));
 						hostdata->issue_queue = NEXT(tmp);
 					}
-					NEXT(tmp) = NULL;
+					SET_NEXT(tmp, NULL);
 					falcon_dont_release++;
 
 					/* reenable interrupts after finding one */
@@ -1192,7 +1193,7 @@
 					} else {
 						local_irq_disable();
 						LIST(tmp, hostdata->issue_queue);
-						NEXT(tmp) = hostdata->issue_queue;
+						SET_NEXT(tmp, hostdata->issue_queue);
 						hostdata->issue_queue = tmp;
 #ifdef SUPPORT_TAGS
 						cmd_free_tag(tmp);
@@ -2295,7 +2296,7 @@
 
 						local_irq_save(flags);
 						LIST(cmd,hostdata->issue_queue);
-						NEXT(cmd) = hostdata->issue_queue;
+						SET_NEXT(cmd, hostdata->issue_queue);
 						hostdata->issue_queue = (Scsi_Cmnd *) cmd;
 						local_irq_restore(flags);
 						QU_PRINTK("scsi%d: REQUEST SENSE added to head of "
@@ -2357,7 +2358,7 @@
 					local_irq_save(flags);
 					cmd->device->disconnect = 1;
 					LIST(cmd,hostdata->disconnected_queue);
-					NEXT(cmd) = hostdata->disconnected_queue;
+					SET_NEXT(cmd, hostdata->disconnected_queue);
 					hostdata->connected = NULL;
 					hostdata->disconnected_queue = cmd;
 					local_irq_restore(flags);
@@ -2632,12 +2633,12 @@
 			falcon_dont_release++;
 			if (prev) {
 				REMOVE(prev, NEXT(prev), tmp, NEXT(tmp));
-				NEXT(prev) = NEXT(tmp);
+				SET_NEXT(prev, NEXT(tmp));
 			} else {
 				REMOVE(-1, hostdata->disconnected_queue, tmp, NEXT(tmp));
 				hostdata->disconnected_queue = NEXT(tmp);
 			}
-			NEXT(tmp) = NULL;
+			SET_NEXT(tmp, NULL);
 			break;
 		}
 	}
@@ -2769,7 +2770,7 @@
 		if (cmd == tmp) {
 			REMOVE(5, *prev, tmp, NEXT(tmp));
 			(*prev) = NEXT(tmp);
-			NEXT(tmp) = NULL;
+			SET_NEXT(tmp, NULL);
 			tmp->result = DID_ABORT << 16;
 			local_irq_restore(flags);
 			ABRT_PRINTK("scsi%d: abort removed command from issue queue.\n",
@@ -2844,7 +2845,7 @@
 				if (cmd == tmp) {
 					REMOVE(5, *prev, tmp, NEXT(tmp));
 					*prev = NEXT(tmp);
-					NEXT(tmp) = NULL;
+					SET_NEXT(tmp, NULL);
 					tmp->result = DID_ABORT << 16;
 					/* We must unlock the tag/LUN immediately here, since the
 					 * target goes to BUS FREE and doesn't send us another
@@ -2965,7 +2966,7 @@
 
 	for (i = 0; (cmd = disconnected_queue); ++i) {
 		disconnected_queue = NEXT(cmd);
-		NEXT(cmd) = NULL;
+		SET_NEXT(cmd, NULL);
 		cmd->result = (cmd->result & 0xffff) | (DID_RESET << 16);
 		cmd->scsi_done(cmd);
 	}