aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-12-02 18:10:49 -0500
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 12:57:45 -0500
commit0c3de38ff3eec506ef08ede32110d1f266366ccd (patch)
treecd94d017cf33979ccabc0cec01542fe4be50a38a /drivers/scsi/pcmcia
parent5af2e38242f87231244393e69beca7284e70056f (diff)
scsi: remove SPRINTF macro
The macro SPRINTF doesn't save a lot of typing or make the code more readable, and depending on a specific identifier (m) in the surrounding scope is generally frowned upon. Nuke it. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/pcmcia')
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c50
1 files changed, 23 insertions, 27 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 34aad32829f5..83db942d6913 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1364,9 +1364,6 @@ static const char *nsp_info(struct Scsi_Host *shpnt)
1364 return data->nspinfo; 1364 return data->nspinfo;
1365} 1365}
1366 1366
1367#undef SPRINTF
1368#define SPRINTF(args...) seq_printf(m, ##args)
1369
1370static int nsp_show_info(struct seq_file *m, struct Scsi_Host *host) 1367static int nsp_show_info(struct seq_file *m, struct Scsi_Host *host)
1371{ 1368{
1372 int id; 1369 int id;
@@ -1378,75 +1375,74 @@ static int nsp_show_info(struct seq_file *m, struct Scsi_Host *host)
1378 hostno = host->host_no; 1375 hostno = host->host_no;
1379 data = (nsp_hw_data *)host->hostdata; 1376 data = (nsp_hw_data *)host->hostdata;
1380 1377
1381 SPRINTF("NinjaSCSI status\n\n"); 1378 seq_printf(m, "NinjaSCSI status\n\n");
1382 SPRINTF("Driver version: $Revision: 1.23 $\n"); 1379 seq_printf(m, "Driver version: $Revision: 1.23 $\n");
1383 SPRINTF("SCSI host No.: %d\n", hostno); 1380 seq_printf(m, "SCSI host No.: %d\n", hostno);
1384 SPRINTF("IRQ: %d\n", host->irq); 1381 seq_printf(m, "IRQ: %d\n", host->irq);
1385 SPRINTF("IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1); 1382 seq_printf(m, "IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1);
1386 SPRINTF("MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - 1); 1383 seq_printf(m, "MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - 1);
1387 SPRINTF("sg_tablesize: %d\n", host->sg_tablesize); 1384 seq_printf(m, "sg_tablesize: %d\n", host->sg_tablesize);
1388 1385
1389 SPRINTF("burst transfer mode: "); 1386 seq_printf(m, "burst transfer mode: ");
1390 switch (nsp_burst_mode) { 1387 switch (nsp_burst_mode) {
1391 case BURST_IO8: 1388 case BURST_IO8:
1392 SPRINTF("io8"); 1389 seq_printf(m, "io8");
1393 break; 1390 break;
1394 case BURST_IO32: 1391 case BURST_IO32:
1395 SPRINTF("io32"); 1392 seq_printf(m, "io32");
1396 break; 1393 break;
1397 case BURST_MEM32: 1394 case BURST_MEM32:
1398 SPRINTF("mem32"); 1395 seq_printf(m, "mem32");
1399 break; 1396 break;
1400 default: 1397 default:
1401 SPRINTF("???"); 1398 seq_printf(m, "???");
1402 break; 1399 break;
1403 } 1400 }
1404 SPRINTF("\n"); 1401 seq_printf(m, "\n");
1405 1402
1406 1403
1407 spin_lock_irqsave(&(data->Lock), flags); 1404 spin_lock_irqsave(&(data->Lock), flags);
1408 SPRINTF("CurrentSC: 0x%p\n\n", data->CurrentSC); 1405 seq_printf(m, "CurrentSC: 0x%p\n\n", data->CurrentSC);
1409 spin_unlock_irqrestore(&(data->Lock), flags); 1406 spin_unlock_irqrestore(&(data->Lock), flags);
1410 1407
1411 SPRINTF("SDTR status\n"); 1408 seq_printf(m, "SDTR status\n");
1412 for(id = 0; id < ARRAY_SIZE(data->Sync); id++) { 1409 for(id = 0; id < ARRAY_SIZE(data->Sync); id++) {
1413 1410
1414 SPRINTF("id %d: ", id); 1411 seq_printf(m, "id %d: ", id);
1415 1412
1416 if (id == host->this_id) { 1413 if (id == host->this_id) {
1417 SPRINTF("----- NinjaSCSI-3 host adapter\n"); 1414 seq_printf(m, "----- NinjaSCSI-3 host adapter\n");
1418 continue; 1415 continue;
1419 } 1416 }
1420 1417
1421 switch(data->Sync[id].SyncNegotiation) { 1418 switch(data->Sync[id].SyncNegotiation) {
1422 case SYNC_OK: 1419 case SYNC_OK:
1423 SPRINTF(" sync"); 1420 seq_printf(m, " sync");
1424 break; 1421 break;
1425 case SYNC_NG: 1422 case SYNC_NG:
1426 SPRINTF("async"); 1423 seq_printf(m, "async");
1427 break; 1424 break;
1428 case SYNC_NOT_YET: 1425 case SYNC_NOT_YET:
1429 SPRINTF(" none"); 1426 seq_printf(m, " none");
1430 break; 1427 break;
1431 default: 1428 default:
1432 SPRINTF("?????"); 1429 seq_printf(m, "?????");
1433 break; 1430 break;
1434 } 1431 }
1435 1432
1436 if (data->Sync[id].SyncPeriod != 0) { 1433 if (data->Sync[id].SyncPeriod != 0) {
1437 speed = 1000000 / (data->Sync[id].SyncPeriod * 4); 1434 speed = 1000000 / (data->Sync[id].SyncPeriod * 4);
1438 1435
1439 SPRINTF(" transfer %d.%dMB/s, offset %d", 1436 seq_printf(m, " transfer %d.%dMB/s, offset %d",
1440 speed / 1000, 1437 speed / 1000,
1441 speed % 1000, 1438 speed % 1000,
1442 data->Sync[id].SyncOffset 1439 data->Sync[id].SyncOffset
1443 ); 1440 );
1444 } 1441 }
1445 SPRINTF("\n"); 1442 seq_printf(m, "\n");
1446 } 1443 }
1447 return 0; 1444 return 0;
1448} 1445}
1449#undef SPRINTF
1450 1446
1451/*---------------------------------------------------------------*/ 1447/*---------------------------------------------------------------*/
1452/* error handler */ 1448/* error handler */