From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Ryder Lee" <ryder.lee@mediatek.com>,
"Jianjun Wang" <jianjun.wang@mediatek.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>, linux-mediatek@lists.infradead.org
Subject: pcie-mediatek slot calculation correct?
Date: Mon, 29 Apr 2024 13:22:50 +0300 (EEST) [thread overview]
Message-ID: <9ea20705-8536-738b-4f1f-60feb2c092fa@linux.intel.com> (raw)
Hi all,
I was doing Conf Type 0/1 helper generalization when I ran into this code
in drivers/pci/controller/pcie-mediatek.c:
u32 func = PCI_FUNC(port->slot);
u32 slot = PCI_SLOT(port->slot << 3);
With that code, function is effectively duplicated into slot, is this
correct behavior?
...Adjustments made in the history of this code fragment didn't exactly
inspire confidence on the correctness of this code. :-/
--
i.
reply other threads:[~2024-04-29 10:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=9ea20705-8536-738b-4f1f-60feb2c092fa@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=jianjun.wang@mediatek.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
--cc=ryder.lee@mediatek.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 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.