From: Greg KH <greg@kroah.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
Neil Horman <nhorman@redhat.com>,
linux-kernel@vger.kernel.org, jeff.garzik@pobox.com,
akpm@osdl.org
Subject: Re: [Patch] Janitorial cleanup of GET_INDEX macro in arch/i386/pci/fixup.c
Date: Wed, 29 Jun 2005 23:42:00 -0700 [thread overview]
Message-ID: <20050630064200.GA23852@kroah.com> (raw)
In-Reply-To: <42C18543.4090604@pobox.com>
On Tue, Jun 28, 2005 at 01:13:39PM -0400, Jeff Garzik wrote:
> Greg KH wrote:
> >On Mon, Jun 27, 2005 at 03:19:11PM -0700, Linus Torvalds wrote:
> >
> >>
> >>On Mon, 27 Jun 2005, Neil Horman wrote:
> >>
> >>>Patch to clean up the implementation of the GET_INDEX macro in the i386
> >>>pci
> >>>fixup code so that it uses the PCI_DEVFN macro, rather than
> >>>re-implements it.
> >>
> >>This looks wrong:
> >>
> >>
> >>>-#define GET_INDEX(a, b) ((((a) - PCI_DEVICE_ID_INTEL_MCH_PA) << 3) +
> >>>((b) & 7))
> >>>+#define GET_INDEX(a, b) PCI_DEVFN((a - PCI_DEVICE_ID_INTEL_MCH_PA),b)
> >>
> >>that first argument looks like it has parentheses at the wrong place, it
> >>should be
> >>
> >> (a) - PCI_DEVICE_ID_INTEL_MCH_PA
> >>
> >>rather than
> >>
> >> (a - PCI_DEVICE_ID_INTEL_MCH_PA)
> >>
> >>methinks.
> >>
> >>Other than that... Greg?
> >
> >
> >I'd like to say yes, but I'll get an ack by the pci express people from
> >Intel first (PCI_DEVFN masks off bits that might be needed here, don't
> >really know...) Also, this is only used for an array index, not a
> >pci devfn memory access (look at how it is used in the code...)
> >
> >I'll put it in my tree for now, and let it get testing, I would not
> >recommend it for yours just yet.
>
> Please let me know, as I suggested this patch to Neil.
>
> It sure seems like the code wants a real PCI devfn, even though it is
> obviously doing a table index.
>
> Comments?
I told Andrew to drop the patch, as the code does not want a real PCI devfn.
thanks,
greg k-h
prev parent reply other threads:[~2005-06-30 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-27 14:09 [Patch] Janitorial cleanup of GET_INDEX macro in arch/i386/pci/fixup.c Neil Horman
2005-06-27 22:19 ` Linus Torvalds
2005-06-27 22:32 ` Greg KH
2005-06-28 17:13 ` Jeff Garzik
2005-06-30 6:42 ` Greg KH [this message]
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=20050630064200.GA23852@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=jeff.garzik@pobox.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=torvalds@osdl.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.