* [KJ] [PATCH] drivers/block/floppy.c: trivial printk() updates
@ 2005-11-14 7:35 Daniel Marjamäki
2005-11-14 8:21 ` Christophe Lucas
2005-11-14 10:03 ` Daniel Marjamäki
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Marjamäki @ 2005-11-14 7:35 UTC (permalink / raw)
To: kernel-janitors
This is a trivial update that inserts appropriate KERN_ in printk() calls.
Signed-off-by: Daniel Marjamäki
--- linux-2.6.14.1.orig/drivers/block/floppy.c 2005-11-14 08:14:40.000000000 +0100
+++ linux-2.6.14.1/drivers/block/floppy.c 2005-11-14 08:25:46.000000000 +0100
@@ -310,7 +310,7 @@ static int initialising = 1;
#define USETF(x) (set_bit(x##_BIT, &UDRS->flags))
#define UTESTF(x) (test_bit(x##_BIT, &UDRS->flags))
-#define DPRINT(format, args...) printk(DEVICE_NAME "%d: " format, current_drive , ## args)
+#define DPRINT(format, args...) printk(KERN_INFO DEVICE_NAME "%d: " format, current_drive , ## args)
#define PH_HEAD(floppy,head) (((((floppy)->stretch & 2) >>1) ^ head) << 2)
#define STRETCH(floppy) ((floppy)->stretch & FD_STRETCH)
@@ -620,7 +620,7 @@ static inline void set_debugt(void)
static inline void debugt(const char *message)
{
if (DP->flags & DEBUGT)
- printk("%s dtime=%lu\n", message, jiffies - debugtimer);
+ printk(KERN_INFO "%s dtime=%lu\n", message, jiffies - debugtimer);
}
#else
static inline void set_debugt(void) { }
@@ -860,7 +860,7 @@ static void set_fdc(int drive)
current_drive = drive;
}
if (fdc != 1 && fdc != 0) {
- printk("bad fdc value\n");
+ printk(KERN_INFO "bad fdc value\n");
return;
}
set_dor(fdc, ~0, 8);
@@ -1112,7 +1112,7 @@ static void setup_DMA(void)
if (raw_cmd->length = 0) {
int i;
- printk("zero dma transfer size:");
+ printk(KERN_INFO "zero dma transfer size:");
for (i = 0; i < raw_cmd->cmd_count; i++)
printk("%x,", raw_cmd->cmd[i]);
printk("\n");
@@ -1121,7 +1121,7 @@ static void setup_DMA(void)
return;
}
if (((unsigned long)raw_cmd->kernel_data) % 512) {
- printk("non aligned address: %p\n", raw_cmd->kernel_data);
+ printk(KERN_INFO "non aligned address: %p\n", raw_cmd->kernel_data);
cont->done(0);
FDCS->reset = 1;
return;
@@ -1755,9 +1755,9 @@ irqreturn_t floppy_interrupt(int irq, vo
do_floppy = NULL;
if (fdc >= N_FDC || FDCS->address = -1) {
/* we don't even know which FDC is the culprit */
- printk("DOR0=%x\n", fdc_state[0].dor);
- printk("floppy interrupt on bizarre fdc %d\n", fdc);
- printk("handler=%p\n", handler);
+ printk(KERN_INFO "DOR0=%x\n", fdc_state[0].dor);
+ printk(KERN_INFO "floppy interrupt on bizarre fdc %d\n", fdc);
+ printk(KERN_INFO "handler=%p\n", handler);
is_alive("bizarre fdc");
return IRQ_NONE;
}
@@ -1853,46 +1853,47 @@ static void show_floppy(void)
{
int i;
- printk("\n");
- printk("floppy driver state\n");
- printk("-------------------\n");
- printk("now=%lu last interrupt=%lu diff=%lu last called handler=%p\n",
+ printk(KERN_NOTICE "\n");
+ printk(KERN_NOTICE "floppy driver state\n");
+ printk(KERN_NOTICE "-------------------\n");
+ printk(KERN_NOTICE "now=%lu last interrupt=%lu diff=%lu last called handler=%p\n",
jiffies, interruptjiffies, jiffies - interruptjiffies,
lasthandler);
#ifdef FLOPPY_SANITY_CHECK
- printk("timeout_message=%s\n", timeout_message);
- printk("last output bytes:\n");
+ printk(KERN_NOTICE "timeout_message=%s\n", timeout_message);
+ printk(KERN_NOTICE "last output bytes:\n");
for (i = 0; i < OLOGSIZE; i++)
- printk("%2x %2x %lu\n",
+ printk(KERN_NOTICE "%2x %2x %lu\n",
output_log[(i + output_log_pos) % OLOGSIZE].data,
output_log[(i + output_log_pos) % OLOGSIZE].status,
output_log[(i + output_log_pos) % OLOGSIZE].jiffies);
- printk("last result at %lu\n", resultjiffies);
- printk("last redo_fd_request at %lu\n", lastredo);
+ printk(KERN_NOTICE "last result at %lu\n", resultjiffies);
+ printk(KERN_NOTICE "last redo_fd_request at %lu\n", lastredo);
+ printk(KERN_NOTICE);
for (i = 0; i < resultsize; i++) {
printk("%2x ", reply_buffer[i]);
}
printk("\n");
#endif
- printk("status=%x\n", fd_inb(FD_STATUS));
- printk("fdc_busy=%lu\n", fdc_busy);
+ printk(KERN_NOTICE "status=%x\n", fd_inb(FD_STATUS));
+ printk(KERN_NOTICE "fdc_busy=%lu\n", fdc_busy);
if (do_floppy)
- printk("do_floppy=%p\n", do_floppy);
+ printk(KERN_NOTICE "do_floppy=%p\n", do_floppy);
if (floppy_work.pending)
- printk("floppy_work.func=%p\n", floppy_work.func);
+ printk(KERN_NOTICE "floppy_work.func=%p\n", floppy_work.func);
if (timer_pending(&fd_timer))
- printk("fd_timer.function=%p\n", fd_timer.function);
+ printk(KERN_NOTICE "fd_timer.function=%p\n", fd_timer.function);
if (timer_pending(&fd_timeout)) {
- printk("timer_function=%p\n", fd_timeout.function);
- printk("expires=%lu\n", fd_timeout.expires - jiffies);
- printk("now=%lu\n", jiffies);
- }
- printk("cont=%p\n", cont);
- printk("current_req=%p\n", current_req);
- printk("command_status=%d\n", command_status);
- printk("\n");
+ printk(KERN_NOTICE "timer_function=%p\n", fd_timeout.function);
+ printk(KERN_NOTICE "expires=%lu\n", fd_timeout.expires - jiffies);
+ printk(KERN_NOTICE "now=%lu\n", jiffies);
+ }
+ printk(KERN_NOTICE "cont=%p\n", cont);
+ printk(KERN_NOTICE "current_req=%p\n", current_req);
+ printk(KERN_NOTICE "command_status=%d\n", command_status);
+ printk(KERN_NOTICE "\n");
}
static void floppy_shutdown(unsigned long data)
@@ -1918,7 +1919,7 @@ static void floppy_shutdown(unsigned lon
cont->done(0);
cont->redo(); /* this will recall reset when needed */
} else {
- printk("no cont in shutdown!\n");
+ printk(KERN_INFO "no cont in shutdown!\n");
process_fd_request();
}
is_alive("floppy shutdown");
@@ -2320,7 +2321,7 @@ static void request_done(int uptodate)
reschedule_timeout(MAXTIMEOUT, "request done %d", uptodate);
if (!req) {
- printk("floppy.c: no request in request_done\n");
+ printk(KERN_INFO "floppy.c: no request in request_done\n");
return;
}
@@ -2390,13 +2391,13 @@ static void rw_interrupt(void)
(in_sector_offset + current_count_sectors + ssize - 1) / ssize) {
DPRINT("long rw: %x instead of %lx\n",
nr_sectors, current_count_sectors);
- printk("rs=%d s=%d\n", R_SECTOR, SECTOR);
- printk("rh=%d h=%d\n", R_HEAD, HEAD);
- printk("rt=%d t=%d\n", R_TRACK, TRACK);
- printk("heads=%d eoc=%d\n", heads, eoc);
- printk("spt=%d st=%d ss=%d\n", SECT_PER_TRACK,
+ printk(KERN_INFO "rs=%d s=%d\n", R_SECTOR, SECTOR);
+ printk(KERN_INFO "rh=%d h=%d\n", R_HEAD, HEAD);
+ printk(KERN_INFO "rt=%d t=%d\n", R_TRACK, TRACK);
+ printk(KERN_INFO "heads=%d eoc=%d\n", heads, eoc);
+ printk(KERN_INFO "spt=%d st=%d ss=%d\n", SECT_PER_TRACK,
fsector_t, ssize);
- printk("in_sector_offset=%d\n", in_sector_offset);
+ printk(KERN_INFO "in_sector_offset=%d\n", in_sector_offset);
}
#endif
@@ -2509,14 +2510,14 @@ static void copy_buffer(int ssize, int m
if ((remaining >> 9) > current_req->nr_sectors &&
CT(COMMAND) = FD_WRITE) {
DPRINT("in copy buffer\n");
- printk("current_count_sectors=%ld\n", current_count_sectors);
- printk("remaining=%d\n", remaining >> 9);
- printk("current_req->nr_sectors=%ld\n",
+ printk(KERN_INFO "current_count_sectors=%ld\n", current_count_sectors);
+ printk(KERN_INFO "remaining=%d\n", remaining >> 9);
+ printk(KERN_INFO "current_req->nr_sectors=%ld\n",
current_req->nr_sectors);
- printk("current_req->current_nr_sectors=%u\n",
+ printk(KERN_INFO "current_req->current_nr_sectors=%u\n",
current_req->current_nr_sectors);
- printk("max_sector=%d\n", max_sector);
- printk("ssize=%d\n", ssize);
+ printk(KERN_INFO "max_sector=%d\n", max_sector);
+ printk(KERN_INFO "ssize=%d\n", ssize);
}
#endif
@@ -2542,14 +2543,14 @@ static void copy_buffer(int ssize, int m
DPRINT("buffer overrun in copy buffer %d\n",
(int)((floppy_track_buffer -
dma_buffer) >> 9));
- printk("fsector_t=%d buffer_min=%d\n",
+ printk(KERN_INFO "fsector_t=%d buffer_min=%d\n",
fsector_t, buffer_min);
- printk("current_count_sectors=%ld\n",
+ printk(KERN_INFO "current_count_sectors=%ld\n",
current_count_sectors);
if (CT(COMMAND) = FD_READ)
- printk("read\n");
+ printk(KERN_INFO "read\n");
if (CT(COMMAND) = FD_WRITE)
- printk("write\n");
+ printk(KERN_INFO "write\n");
break;
}
if (((unsigned long)buffer) % 512)
@@ -2578,7 +2579,7 @@ static inline int check_dma_crossing(cha
unsigned long length, char *message)
{
if (CROSS_64KB(start, length)) {
- printk("DMA xfer crosses 64KB boundary in %s %p-%p\n",
+ printk(KERN_INFO "DMA xfer crosses 64KB boundary in %s %p-%p\n",
message, start, start + length);
return 1;
} else
@@ -2604,7 +2605,7 @@ static void virtualdmabug_workaround(voi
end_sector = SECTOR + hard_sectors - 1;
#ifdef FLOPPY_SANITY_CHECK
if (end_sector > SECT_PER_TRACK) {
- printk("too many sectors %d > %d\n",
+ printk(KERN_INFO "too many sectors %d > %d\n",
end_sector, SECT_PER_TRACK);
return;
}
@@ -2630,7 +2631,7 @@ static int make_raw_rw_request(void)
int max_sector, max_size, tracksize, ssize;
if (max_buffer_sectors = 0) {
- printk("VFS: Block I/O scheduled on unopened device\n");
+ printk(KERN_INFO "VFS: Block I/O scheduled on unopened device\n");
return 0;
}
@@ -2859,19 +2860,19 @@ static int make_raw_rw_request(void)
DPRINT("fractionary current count b=%lx s=%lx\n",
raw_cmd->length, current_count_sectors);
if (raw_cmd->kernel_data != current_req->buffer)
- printk("addr=%d, length=%ld\n",
+ printk(KERN_INFO "addr=%d, length=%ld\n",
(int)((raw_cmd->kernel_data -
floppy_track_buffer) >> 9),
current_count_sectors);
- printk("st=%d ast=%d mse=%d msi=%d\n",
+ printk(KERN_INFO "st=%d ast=%d mse=%d msi=%d\n",
fsector_t, aligned_sector_t, max_sector, max_size);
- printk("ssize=%x SIZECODE=%d\n", ssize, SIZECODE);
- printk("command=%x SECTOR=%d HEAD=%d, TRACK=%d\n",
+ printk(KERN_INFO "ssize=%x SIZECODE=%d\n", ssize, SIZECODE);
+ printk(KERN_INFO "command=%x SECTOR=%d HEAD=%d, TRACK=%d\n",
COMMAND, SECTOR, HEAD, TRACK);
- printk("buffer drive=%d\n", buffer_drive);
- printk("buffer track=%d\n", buffer_track);
- printk("buffer_min=%d\n", buffer_min);
- printk("buffer_max=%d\n", buffer_max);
+ printk(KERN_INFO "buffer drive=%d\n", buffer_drive);
+ printk(KERN_INFO "buffer track=%d\n", buffer_track);
+ printk(KERN_INFO "buffer_min=%d\n", buffer_min);
+ printk(KERN_INFO "buffer_max=%d\n", buffer_max);
return 0;
}
@@ -2882,14 +2883,14 @@ static int make_raw_rw_request(void)
raw_cmd->kernel_data + raw_cmd->length >
floppy_track_buffer + (max_buffer_sectors << 10)) {
DPRINT("buffer overrun in schedule dma\n");
- printk("fsector_t=%d buffer_min=%d current_count=%ld\n",
+ printk(KERN_INFO "fsector_t=%d buffer_min=%d current_count=%ld\n",
fsector_t, buffer_min, raw_cmd->length >> 9);
- printk("current_count_sectors=%ld\n",
+ printk(KERN_INFO "current_count_sectors=%ld\n",
current_count_sectors);
if (CT(COMMAND) = FD_READ)
- printk("read\n");
+ printk(KERN_INFO "read\n");
if (CT(COMMAND) = FD_WRITE)
- printk("write\n");
+ printk(KERN_INFO "write\n");
return 0;
}
} else if (raw_cmd->length > current_req->nr_sectors << 9 ||
@@ -2898,8 +2899,8 @@ static int make_raw_rw_request(void)
return 0;
} else if (raw_cmd->length < current_count_sectors << 9) {
DPRINT("more sectors than bytes\n");
- printk("bytes=%ld\n", raw_cmd->length >> 9);
- printk("sectors=%ld\n", current_count_sectors);
+ printk(KERN_INFO "bytes=%ld\n", raw_cmd->length >> 9);
+ printk(KERN_INFO "sectors=%ld\n", current_count_sectors);
}
if (raw_cmd->length = 0) {
DPRINT("zero dma transfer attempted from make_raw_request\n");
@@ -2996,14 +2997,14 @@ static void process_fd_request(void)
static void do_fd_request(request_queue_t * q)
{
if (max_buffer_sectors = 0) {
- printk("VFS: do_fd_request called on non-open device\n");
+ printk(KERN_INFO "VFS: do_fd_request called on non-open device\n");
return;
}
if (usage_count = 0) {
- printk("warning: usage count=0, current_req=%p exiting\n",
+ printk(KERN_INFO "warning: usage count=0, current_req=%p exiting\n",
current_req);
- printk("sect=%ld flags=%lx\n", (long)current_req->sector,
+ printk(KERN_INFO "sect=%ld flags=%lx\n", (long)current_req->sector,
current_req->flags);
return;
}
@@ -3051,7 +3052,7 @@ static int poll_drive(int interruptible,
static void reset_intr(void)
{
- printk("weird, reset interrupt called\n");
+ printk(KERN_WARNING "weird, reset interrupt called\n");
}
static struct cont_t reset_cont = {
@@ -3421,7 +3422,7 @@ static inline int normalize_ioctl(int *c
*size = _IOC_SIZE(*cmd);
*cmd = ioctl_table[i];
if (*size > _IOC_SIZE(*cmd)) {
- printk("ioctl not yet supported\n");
+ printk(KERN_ERR "ioctl not yet supported\n");
return -EFAULT;
}
return 0;
@@ -3904,7 +3905,7 @@ static int floppy_revalidate(struct gend
if (UTESTF(FD_DISK_CHANGED) ||
UTESTF(FD_VERIFY) || test_bit(drive, &fake_change) || NO_GEOM) {
if (usage_count = 0) {
- printk("VFS: revalidate called on non-open device.\n");
+ printk(KERN_INFO "VFS: revalidate called on non-open device.\n");
return -EFAULT;
}
lock_fdc(drive, 0);
@@ -4022,14 +4023,14 @@ static char __init get_fdc_version(void)
* LOCK/UNLOCK */
}
if ((r != 1) || (reply_buffer[0] != 0x00)) {
- printk("FDC %d init: UNLOCK: unexpected return of %d bytes.\n",
+ printk(KERN_WARNING "FDC %d init: UNLOCK: unexpected return of %d bytes.\n",
fdc, r);
return FDC_UNKNOWN;
}
output_byte(FD_PARTID);
r = result();
if (r != 1) {
- printk("FDC %d init: PARTID: unexpected return of %d bytes.\n",
+ printk(KERN_WARNING "FDC %d init: PARTID: unexpected return of %d bytes.\n",
fdc, r);
return FDC_UNKNOWN;
}
@@ -4544,15 +4545,15 @@ static void floppy_release_irq_and_dma(v
#ifndef __sparc__
for (drive = 0; drive < N_FDC * 4; drive++)
if (timer_pending(motor_off_timer + drive))
- printk("motor off timer %d still active\n", drive);
+ printk(KERN_INFO "motor off timer %d still active\n", drive);
#endif
if (timer_pending(&fd_timeout))
- printk("floppy timer still active:%s\n", timeout_message);
+ printk(KERN_INFO "floppy timer still active:%s\n", timeout_message);
if (timer_pending(&fd_timer))
- printk("auxiliary floppy timer still active\n");
+ printk(KERN_INFO "auxiliary floppy timer still active\n");
if (floppy_work.pending)
- printk("work still pending\n");
+ printk(KERN_INFO "work still pending\n");
#endif
old_fdc = fdc;
for (fdc = 0; fdc < N_FDC; fdc++)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [KJ] [PATCH] drivers/block/floppy.c: trivial printk() updates
2005-11-14 7:35 [KJ] [PATCH] drivers/block/floppy.c: trivial printk() updates Daniel Marjamäki
@ 2005-11-14 8:21 ` Christophe Lucas
2005-11-14 10:03 ` Daniel Marjamäki
1 sibling, 0 replies; 3+ messages in thread
From: Christophe Lucas @ 2005-11-14 8:21 UTC (permalink / raw)
To: kernel-janitors
Daniel Marjamäki (daniel.marjamaki@comhem.se) wrote:
>
> This is a trivial update that inserts appropriate KERN_ in printk() calls.
>
> Signed-off-by: Daniel Marjamäki
>
>
> --- linux-2.6.14.1.orig/drivers/block/floppy.c 2005-11-14 08:14:40.000000000 +0100
> +++ linux-2.6.14.1/drivers/block/floppy.c 2005-11-14 08:25:46.000000000 +0100
> @@ -310,7 +310,7 @@ static int initialising = 1;
> #define USETF(x) (set_bit(x##_BIT, &UDRS->flags))
> #define UTESTF(x) (test_bit(x##_BIT, &UDRS->flags))
>
> -#define DPRINT(format, args...) printk(DEVICE_NAME "%d: " format, current_drive , ## args)
> +#define DPRINT(format, args...) printk(KERN_INFO DEVICE_NAME "%d: " format, current_drive , ## args)
>
> #define PH_HEAD(floppy,head) (((((floppy)->stretch & 2) >>1) ^ head) << 2)
> #define STRETCH(floppy) ((floppy)->stretch & FD_STRETCH)
> @@ -620,7 +620,7 @@ static inline void set_debugt(void)
> static inline void debugt(const char *message)
> {
> if (DP->flags & DEBUGT)
> - printk("%s dtime=%lu\n", message, jiffies - debugtimer);
> + printk(KERN_INFO "%s dtime=%lu\n", message, jiffies - debugtimer);
> }
Are you sure for this one ?
I will put KERN_DEBUG instead of KERN_INFO :)
Have a nice day,
- Christophe (clucas@rotomalug.org)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [KJ] [PATCH] drivers/block/floppy.c: trivial printk() updates
2005-11-14 7:35 [KJ] [PATCH] drivers/block/floppy.c: trivial printk() updates Daniel Marjamäki
2005-11-14 8:21 ` Christophe Lucas
@ 2005-11-14 10:03 ` Daniel Marjamäki
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Marjamäki @ 2005-11-14 10:03 UTC (permalink / raw)
To: kernel-janitors
Here's an updated version of my previous patch, that uses KERN_DEBUG instead of KERN_INFO.
Signed-off-by: Daniel Marjamäki
--- linux-2.6.14.1.orig/drivers/block/floppy.c 2005-11-14 08:14:40.000000000 +0100
+++ linux-2.6.14.1/drivers/block/floppy.c 2005-11-14 08:25:46.000000000 +0100
@@ -310,7 +310,7 @@ static int initialising = 1;
#define USETF(x) (set_bit(x##_BIT, &UDRS->flags))
#define UTESTF(x) (test_bit(x##_BIT, &UDRS->flags))
-#define DPRINT(format, args...) printk(DEVICE_NAME "%d: " format, current_drive , ## args)
+#define DPRINT(format, args...) printk(KERN_DEBUG DEVICE_NAME "%d: " format, current_drive , ## args)
#define PH_HEAD(floppy,head) (((((floppy)->stretch & 2) >>1) ^ head) << 2)
#define STRETCH(floppy) ((floppy)->stretch & FD_STRETCH)
@@ -620,7 +620,7 @@ static inline void set_debugt(void)
static inline void debugt(const char *message)
{
if (DP->flags & DEBUGT)
- printk("%s dtime=%lu\n", message, jiffies - debugtimer);
+ printk(KERN_DEBUG "%s dtime=%lu\n", message, jiffies - debugtimer);
}
#else
static inline void set_debugt(void) { }
@@ -860,7 +860,7 @@ static void set_fdc(int drive)
current_drive = drive;
}
if (fdc != 1 && fdc != 0) {
- printk("bad fdc value\n");
+ printk(KERN_INFO "bad fdc value\n");
return;
}
set_dor(fdc, ~0, 8);
@@ -1112,7 +1112,7 @@ static void setup_DMA(void)
if (raw_cmd->length = 0) {
int i;
- printk("zero dma transfer size:");
+ printk(KERN_DEBUG "zero dma transfer size:");
for (i = 0; i < raw_cmd->cmd_count; i++)
printk("%x,", raw_cmd->cmd[i]);
printk("\n");
@@ -1121,7 +1121,7 @@ static void setup_DMA(void)
return;
}
if (((unsigned long)raw_cmd->kernel_data) % 512) {
- printk("non aligned address: %p\n", raw_cmd->kernel_data);
+ printk(KERN_DEBUG "non aligned address: %p\n", raw_cmd->kernel_data);
cont->done(0);
FDCS->reset = 1;
return;
@@ -1755,9 +1755,9 @@ irqreturn_t floppy_interrupt(int irq, vo
do_floppy = NULL;
if (fdc >= N_FDC || FDCS->address = -1) {
/* we don't even know which FDC is the culprit */
- printk("DOR0=%x\n", fdc_state[0].dor);
- printk("floppy interrupt on bizarre fdc %d\n", fdc);
- printk("handler=%p\n", handler);
+ printk(KERN_DEBUG "DOR0=%x\n", fdc_state[0].dor);
+ printk(KERN_DEBUG "floppy interrupt on bizarre fdc %d\n", fdc);
+ printk(KERN_DEBUG "handler=%p\n", handler);
is_alive("bizarre fdc");
return IRQ_NONE;
}
@@ -1853,46 +1853,47 @@ static void show_floppy(void)
{
int i;
- printk("\n");
- printk("floppy driver state\n");
- printk("-------------------\n");
- printk("now=%lu last interrupt=%lu diff=%lu last called handler=%p\n",
+ printk(KERN_NOTICE "\n");
+ printk(KERN_NOTICE "floppy driver state\n");
+ printk(KERN_NOTICE "-------------------\n");
+ printk(KERN_NOTICE "now=%lu last interrupt=%lu diff=%lu last called handler=%p\n",
jiffies, interruptjiffies, jiffies - interruptjiffies,
lasthandler);
#ifdef FLOPPY_SANITY_CHECK
- printk("timeout_message=%s\n", timeout_message);
- printk("last output bytes:\n");
+ printk(KERN_NOTICE "timeout_message=%s\n", timeout_message);
+ printk(KERN_NOTICE "last output bytes:\n");
for (i = 0; i < OLOGSIZE; i++)
- printk("%2x %2x %lu\n",
+ printk(KERN_NOTICE "%2x %2x %lu\n",
output_log[(i + output_log_pos) % OLOGSIZE].data,
output_log[(i + output_log_pos) % OLOGSIZE].status,
output_log[(i + output_log_pos) % OLOGSIZE].jiffies);
- printk("last result at %lu\n", resultjiffies);
- printk("last redo_fd_request at %lu\n", lastredo);
+ printk(KERN_NOTICE "last result at %lu\n", resultjiffies);
+ printk(KERN_NOTICE "last redo_fd_request at %lu\n", lastredo);
+ printk(KERN_NOTICE);
for (i = 0; i < resultsize; i++) {
printk("%2x ", reply_buffer[i]);
}
printk("\n");
#endif
- printk("status=%x\n", fd_inb(FD_STATUS));
- printk("fdc_busy=%lu\n", fdc_busy);
+ printk(KERN_NOTICE "status=%x\n", fd_inb(FD_STATUS));
+ printk(KERN_NOTICE "fdc_busy=%lu\n", fdc_busy);
if (do_floppy)
- printk("do_floppy=%p\n", do_floppy);
+ printk(KERN_NOTICE "do_floppy=%p\n", do_floppy);
if (floppy_work.pending)
- printk("floppy_work.func=%p\n", floppy_work.func);
+ printk(KERN_NOTICE "floppy_work.func=%p\n", floppy_work.func);
if (timer_pending(&fd_timer))
- printk("fd_timer.function=%p\n", fd_timer.function);
+ printk(KERN_NOTICE "fd_timer.function=%p\n", fd_timer.function);
if (timer_pending(&fd_timeout)) {
- printk("timer_function=%p\n", fd_timeout.function);
- printk("expires=%lu\n", fd_timeout.expires - jiffies);
- printk("now=%lu\n", jiffies);
- }
- printk("cont=%p\n", cont);
- printk("current_req=%p\n", current_req);
- printk("command_status=%d\n", command_status);
- printk("\n");
+ printk(KERN_NOTICE "timer_function=%p\n", fd_timeout.function);
+ printk(KERN_NOTICE "expires=%lu\n", fd_timeout.expires - jiffies);
+ printk(KERN_NOTICE "now=%lu\n", jiffies);
+ }
+ printk(KERN_NOTICE "cont=%p\n", cont);
+ printk(KERN_NOTICE "current_req=%p\n", current_req);
+ printk(KERN_NOTICE "command_status=%d\n", command_status);
+ printk(KERN_NOTICE "\n");
}
static void floppy_shutdown(unsigned long data)
@@ -1918,7 +1919,7 @@ static void floppy_shutdown(unsigned lon
cont->done(0);
cont->redo(); /* this will recall reset when needed */
} else {
- printk("no cont in shutdown!\n");
+ printk(KERN_DEBUG "no cont in shutdown!\n");
process_fd_request();
}
is_alive("floppy shutdown");
@@ -2320,7 +2321,7 @@ static void request_done(int uptodate)
reschedule_timeout(MAXTIMEOUT, "request done %d", uptodate);
if (!req) {
- printk("floppy.c: no request in request_done\n");
+ printk(KERN_DEBUG "floppy.c: no request in request_done\n");
return;
}
@@ -2390,13 +2391,13 @@ static void rw_interrupt(void)
(in_sector_offset + current_count_sectors + ssize - 1) / ssize) {
DPRINT("long rw: %x instead of %lx\n",
nr_sectors, current_count_sectors);
- printk("rs=%d s=%d\n", R_SECTOR, SECTOR);
- printk("rh=%d h=%d\n", R_HEAD, HEAD);
- printk("rt=%d t=%d\n", R_TRACK, TRACK);
- printk("heads=%d eoc=%d\n", heads, eoc);
- printk("spt=%d st=%d ss=%d\n", SECT_PER_TRACK,
+ printk(KERN_DEBUG "rs=%d s=%d\n", R_SECTOR, SECTOR);
+ printk(KERN_DEBUG "rh=%d h=%d\n", R_HEAD, HEAD);
+ printk(KERN_DEBUG "rt=%d t=%d\n", R_TRACK, TRACK);
+ printk(KERN_DEBUG "heads=%d eoc=%d\n", heads, eoc);
+ printk(KERN_DEBUG "spt=%d st=%d ss=%d\n", SECT_PER_TRACK,
fsector_t, ssize);
- printk("in_sector_offset=%d\n", in_sector_offset);
+ printk(KERN_DEBUG "in_sector_offset=%d\n", in_sector_offset);
}
#endif
@@ -2509,14 +2510,14 @@ static void copy_buffer(int ssize, int m
if ((remaining >> 9) > current_req->nr_sectors &&
CT(COMMAND) = FD_WRITE) {
DPRINT("in copy buffer\n");
- printk("current_count_sectors=%ld\n", current_count_sectors);
- printk("remaining=%d\n", remaining >> 9);
- printk("current_req->nr_sectors=%ld\n",
+ printk(KERN_DEBUG "current_count_sectors=%ld\n", current_count_sectors);
+ printk(KERN_DEBUG "remaining=%d\n", remaining >> 9);
+ printk(KERN_DEBUG "current_req->nr_sectors=%ld\n",
current_req->nr_sectors);
- printk("current_req->current_nr_sectors=%u\n",
+ printk(KERN_DEBUG "current_req->current_nr_sectors=%u\n",
current_req->current_nr_sectors);
- printk("max_sector=%d\n", max_sector);
- printk("ssize=%d\n", ssize);
+ printk(KERN_DEBUG "max_sector=%d\n", max_sector);
+ printk(KERN_DEBUG "ssize=%d\n", ssize);
}
#endif
@@ -2542,14 +2543,14 @@ static void copy_buffer(int ssize, int m
DPRINT("buffer overrun in copy buffer %d\n",
(int)((floppy_track_buffer -
dma_buffer) >> 9));
- printk("fsector_t=%d buffer_min=%d\n",
+ printk(KERN_DEBUG "fsector_t=%d buffer_min=%d\n",
fsector_t, buffer_min);
- printk("current_count_sectors=%ld\n",
+ printk(KERN_DEBUG "current_count_sectors=%ld\n",
current_count_sectors);
if (CT(COMMAND) = FD_READ)
- printk("read\n");
+ printk(KERN_DEBUG "read\n");
if (CT(COMMAND) = FD_WRITE)
- printk("write\n");
+ printk(KERN_DEBUG "write\n");
break;
}
if (((unsigned long)buffer) % 512)
@@ -2578,7 +2579,7 @@ static inline int check_dma_crossing(cha
unsigned long length, char *message)
{
if (CROSS_64KB(start, length)) {
- printk("DMA xfer crosses 64KB boundary in %s %p-%p\n",
+ printk(KERN_DEBUG "DMA xfer crosses 64KB boundary in %s %p-%p\n",
message, start, start + length);
return 1;
} else
@@ -2604,7 +2605,7 @@ static void virtualdmabug_workaround(voi
end_sector = SECTOR + hard_sectors - 1;
#ifdef FLOPPY_SANITY_CHECK
if (end_sector > SECT_PER_TRACK) {
- printk("too many sectors %d > %d\n",
+ printk(KERN_DEBUG "too many sectors %d > %d\n",
end_sector, SECT_PER_TRACK);
return;
}
@@ -2630,7 +2631,7 @@ static int make_raw_rw_request(void)
int max_sector, max_size, tracksize, ssize;
if (max_buffer_sectors = 0) {
- printk("VFS: Block I/O scheduled on unopened device\n");
+ printk(KERN_DEBUG "VFS: Block I/O scheduled on unopened device\n");
return 0;
}
@@ -2859,19 +2860,19 @@ static int make_raw_rw_request(void)
DPRINT("fractionary current count b=%lx s=%lx\n",
raw_cmd->length, current_count_sectors);
if (raw_cmd->kernel_data != current_req->buffer)
- printk("addr=%d, length=%ld\n",
+ printk(KERN_DEBUG "addr=%d, length=%ld\n",
(int)((raw_cmd->kernel_data -
floppy_track_buffer) >> 9),
current_count_sectors);
- printk("st=%d ast=%d mse=%d msi=%d\n",
+ printk(KERN_DEBUG "st=%d ast=%d mse=%d msi=%d\n",
fsector_t, aligned_sector_t, max_sector, max_size);
- printk("ssize=%x SIZECODE=%d\n", ssize, SIZECODE);
- printk("command=%x SECTOR=%d HEAD=%d, TRACK=%d\n",
+ printk(KERN_DEBUG "ssize=%x SIZECODE=%d\n", ssize, SIZECODE);
+ printk(KERN_DEBUG "command=%x SECTOR=%d HEAD=%d, TRACK=%d\n",
COMMAND, SECTOR, HEAD, TRACK);
- printk("buffer drive=%d\n", buffer_drive);
- printk("buffer track=%d\n", buffer_track);
- printk("buffer_min=%d\n", buffer_min);
- printk("buffer_max=%d\n", buffer_max);
+ printk(KERN_DEBUG "buffer drive=%d\n", buffer_drive);
+ printk(KERN_DEBUG "buffer track=%d\n", buffer_track);
+ printk(KERN_DEBUG "buffer_min=%d\n", buffer_min);
+ printk(KERN_DEBUG "buffer_max=%d\n", buffer_max);
return 0;
}
@@ -2882,14 +2883,14 @@ static int make_raw_rw_request(void)
raw_cmd->kernel_data + raw_cmd->length >
floppy_track_buffer + (max_buffer_sectors << 10)) {
DPRINT("buffer overrun in schedule dma\n");
- printk("fsector_t=%d buffer_min=%d current_count=%ld\n",
+ printk(KERN_DEBUG "fsector_t=%d buffer_min=%d current_count=%ld\n",
fsector_t, buffer_min, raw_cmd->length >> 9);
- printk("current_count_sectors=%ld\n",
+ printk(KERN_DEBUG "current_count_sectors=%ld\n",
current_count_sectors);
if (CT(COMMAND) = FD_READ)
- printk("read\n");
+ printk(KERN_DEBUG "read\n");
if (CT(COMMAND) = FD_WRITE)
- printk("write\n");
+ printk(KERN_DEBUG "write\n");
return 0;
}
} else if (raw_cmd->length > current_req->nr_sectors << 9 ||
@@ -2898,8 +2899,8 @@ static int make_raw_rw_request(void)
return 0;
} else if (raw_cmd->length < current_count_sectors << 9) {
DPRINT("more sectors than bytes\n");
- printk("bytes=%ld\n", raw_cmd->length >> 9);
- printk("sectors=%ld\n", current_count_sectors);
+ printk(KERN_DEBUG "bytes=%ld\n", raw_cmd->length >> 9);
+ printk(KERN_DEBUG "sectors=%ld\n", current_count_sectors);
}
if (raw_cmd->length = 0) {
DPRINT("zero dma transfer attempted from make_raw_request\n");
@@ -2996,14 +2997,14 @@ static void process_fd_request(void)
static void do_fd_request(request_queue_t * q)
{
if (max_buffer_sectors = 0) {
- printk("VFS: do_fd_request called on non-open device\n");
+ printk(KERN_DEBUG "VFS: do_fd_request called on non-open device\n");
return;
}
if (usage_count = 0) {
- printk("warning: usage count=0, current_req=%p exiting\n",
+ printk(KERN_DEBUG "warning: usage count=0, current_req=%p exiting\n",
current_req);
- printk("sect=%ld flags=%lx\n", (long)current_req->sector,
+ printk(KERN_DEBUG "sect=%ld flags=%lx\n", (long)current_req->sector,
current_req->flags);
return;
}
@@ -3051,7 +3052,7 @@ static int poll_drive(int interruptible,
static void reset_intr(void)
{
- printk("weird, reset interrupt called\n");
+ printk(KERN_WARNING "weird, reset interrupt called\n");
}
static struct cont_t reset_cont = {
@@ -3421,7 +3422,7 @@ static inline int normalize_ioctl(int *c
*size = _IOC_SIZE(*cmd);
*cmd = ioctl_table[i];
if (*size > _IOC_SIZE(*cmd)) {
- printk("ioctl not yet supported\n");
+ printk(KERN_ERR "ioctl not yet supported\n");
return -EFAULT;
}
return 0;
@@ -3904,7 +3905,7 @@ static int floppy_revalidate(struct gend
if (UTESTF(FD_DISK_CHANGED) ||
UTESTF(FD_VERIFY) || test_bit(drive, &fake_change) || NO_GEOM) {
if (usage_count = 0) {
- printk("VFS: revalidate called on non-open device.\n");
+ printk(KERN_DEBUG "VFS: revalidate called on non-open device.\n");
return -EFAULT;
}
lock_fdc(drive, 0);
@@ -4022,14 +4023,14 @@ static char __init get_fdc_version(void)
* LOCK/UNLOCK */
}
if ((r != 1) || (reply_buffer[0] != 0x00)) {
- printk("FDC %d init: UNLOCK: unexpected return of %d bytes.\n",
+ printk(KERN_WARNING "FDC %d init: UNLOCK: unexpected return of %d bytes.\n",
fdc, r);
return FDC_UNKNOWN;
}
output_byte(FD_PARTID);
r = result();
if (r != 1) {
- printk("FDC %d init: PARTID: unexpected return of %d bytes.\n",
+ printk(KERN_WARNING "FDC %d init: PARTID: unexpected return of %d bytes.\n",
fdc, r);
return FDC_UNKNOWN;
}
@@ -4544,15 +4545,15 @@ static void floppy_release_irq_and_dma(v
#ifndef __sparc__
for (drive = 0; drive < N_FDC * 4; drive++)
if (timer_pending(motor_off_timer + drive))
- printk("motor off timer %d still active\n", drive);
+ printk(KERN_DEBUG "motor off timer %d still active\n", drive);
#endif
if (timer_pending(&fd_timeout))
- printk("floppy timer still active:%s\n", timeout_message);
+ printk(KERN_DEBUG "floppy timer still active:%s\n", timeout_message);
if (timer_pending(&fd_timer))
- printk("auxiliary floppy timer still active\n");
+ printk(KERN_DEBUG "auxiliary floppy timer still active\n");
if (floppy_work.pending)
- printk("work still pending\n");
+ printk(KERN_DEBUG "work still pending\n");
#endif
old_fdc = fdc;
for (fdc = 0; fdc < N_FDC; fdc++)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-14 10:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 7:35 [KJ] [PATCH] drivers/block/floppy.c: trivial printk() updates Daniel Marjamäki
2005-11-14 8:21 ` Christophe Lucas
2005-11-14 10:03 ` Daniel Marjamäki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.