diff options
author | Joe Perches <joe@perches.com> | 2011-04-15 18:51:59 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2011-07-23 17:57:36 -0400 |
commit | a9a79dfec239568bdbf778242f8fcd10bcc5b9e2 (patch) | |
tree | 620648585f89cdb589d1625431f8c21ef70a9258 /drivers/ata/pata_bf54x.c | |
parent | a44fec1fce5d5d14cc3ac4545b8da346394de666 (diff) |
ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level>
Saves text by removing nearly duplicated text format strings by
creating ata_<foo>_printk functions and printf extension %pV.
ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)
Format string duplication comes from:
#define ata_link_printk(link, lv, fmt, args...) do { \
if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \
printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \
(link)->pmp , ##args); \
else \
printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
} while(0)
Coalesce long formats.
$ size drivers/ata/built-in.*
text data bss dec hex filename
544969 73893 116584 735446 b38d6 drivers/ata/built-in.allyesconfig.ata.o
558429 73893 117864 750186 b726a drivers/ata/built-in.allyesconfig.dev_level.o
141328 14689 4220 160237 271ed drivers/ata/built-in.defconfig.ata.o
149567 14689 4220 168476 2921c drivers/ata/built-in.defconfig.dev_level.o
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/ata/pata_bf54x.c')
-rw-r--r-- | drivers/ata/pata_bf54x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index ea64967000ff..bd987bb082eb 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c | |||
@@ -1129,7 +1129,7 @@ static int bfin_softreset(struct ata_link *link, unsigned int *classes, | |||
1129 | /* issue bus reset */ | 1129 | /* issue bus reset */ |
1130 | err_mask = bfin_bus_softreset(ap, devmask); | 1130 | err_mask = bfin_bus_softreset(ap, devmask); |
1131 | if (err_mask) { | 1131 | if (err_mask) { |
1132 | ata_port_printk(ap, KERN_ERR, "SRST failed (err_mask=0x%x)\n", | 1132 | ata_port_err(ap, "SRST failed (err_mask=0x%x)\n", |
1133 | err_mask); | 1133 | err_mask); |
1134 | return -EIO; | 1134 | return -EIO; |
1135 | } | 1135 | } |
@@ -1382,7 +1382,7 @@ idle_irq: | |||
1382 | #ifdef ATA_IRQ_TRAP | 1382 | #ifdef ATA_IRQ_TRAP |
1383 | if ((ap->stats.idle_irq % 1000) == 0) { | 1383 | if ((ap->stats.idle_irq % 1000) == 0) { |
1384 | ap->ops->irq_ack(ap, 0); /* debug trap */ | 1384 | ap->ops->irq_ack(ap, 0); /* debug trap */ |
1385 | ata_port_printk(ap, KERN_WARNING, "irq trap\n"); | 1385 | ata_port_warn(ap, "irq trap\n"); |
1386 | return 1; | 1386 | return 1; |
1387 | } | 1387 | } |
1388 | #endif | 1388 | #endif |