From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: bzolnier@gmail.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH] pdc2026x: remove surplus initialiser
Date: Sat, 19 Jan 2008 19:54:03 +0300 [thread overview]
Message-ID: <47922B2B.5010807@ru.mvista.com> (raw)
In-Reply-To: <20080119155525.0d361552@lxorguk.ukuu.org.uk>
Hello.
Alan Cox wrote:
> Signed-off-by: Alan Cox <alan@redhat.com>
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc8-mm1/drivers/ide/pci/pdc202xx_old.c linux-2.6.24-rc8-mm1/drivers/ide/pci/pdc202xx_old.c
> --- linux.vanilla-2.6.24-rc8-mm1/drivers/ide/pci/pdc202xx_old.c 2008-01-19 14:47:56.000000000 +0000
> +++ linux-2.6.24-rc8-mm1/drivers/ide/pci/pdc202xx_old.c 2008-01-19 15:00:08.000000000 +0000
> @@ -138,7 +138,7 @@
> static u8 __devinit pdc2026x_old_cable_detect(ide_hwif_t *hwif)
> {
> struct pci_dev *dev = to_pci_dev(hwif->dev);
> - u16 CIS = 0, mask = (hwif->channel) ? (1<<11) : (1<<10);
> + u16 CIS, mask = (hwif->channel) ? (1<<11) : (1<<10);
>
> pci_read_config_word(dev, 0x50, &CIS);
Since we ignore the result of this function, if it fails CIS may be left
uninitialized if the function fails. So, the initializer is not as useless as
it seems (and there's a lot more of such cases in drivers/ide/pci/ :-)...
MBR, Sergei
next prev parent reply other threads:[~2008-01-19 16:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-19 15:55 [PATCH] pdc2026x: remove surplus initialiser Alan Cox
2008-01-19 16:54 ` Sergei Shtylyov [this message]
2008-01-19 20:00 ` Alan Cox
2008-01-21 23:13 ` Bartlomiej Zolnierkiewicz
2008-01-21 23:13 ` Bartlomiej Zolnierkiewicz
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=47922B2B.5010807@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).