Commit 0c075d64 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

pktcdvd: convert pr_info to pkt_info

Add a new pkt_info macro to prefix the name to the logging output.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ca73dabc
...@@ -75,6 +75,8 @@ ...@@ -75,6 +75,8 @@
pr_err("%s: " fmt, pd->name, ##__VA_ARGS__) pr_err("%s: " fmt, pd->name, ##__VA_ARGS__)
#define pkt_notice(pd, fmt, ...) \ #define pkt_notice(pd, fmt, ...) \
pr_notice("%s: " fmt, pd->name, ##__VA_ARGS__) pr_notice("%s: " fmt, pd->name, ##__VA_ARGS__)
#define pkt_info(pd, fmt, ...) \
pr_info("%s: " fmt, pd->name, ##__VA_ARGS__)
#define pkt_dbg(level, pd, fmt, ...) \ #define pkt_dbg(level, pd, fmt, ...) \
do { \ do { \
...@@ -1561,10 +1563,10 @@ static int kcdrwd(void *foobar) ...@@ -1561,10 +1563,10 @@ static int kcdrwd(void *foobar)
static void pkt_print_settings(struct pktcdvd_device *pd) static void pkt_print_settings(struct pktcdvd_device *pd)
{ {
pr_info("%s packets, %u blocks, Mode-%c disc\n", pkt_info(pd, "%s packets, %u blocks, Mode-%c disc\n",
pd->settings.fp ? "Fixed" : "Variable", pd->settings.fp ? "Fixed" : "Variable",
pd->settings.size >> 2, pd->settings.size >> 2,
pd->settings.block_mode == 8 ? '1' : '2'); pd->settings.block_mode == 8 ? '1' : '2');
} }
static int pkt_mode_sense(struct pktcdvd_device *pd, struct packet_command *cgc, int page_code, int page_control) static int pkt_mode_sense(struct pktcdvd_device *pd, struct packet_command *cgc, int page_code, int page_control)
...@@ -2112,7 +2114,7 @@ static noinline_for_stack int pkt_media_speed(struct pktcdvd_device *pd, ...@@ -2112,7 +2114,7 @@ static noinline_for_stack int pkt_media_speed(struct pktcdvd_device *pd,
return 1; return 1;
} }
if (*speed) { if (*speed) {
pr_info("maximum media speed: %d\n", *speed); pkt_info(pd, "maximum media speed: %d\n", *speed);
return 0; return 0;
} else { } else {
pkt_notice(pd, "unknown speed %d for sub-type %d\n", sp, st); pkt_notice(pd, "unknown speed %d for sub-type %d\n", sp, st);
...@@ -2239,7 +2241,7 @@ static int pkt_open_dev(struct pktcdvd_device *pd, fmode_t write) ...@@ -2239,7 +2241,7 @@ static int pkt_open_dev(struct pktcdvd_device *pd, fmode_t write)
ret = -ENOMEM; ret = -ENOMEM;
goto out_putdev; goto out_putdev;
} }
pr_info("%lukB available on disc\n", lba << 1); pkt_info(pd, "%lukB available on disc\n", lba << 1);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment