diff options
author | Joe Perches <joe@perches.com> | 2013-09-11 17:25:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:59:32 -0400 |
commit | ca73dabc3d1df4aaacb242b6d4e39cd36618444f (patch) | |
tree | d34349cd29dbfd38d376f16161660d71bea0544c /drivers/block | |
parent | fa63c0ab81f55eb5a016c1bcea04fe39c14afbaa (diff) |
pktcdvd: convert pr_notice to pkt_notice
Add a new pkt_notice macro to prefix the name to the logging output.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/pktcdvd.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 3dbe42fe1bdd..136a04c3a07a 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -73,6 +73,8 @@ | |||
73 | 73 | ||
74 | #define pkt_err(pd, fmt, ...) \ | 74 | #define pkt_err(pd, fmt, ...) \ |
75 | pr_err("%s: " fmt, pd->name, ##__VA_ARGS__) | 75 | pr_err("%s: " fmt, pd->name, ##__VA_ARGS__) |
76 | #define pkt_notice(pd, fmt, ...) \ | ||
77 | pr_notice("%s: " fmt, pd->name, ##__VA_ARGS__) | ||
76 | 78 | ||
77 | #define pkt_dbg(level, pd, fmt, ...) \ | 79 | #define pkt_dbg(level, pd, fmt, ...) \ |
78 | do { \ | 80 | do { \ |
@@ -1818,7 +1820,7 @@ static int pkt_writable_disc(struct pktcdvd_device *pd, disc_information *di) | |||
1818 | * but i'm not sure, should we leave this to user apps? probably. | 1820 | * but i'm not sure, should we leave this to user apps? probably. |
1819 | */ | 1821 | */ |
1820 | if (di->disc_type == 0xff) { | 1822 | if (di->disc_type == 0xff) { |
1821 | pr_notice("unknown disc - no track?\n"); | 1823 | pkt_notice(pd, "unknown disc - no track?\n"); |
1822 | return 0; | 1824 | return 0; |
1823 | } | 1825 | } |
1824 | 1826 | ||
@@ -1828,7 +1830,7 @@ static int pkt_writable_disc(struct pktcdvd_device *pd, disc_information *di) | |||
1828 | } | 1830 | } |
1829 | 1831 | ||
1830 | if (di->erasable == 0) { | 1832 | if (di->erasable == 0) { |
1831 | pr_notice("disc not erasable\n"); | 1833 | pkt_notice(pd, "disc not erasable\n"); |
1832 | return 0; | 1834 | return 0; |
1833 | } | 1835 | } |
1834 | 1836 | ||
@@ -1884,7 +1886,7 @@ static noinline_for_stack int pkt_probe_settings(struct pktcdvd_device *pd) | |||
1884 | */ | 1886 | */ |
1885 | pd->settings.size = be32_to_cpu(ti.fixed_packet_size) << 2; | 1887 | pd->settings.size = be32_to_cpu(ti.fixed_packet_size) << 2; |
1886 | if (pd->settings.size == 0) { | 1888 | if (pd->settings.size == 0) { |
1887 | pr_notice("detected zero packet size!\n"); | 1889 | pkt_notice(pd, "detected zero packet size!\n"); |
1888 | return -ENXIO; | 1890 | return -ENXIO; |
1889 | } | 1891 | } |
1890 | if (pd->settings.size > PACKET_MAX_SECTORS) { | 1892 | if (pd->settings.size > PACKET_MAX_SECTORS) { |
@@ -1967,7 +1969,7 @@ static noinline_for_stack int pkt_write_caching(struct pktcdvd_device *pd, | |||
1967 | pkt_err(pd, "write caching control failed\n"); | 1969 | pkt_err(pd, "write caching control failed\n"); |
1968 | pkt_dump_sense(&cgc); | 1970 | pkt_dump_sense(&cgc); |
1969 | } else if (!ret && set) | 1971 | } else if (!ret && set) |
1970 | pr_notice("enabled write caching on %s\n", pd->name); | 1972 | pkt_notice(pd, "enabled write caching\n"); |
1971 | return ret; | 1973 | return ret; |
1972 | } | 1974 | } |
1973 | 1975 | ||
@@ -2082,11 +2084,11 @@ static noinline_for_stack int pkt_media_speed(struct pktcdvd_device *pd, | |||
2082 | } | 2084 | } |
2083 | 2085 | ||
2084 | if (!(buf[6] & 0x40)) { | 2086 | if (!(buf[6] & 0x40)) { |
2085 | pr_notice("disc type is not CD-RW\n"); | 2087 | pkt_notice(pd, "disc type is not CD-RW\n"); |
2086 | return 1; | 2088 | return 1; |
2087 | } | 2089 | } |
2088 | if (!(buf[6] & 0x4)) { | 2090 | if (!(buf[6] & 0x4)) { |
2089 | pr_notice("A1 values on media are not valid, maybe not CDRW?\n"); | 2091 | pkt_notice(pd, "A1 values on media are not valid, maybe not CDRW?\n"); |
2090 | return 1; | 2092 | return 1; |
2091 | } | 2093 | } |
2092 | 2094 | ||
@@ -2106,14 +2108,14 @@ static noinline_for_stack int pkt_media_speed(struct pktcdvd_device *pd, | |||
2106 | *speed = us_clv_to_speed[sp]; | 2108 | *speed = us_clv_to_speed[sp]; |
2107 | break; | 2109 | break; |
2108 | default: | 2110 | default: |
2109 | pr_notice("unknown disc sub-type %d\n", st); | 2111 | pkt_notice(pd, "unknown disc sub-type %d\n", st); |
2110 | return 1; | 2112 | return 1; |
2111 | } | 2113 | } |
2112 | if (*speed) { | 2114 | if (*speed) { |
2113 | pr_info("maximum media speed: %d\n", *speed); | 2115 | pr_info("maximum media speed: %d\n", *speed); |
2114 | return 0; | 2116 | return 0; |
2115 | } else { | 2117 | } else { |
2116 | pr_notice("unknown speed %d for sub-type %d\n", sp, st); | 2118 | pkt_notice(pd, "unknown speed %d for sub-type %d\n", sp, st); |
2117 | return 1; | 2119 | return 1; |
2118 | } | 2120 | } |
2119 | } | 2121 | } |
@@ -2378,8 +2380,8 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio) | |||
2378 | } | 2380 | } |
2379 | 2381 | ||
2380 | if (!test_bit(PACKET_WRITABLE, &pd->flags)) { | 2382 | if (!test_bit(PACKET_WRITABLE, &pd->flags)) { |
2381 | pr_notice("WRITE for ro device %s (%llu)\n", | 2383 | pkt_notice(pd, "WRITE for ro device (%llu)\n", |
2382 | pd->name, (unsigned long long)bio->bi_sector); | 2384 | (unsigned long long)bio->bi_sector); |
2383 | goto end_io; | 2385 | goto end_io; |
2384 | } | 2386 | } |
2385 | 2387 | ||