From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Feng Tian <feng.tian@intel.com>
Subject: [PATCH 2/5] MdeModulePkg/PciSioSerialDxe: Use MAX_UINT8 instead of PCI_BAR_ALL
Date: Thu, 26 Jan 2017 14:09:24 +0800 [thread overview]
Message-ID: <20170126060927.352436-3-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20170126060927.352436-1-ruiyu.ni@intel.com>
When BarIndex equals to 0xFF, default value 0 is used as the BAR
index. Though PCI_BAR_ALL and MAX_UINT8 shares the same value,
using PCI_BAR_ALL is like to match any BAR not BAR 0, it's more
proper to use MAX_UINT8 here.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
---
MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c
index 65ddf5d..a9dc827 100644
--- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c
+++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c
@@ -473,7 +473,7 @@ CreateSerialDevice (
// For PCI serial device, use the information from PCD
//
if (PciSerialParameter != NULL) {
- BarIndex = (PciSerialParameter->BarIndex == PCI_BAR_ALL) ? 0 : PciSerialParameter->BarIndex;
+ BarIndex = (PciSerialParameter->BarIndex == MAX_UINT8) ? 0 : PciSerialParameter->BarIndex;
Offset = PciSerialParameter->Offset;
if (PciSerialParameter->RegisterStride != 0) {
SerialDevice->RegisterStride = PciSerialParameter->RegisterStride;
--
2.9.0.windows.1
next prev parent reply other threads:[~2017-01-26 6:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 6:09 [PATCH 0/5] Fix PciBus to accept Spec values as BarIndex and Alignment Ruiyu Ni
2017-01-26 6:09 ` [PATCH 1/5] MdePkg/Pci22.h: Deprecate out-of-Spec IncompatiblePciDevice macros Ruiyu Ni
2017-02-03 3:38 ` Gao, Liming
2017-02-03 8:13 ` Laszlo Ersek
2017-02-03 8:28 ` Ni, Ruiyu
2017-02-03 8:36 ` Gao, Liming
2017-02-03 9:03 ` Ni, Ruiyu
2017-01-26 6:09 ` Ruiyu Ni [this message]
2017-01-26 6:09 ` [PATCH 3/5] MdeModulePkg/PciBus: Accept Spec values as BarIndex and Alignment Ruiyu Ni
2017-01-26 6:09 ` [PATCH 4/5] MdeModulePkg/IncompatiblePciDevice: Do not use deprecated macros Ruiyu Ni
2017-01-26 6:09 ` [PATCH 5/5] MdeModulePkg/IncompatiblePci: Use -1 to match any IDs Ruiyu Ni
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-list 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=20170126060927.352436-3-ruiyu.ni@intel.com \
--to=devel@edk2.groups.io \
/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