All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jesper Juhl <jj@chaosbits.net>
Cc: linux-scsi@vger.kernel.org,
	"James E.J. Bottomley" <James.Bottomley@suse.de>,
	linux-kernel@vger.kernel.org, Eric Youngdale <eric@andante.org>,
	"David S. Miller" <davem@davemloft.net>,
	Mike Anderson <andmike@us.ibm.com>,
	Russell King <rmk@arm.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH][resend][SCSI] Reduce number of sequential pointer derefs in scsi_error.c and reduce size as well
Date: Thu, 18 Nov 2010 12:41:22 -0800	[thread overview]
Message-ID: <AANLkTi=McRJSHp8==o+=coK0_pK5s9dwUgLmrkohSmTX@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1011181957500.3651@swampdragon.chaosbits.net>

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

  reply	other threads:[~2010-11-18 20:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 19:30 [PATCH][resend][SCSI] Reduce number of sequential pointer derefs in scsi_error.c and reduce size as well Jesper Juhl
2010-11-18 20:41 ` Linus Torvalds [this message]
2010-11-18 20:49   ` Jesper Juhl
2010-11-18 20:57     ` Jesper Juhl
2010-11-18 21:06     ` Russell King
2010-11-18 20:59       ` Jesper Juhl
2010-11-18 21:18     ` Linus Torvalds
2010-11-18 21:21       ` Jesper Juhl
2010-11-20 20:30       ` Jesper Juhl
2010-11-21  0:03         ` Linus Torvalds
2010-11-21 18:48           ` Jesper Juhl
2010-12-21 17:37             ` James Bottomley
2010-12-22 20:23               ` Jesper Juhl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=McRJSHp8==o+=coK0_pK5s9dwUgLmrkohSmTX@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=James.Bottomley@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=andmike@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=eric@andante.org \
    --cc=jj@chaosbits.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.