mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-12 15:24:00 +08:00
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>
This commit is contained in:
parent
fa63c0ab81
commit
ca73dabc3d
@ -73,6 +73,8 @@
|
||||
|
||||
#define pkt_err(pd, fmt, ...) \
|
||||
pr_err("%s: " fmt, pd->name, ##__VA_ARGS__)
|
||||
#define pkt_notice(pd, fmt, ...) \
|
||||
pr_notice("%s: " fmt, pd->name, ##__VA_ARGS__)
|
||||
|
||||
#define pkt_dbg(level, pd, fmt, ...) \
|
||||
do { \
|
||||
@ -1818,7 +1820,7 @@ static int pkt_writable_disc(struct pktcdvd_device *pd, disc_information *di)
|
||||
* but i'm not sure, should we leave this to user apps? probably.
|
||||
*/
|
||||
if (di->disc_type == 0xff) {
|
||||
pr_notice("unknown disc - no track?\n");
|
||||
pkt_notice(pd, "unknown disc - no track?\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1828,7 +1830,7 @@ static int pkt_writable_disc(struct pktcdvd_device *pd, disc_information *di)
|
||||
}
|
||||
|
||||
if (di->erasable == 0) {
|
||||
pr_notice("disc not erasable\n");
|
||||
pkt_notice(pd, "disc not erasable\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1884,7 +1886,7 @@ static noinline_for_stack int pkt_probe_settings(struct pktcdvd_device *pd)
|
||||
*/
|
||||
pd->settings.size = be32_to_cpu(ti.fixed_packet_size) << 2;
|
||||
if (pd->settings.size == 0) {
|
||||
pr_notice("detected zero packet size!\n");
|
||||
pkt_notice(pd, "detected zero packet size!\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
if (pd->settings.size > PACKET_MAX_SECTORS) {
|
||||
@ -1967,7 +1969,7 @@ static noinline_for_stack int pkt_write_caching(struct pktcdvd_device *pd,
|
||||
pkt_err(pd, "write caching control failed\n");
|
||||
pkt_dump_sense(&cgc);
|
||||
} else if (!ret && set)
|
||||
pr_notice("enabled write caching on %s\n", pd->name);
|
||||
pkt_notice(pd, "enabled write caching\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2082,11 +2084,11 @@ static noinline_for_stack int pkt_media_speed(struct pktcdvd_device *pd,
|
||||
}
|
||||
|
||||
if (!(buf[6] & 0x40)) {
|
||||
pr_notice("disc type is not CD-RW\n");
|
||||
pkt_notice(pd, "disc type is not CD-RW\n");
|
||||
return 1;
|
||||
}
|
||||
if (!(buf[6] & 0x4)) {
|
||||
pr_notice("A1 values on media are not valid, maybe not CDRW?\n");
|
||||
pkt_notice(pd, "A1 values on media are not valid, maybe not CDRW?\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -2106,14 +2108,14 @@ static noinline_for_stack int pkt_media_speed(struct pktcdvd_device *pd,
|
||||
*speed = us_clv_to_speed[sp];
|
||||
break;
|
||||
default:
|
||||
pr_notice("unknown disc sub-type %d\n", st);
|
||||
pkt_notice(pd, "unknown disc sub-type %d\n", st);
|
||||
return 1;
|
||||
}
|
||||
if (*speed) {
|
||||
pr_info("maximum media speed: %d\n", *speed);
|
||||
return 0;
|
||||
} else {
|
||||
pr_notice("unknown speed %d for sub-type %d\n", sp, st);
|
||||
pkt_notice(pd, "unknown speed %d for sub-type %d\n", sp, st);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -2378,8 +2380,8 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)
|
||||
}
|
||||
|
||||
if (!test_bit(PACKET_WRITABLE, &pd->flags)) {
|
||||
pr_notice("WRITE for ro device %s (%llu)\n",
|
||||
pd->name, (unsigned long long)bio->bi_sector);
|
||||
pkt_notice(pd, "WRITE for ro device (%llu)\n",
|
||||
(unsigned long long)bio->bi_sector);
|
||||
goto end_io;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user