lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH][resend][SCSI] Reduce number of sequential pointer derefs in scsi_error.c and reduce size as well
    On Thu, Nov 18, 2010 at 11:30 AM, Jesper Juhl <jj@chaosbits.net> wrote:
    >
    > This is the fourth time I send this patch. For some reason it seems unable
    > to get any feedback at all. I'd really appreciate a clear ACK or NACK on
    > it and I'll keep resending it until it's either merged or I get a NACK
    > with a reason.

    The patch looks ok to me, but you've basically selected the least
    interesting file possible. No wonder people can't seem to care.

    Also, this is just ugly as hell, and doesn't help anything:

    + int (*eh_abort_handler)(struct scsi_cmnd *) =
    + scmd->device->host->hostt->eh_abort_handler;

    since the compiler will have optimized that double access away anyway
    (no writes in between). So you could have made it about a thousand
    times more readable with no downside by doing

    struct scsi_host_template *hostt = scmd->device->host->hostt;

    if (!hostt->eh_abort_handler)
    return FAILED;
    return hostt->eh_abort_handler(scmd);

    instead. Look ma, no long lines.

    Rule of thumb: if you need more than one line for an expression or
    variable definition, you're doing something wrong.

    Linus


    \
     
     \ /
      Last update: 2010-11-18 21:45    [W:5.030 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site