From: Linus Torvalds <torvalds@linux-foundation.org>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>,
Jeff Garzik <jeff@garzik.org>
Subject: Re: pata_platform: Fix NULL pointer dereference
Date: Fri, 20 Jul 2007 09:12:51 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0707200910020.27249@woody.linux-foundation.org> (raw)
In-Reply-To: <20070720035058.25300.28389.sendpatchset@clockwork.opensource.se>
On Fri, 20 Jul 2007, Magnus Damm wrote:
>
> pata_platform currently dereferences a NULL pointer in pata_platform_probe()
> if pdev->dev.platform_data is set to NULL. This breakage was most likely
> introduced by commit 5f45bc50976ee1f408f7171af155aec646655a37.
Ok, the *fix* looks real enough, but it seems that you have done your line
splitting with a word processor rather than with a source code editor:
> + return ata_host_activate(host, platform_get_irq(pdev, 0),
> + ata_interrupt, pp_info ? pp_info->irq_flags
> + : 0, &pata_platform_sht);
Please don't do things like this. Splitting up expressions across two
lines just to make the line length come out "right" is silly.
So do the
"pp_info ? pp_info->irq_flags : 0"
expression on one line.
And if it means that the line is longe rthan 80 characters, then so be it.
It's ok. It's still more readable than the alternative.
Linus "nit-picking bastard" Torvalds
next prev parent reply other threads:[~2007-07-20 16:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070720035058.25300.28389.sendpatchset@clockwork.opensource.s e>
2007-07-20 3:50 ` Magnus Damm
2007-07-20 4:02 ` Paul Mundt
2007-07-20 11:46 ` Jeff Garzik
2007-07-20 16:12 ` Linus Torvalds [this message]
2007-07-21 15:46 ` Jan Engelhardt
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=alpine.LFD.0.999.0707200910020.27249@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=jeff@garzik.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®