lkml.org 
[lkml]   [2010]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: + drivers-block-floppyc-use-pr_level.patch added to -mm tree
From
Date
On Wed, 2010-01-27 at 10:31 +0100, Jiri Slaby wrote:
> On 01/27/2010 01:37 AM, akpm@linux-foundation.org wrote:
> > @@ -687,9 +687,7 @@ static void __reschedule_timeout(int dri
> > fd_timeout.expires = jiffies + UDP->timeout;
> > add_timer(&fd_timeout);
> > if (UDP->flags & FD_DEBUG) {
> > - DPRINT("reschedule timeout ");
> > - printk(message, marg);
> > - printk("\n");
> > + DPRINT("reschedule timeout %s %d\n", message, marg);
>
> This is wrong.

I disagree.

It does add an always output decimal value to the DPRINT
instead of a mostly mismatched format and argument
printk(message, marg).

Previous single matched output use of message/marg:

- reschedule_timeout(MAXTIMEOUT, "request done %d", uptodate);
+ reschedule_timeout(MAXTIMEOUT, "request done", uptodate);

vs now:

$ grep reschedule_timeout drivers/block/floppy.c
static void __reschedule_timeout(int drive, const char *message, int marg)
static void reschedule_timeout(int drive, const char *message, int marg)
__reschedule_timeout(drive, message, marg);
__reschedule_timeout(drive, "lock fdc", 0);
reschedule_timeout(current_reqD, "floppy start", 0);
reschedule_timeout(MAXTIMEOUT, "do wakeup", 0);
reschedule_timeout(MAXTIMEOUT, "request done", uptodate);
reschedule_timeout(current_reqD, "redo fd request", 0);
reschedule_timeout(MAXTIMEOUT, "floppy init", MAXTIMEOUT);

Arguably, that single use could be something like:

char msg_buf[sizeof("request done ") + 20];
snprintf(msg_buf, sizeof(msg_buf), "request_done %d", uptodate);
reschedule_timeout(MAXTIMEOUT, msg_buf);

(uptodate should be 0, 1 or 2)

with the now unused marg argument removed from
reschedule_timeout and __reschedule_timeout.



\
 
 \ /
  Last update: 2010-01-27 15:11    [W:0.033 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site