Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Roman Zippel and committed by
Linus Torvalds
3130d905 c28bda25

+49 -134
+17 -16
drivers/scsi/atari_NCR5380.c
··· 272 272 (struct NCR5380_hostdata *)(in)->hostdata 273 273 #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) 274 274 275 - #define NEXT(cmd) ((cmd)->host_scribble) 276 - #define NEXTADDR(cmd) ((Scsi_Cmnd **)&((cmd)->host_scribble)) 275 + #define NEXT(cmd) ((Scsi_Cmnd *)(cmd)->host_scribble) 276 + #define SET_NEXT(cmd,next) ((cmd)->host_scribble = (void *)(next)) 277 + #define NEXTADDR(cmd) ((Scsi_Cmnd **)&(cmd)->host_scribble) 277 278 278 279 #define HOSTNO instance->host_no 279 280 #define H_NO(cmd) (cmd)->device->host->host_no ··· 480 479 virt_to_phys(page_address(cmd->SCp.buffer[1].page) + 481 480 cmd->SCp.buffer[1].offset) == endaddr;) { 482 481 MER_PRINTK("VTOP(%p) == %08lx -> merging\n", 483 - cmd->SCp.buffer[1].address, endaddr); 482 + page_address(cmd->SCp.buffer[1].page), endaddr); 484 483 #if (NDEBUG & NDEBUG_MERGING) 485 484 ++cnt; 486 485 #endif ··· 1003 1002 * in a queue 1004 1003 */ 1005 1004 1006 - NEXT(cmd) = NULL; 1005 + SET_NEXT(cmd, NULL); 1007 1006 cmd->scsi_done = done; 1008 1007 1009 1008 cmd->result = 0; ··· 1035 1034 } 1036 1035 if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) { 1037 1036 LIST(cmd, hostdata->issue_queue); 1038 - NEXT(cmd) = hostdata->issue_queue; 1037 + SET_NEXT(cmd, hostdata->issue_queue); 1039 1038 hostdata->issue_queue = cmd; 1040 1039 } else { 1041 1040 for (tmp = (Scsi_Cmnd *)hostdata->issue_queue; 1042 1041 NEXT(tmp); tmp = NEXT(tmp)) 1043 1042 ; 1044 1043 LIST(cmd, tmp); 1045 - NEXT(tmp) = cmd; 1044 + SET_NEXT(tmp, cmd); 1046 1045 } 1047 1046 local_irq_restore(flags); 1048 1047 ··· 1150 1149 local_irq_disable(); 1151 1150 if (prev) { 1152 1151 REMOVE(prev, NEXT(prev), tmp, NEXT(tmp)); 1153 - NEXT(prev) = NEXT(tmp); 1152 + SET_NEXT(prev, NEXT(tmp)); 1154 1153 } else { 1155 1154 REMOVE(-1, hostdata->issue_queue, tmp, NEXT(tmp)); 1156 1155 hostdata->issue_queue = NEXT(tmp); 1157 1156 } 1158 - NEXT(tmp) = NULL; 1157 + SET_NEXT(tmp, NULL); 1159 1158 falcon_dont_release++; 1160 1159 1161 1160 /* reenable interrupts after finding one */ ··· 1193 1192 } else { 1194 1193 local_irq_disable(); 1195 1194 LIST(tmp, hostdata->issue_queue); 1196 - NEXT(tmp) = hostdata->issue_queue; 1195 + SET_NEXT(tmp, hostdata->issue_queue); 1197 1196 hostdata->issue_queue = tmp; 1198 1197 #ifdef SUPPORT_TAGS 1199 1198 cmd_free_tag(tmp); ··· 2296 2295 2297 2296 local_irq_save(flags); 2298 2297 LIST(cmd,hostdata->issue_queue); 2299 - NEXT(cmd) = hostdata->issue_queue; 2298 + SET_NEXT(cmd, hostdata->issue_queue); 2300 2299 hostdata->issue_queue = (Scsi_Cmnd *) cmd; 2301 2300 local_irq_restore(flags); 2302 2301 QU_PRINTK("scsi%d: REQUEST SENSE added to head of " ··· 2358 2357 local_irq_save(flags); 2359 2358 cmd->device->disconnect = 1; 2360 2359 LIST(cmd,hostdata->disconnected_queue); 2361 - NEXT(cmd) = hostdata->disconnected_queue; 2360 + SET_NEXT(cmd, hostdata->disconnected_queue); 2362 2361 hostdata->connected = NULL; 2363 2362 hostdata->disconnected_queue = cmd; 2364 2363 local_irq_restore(flags); ··· 2633 2632 falcon_dont_release++; 2634 2633 if (prev) { 2635 2634 REMOVE(prev, NEXT(prev), tmp, NEXT(tmp)); 2636 - NEXT(prev) = NEXT(tmp); 2635 + SET_NEXT(prev, NEXT(tmp)); 2637 2636 } else { 2638 2637 REMOVE(-1, hostdata->disconnected_queue, tmp, NEXT(tmp)); 2639 2638 hostdata->disconnected_queue = NEXT(tmp); 2640 2639 } 2641 - NEXT(tmp) = NULL; 2640 + SET_NEXT(tmp, NULL); 2642 2641 break; 2643 2642 } 2644 2643 } ··· 2770 2769 if (cmd == tmp) { 2771 2770 REMOVE(5, *prev, tmp, NEXT(tmp)); 2772 2771 (*prev) = NEXT(tmp); 2773 - NEXT(tmp) = NULL; 2772 + SET_NEXT(tmp, NULL); 2774 2773 tmp->result = DID_ABORT << 16; 2775 2774 local_irq_restore(flags); 2776 2775 ABRT_PRINTK("scsi%d: abort removed command from issue queue.\n", ··· 2845 2844 if (cmd == tmp) { 2846 2845 REMOVE(5, *prev, tmp, NEXT(tmp)); 2847 2846 *prev = NEXT(tmp); 2848 - NEXT(tmp) = NULL; 2847 + SET_NEXT(tmp, NULL); 2849 2848 tmp->result = DID_ABORT << 16; 2850 2849 /* We must unlock the tag/LUN immediately here, since the 2851 2850 * target goes to BUS FREE and doesn't send us another ··· 2966 2965 2967 2966 for (i = 0; (cmd = disconnected_queue); ++i) { 2968 2967 disconnected_queue = NEXT(cmd); 2969 - NEXT(cmd) = NULL; 2968 + SET_NEXT(cmd, NULL); 2970 2969 cmd->result = (cmd->result & 0xffff) | (DID_RESET << 16); 2971 2970 cmd->scsi_done(cmd); 2972 2971 }
+3 -3
drivers/scsi/atari_scsi.c
··· 69 69 70 70 #define NDEBUG (0) 71 71 72 - #define NDEBUG_ABORT 0x800000 73 - #define NDEBUG_TAGS 0x1000000 74 - #define NDEBUG_MERGING 0x2000000 72 + #define NDEBUG_ABORT 0x00100000 73 + #define NDEBUG_TAGS 0x00200000 74 + #define NDEBUG_MERGING 0x00400000 75 75 76 76 #define AUTOSENSE 77 77 /* For the Atari version, use only polled IO or REAL_DMA */
+29 -115
drivers/scsi/atari_scsi.h
··· 113 113 * 114 114 */ 115 115 116 - #if NDEBUG & NDEBUG_ARBITRATION 116 + #define dprint(flg, format...) \ 117 + ({ \ 118 + if (NDEBUG & (flg)) \ 119 + printk(KERN_DEBUG format); \ 120 + }) 121 + 117 122 #define ARB_PRINTK(format, args...) \ 118 - printk(KERN_DEBUG format , ## args) 119 - #else 120 - #define ARB_PRINTK(format, args...) 121 - #endif 122 - #if NDEBUG & NDEBUG_AUTOSENSE 123 + dprint(NDEBUG_ARBITRATION, format , ## args) 123 124 #define ASEN_PRINTK(format, args...) \ 124 - printk(KERN_DEBUG format , ## args) 125 - #else 126 - #define ASEN_PRINTK(format, args...) 127 - #endif 128 - #if NDEBUG & NDEBUG_DMA 125 + dprint(NDEBUG_AUTOSENSE, format , ## args) 129 126 #define DMA_PRINTK(format, args...) \ 130 - printk(KERN_DEBUG format , ## args) 131 - #else 132 - #define DMA_PRINTK(format, args...) 133 - #endif 134 - #if NDEBUG & NDEBUG_HANDSHAKE 127 + dprint(NDEBUG_DMA, format , ## args) 135 128 #define HSH_PRINTK(format, args...) \ 136 - printk(KERN_DEBUG format , ## args) 137 - #else 138 - #define HSH_PRINTK(format, args...) 139 - #endif 140 - #if NDEBUG & NDEBUG_INFORMATION 129 + dprint(NDEBUG_HANDSHAKE, format , ## args) 141 130 #define INF_PRINTK(format, args...) \ 142 - printk(KERN_DEBUG format , ## args) 143 - #else 144 - #define INF_PRINTK(format, args...) 145 - #endif 146 - #if NDEBUG & NDEBUG_INIT 131 + dprint(NDEBUG_INFORMATION, format , ## args) 147 132 #define INI_PRINTK(format, args...) \ 148 - printk(KERN_DEBUG format , ## args) 149 - #else 150 - #define INI_PRINTK(format, args...) 151 - #endif 152 - #if NDEBUG & NDEBUG_INTR 133 + dprint(NDEBUG_INIT, format , ## args) 153 134 #define INT_PRINTK(format, args...) \ 154 - printk(KERN_DEBUG format , ## args) 155 - #else 156 - #define INT_PRINTK(format, args...) 157 - #endif 158 - #if NDEBUG & NDEBUG_LINKED 135 + dprint(NDEBUG_INTR, format , ## args) 159 136 #define LNK_PRINTK(format, args...) \ 160 - printk(KERN_DEBUG format , ## args) 161 - #else 162 - #define LNK_PRINTK(format, args...) 163 - #endif 164 - #if NDEBUG & NDEBUG_MAIN 137 + dprint(NDEBUG_LINKED, format , ## args) 165 138 #define MAIN_PRINTK(format, args...) \ 166 - printk(KERN_DEBUG format , ## args) 167 - #else 168 - #define MAIN_PRINTK(format, args...) 169 - #endif 170 - #if NDEBUG & NDEBUG_NO_DATAOUT 139 + dprint(NDEBUG_MAIN, format , ## args) 171 140 #define NDAT_PRINTK(format, args...) \ 172 - printk(KERN_DEBUG format , ## args) 173 - #else 174 - #define NDAT_PRINTK(format, args...) 175 - #endif 176 - #if NDEBUG & NDEBUG_NO_WRITE 141 + dprint(NDEBUG_NO_DATAOUT, format , ## args) 177 142 #define NWR_PRINTK(format, args...) \ 178 - printk(KERN_DEBUG format , ## args) 179 - #else 180 - #define NWR_PRINTK(format, args...) 181 - #endif 182 - #if NDEBUG & NDEBUG_PIO 143 + dprint(NDEBUG_NO_WRITE, format , ## args) 183 144 #define PIO_PRINTK(format, args...) \ 184 - printk(KERN_DEBUG format , ## args) 185 - #else 186 - #define PIO_PRINTK(format, args...) 187 - #endif 188 - #if NDEBUG & NDEBUG_PSEUDO_DMA 145 + dprint(NDEBUG_PIO, format , ## args) 189 146 #define PDMA_PRINTK(format, args...) \ 190 - printk(KERN_DEBUG format , ## args) 191 - #else 192 - #define PDMA_PRINTK(format, args...) 193 - #endif 194 - #if NDEBUG & NDEBUG_QUEUES 147 + dprint(NDEBUG_PSEUDO_DMA, format , ## args) 195 148 #define QU_PRINTK(format, args...) \ 196 - printk(KERN_DEBUG format , ## args) 197 - #else 198 - #define QU_PRINTK(format, args...) 199 - #endif 200 - #if NDEBUG & NDEBUG_RESELECTION 149 + dprint(NDEBUG_QUEUES, format , ## args) 201 150 #define RSL_PRINTK(format, args...) \ 202 - printk(KERN_DEBUG format , ## args) 203 - #else 204 - #define RSL_PRINTK(format, args...) 205 - #endif 206 - #if NDEBUG & NDEBUG_SELECTION 151 + dprint(NDEBUG_RESELECTION, format , ## args) 207 152 #define SEL_PRINTK(format, args...) \ 208 - printk(KERN_DEBUG format , ## args) 209 - #else 210 - #define SEL_PRINTK(format, args...) 211 - #endif 212 - #if NDEBUG & NDEBUG_USLEEP 153 + dprint(NDEBUG_SELECTION, format , ## args) 213 154 #define USL_PRINTK(format, args...) \ 214 - printk(KERN_DEBUG format , ## args) 215 - #else 216 - #define USL_PRINTK(format, args...) 217 - #endif 218 - #if NDEBUG & NDEBUG_LAST_BYTE_SENT 155 + dprint(NDEBUG_USLEEP, format , ## args) 219 156 #define LBS_PRINTK(format, args...) \ 220 - printk(KERN_DEBUG format , ## args) 221 - #else 222 - #define LBS_PRINTK(format, args...) 223 - #endif 224 - #if NDEBUG & NDEBUG_RESTART_SELECT 157 + dprint(NDEBUG_LAST_BYTE_SENT, format , ## args) 225 158 #define RSS_PRINTK(format, args...) \ 226 - printk(KERN_DEBUG format , ## args) 227 - #else 228 - #define RSS_PRINTK(format, args...) 229 - #endif 230 - #if NDEBUG & NDEBUG_EXTENDED 159 + dprint(NDEBUG_RESTART_SELECT, format , ## args) 231 160 #define EXT_PRINTK(format, args...) \ 232 - printk(KERN_DEBUG format , ## args) 233 - #else 234 - #define EXT_PRINTK(format, args...) 235 - #endif 236 - #if NDEBUG & NDEBUG_ABORT 161 + dprint(NDEBUG_EXTENDED, format , ## args) 237 162 #define ABRT_PRINTK(format, args...) \ 238 - printk(KERN_DEBUG format , ## args) 239 - #else 240 - #define ABRT_PRINTK(format, args...) 241 - #endif 242 - #if NDEBUG & NDEBUG_TAGS 163 + dprint(NDEBUG_ABORT, format , ## args) 243 164 #define TAG_PRINTK(format, args...) \ 244 - printk(KERN_DEBUG format , ## args) 245 - #else 246 - #define TAG_PRINTK(format, args...) 247 - #endif 248 - #if NDEBUG & NDEBUG_MERGING 165 + dprint(NDEBUG_TAGS, format , ## args) 249 166 #define MER_PRINTK(format, args...) \ 250 - printk(KERN_DEBUG format , ## args) 251 - #else 252 - #define MER_PRINTK(format, args...) 253 - #endif 167 + dprint(NDEBUG_MERGING, format , ## args) 254 168 255 169 /* conditional macros for NCR5380_print_{,phase,status} */ 256 170