All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/2] pdc202xx_new: fix PCI refcounting
Date: Sun, 26 Aug 2007 16:56:49 +0400	[thread overview]
Message-ID: <46D17891.4010007@ru.mvista.com> (raw)
In-Reply-To: <200708212201.36591.bzolnier@gmail.com>

Bartlomiej Zolnierkiewicz wrote:

>>The driver erroneously "lets go" the mate IDE chip in init_setup_pdc20270()
>>when ide_setup_pci_devices() call succeeds -- fix this, and drop a couple of
>>useless assignments in this function while at it...

>>Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> applied but

>>---
>>This patch is against the current Linus' tree, it has only been compile tested
>>since I do not have PDC2027x chips (and even less so behind DC21150 bridge :-).

>>Index: linux-2.6/drivers/ide/pci/pdc202xx_new.c
>>===================================================================
>>--- linux-2.6.orig/drivers/ide/pci/pdc202xx_new.c
>>+++ linux-2.6/drivers/ide/pci/pdc202xx_new.c
[...]
>>@@ -521,7 +521,7 @@ static int __devinit init_setup_pdcnew(s
>> static int __devinit init_setup_pdc20270(struct pci_dev *dev,
>> 					 ide_pci_device_t *d)
>> {
>>-	struct pci_dev *findev = NULL;
>>+	struct pci_dev *findev;

> drivers/ide/pci/pdc202xx_new.c: In function ‘init_setup_pdc20270’:
> drivers/ide/pci/pdc202xx_new.c:530: warning: ‘findev’ may be used uninitialized in this function

> with gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)

> Seems to be gcc problem

    No, it must be all those pills I'm taking... ;-)

> but I reverted this chunk.

    And you were absolutely right -- findev must be NULL for the search to go 
thru all the PCI devices. :-/

> Update: after applying patch #2/2 and fixing the reject caused by the above change
> warning disappears (patch #2/2 besides renaming "findev" to "dev2" moves the code
> around making it easier for gcc to deduce what is going on :).

    Right, because pci_get_slot() is not a "device scanner" and so doesn't 
need the starting node.
    I guess there's no need to recast now?

WBR, Sergei

  reply	other threads:[~2007-08-26 12:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-18 18:46 [PATCH 1/2] pdc202xx_new: fix PCI refcounting Sergei Shtylyov
2007-08-21 20:01 ` Bartlomiej Zolnierkiewicz
2007-08-26 12:56   ` Sergei Shtylyov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-19 14:53 Sergei Shtylyov

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=46D17891.4010007@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --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 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.