From: Michael Kinney <michael.d.kinney@intel.com>
To: edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>, Andrew Fish <afish@apple.com>,
Laszlo Ersek <lersek@redhat.com>,
Michael D Kinney <michael.d.kinney@intel.com>
Subject: [Patch] PcAtChipsetPkg/SerialIoLib: Remove negative value shift
Date: Thu, 18 May 2017 10:03:09 -0700 [thread overview]
Message-ID: <1495126989-21904-1-git-send-email-michael.d.kinney@intel.com> (raw)
https://bugzilla.tianocore.org/show_bug.cgi?id=553
Remove left shift of negative values that always evaluate
to 0 to address build errors from the llvm/clang compiler
used in the XCODE5 tool chain.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c b/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c
index 95e0db7..0a2e20c 100644
--- a/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c
+++ b/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c
@@ -102,7 +102,7 @@ SerialPortInitialize (
//
// Switch back to bank 0
//
- OutputData = (UINT8) ((~DLAB << 7) | (gBreakSet << 6) | (gParity << 3) | (gStop << 2) | Data);
+ OutputData = (UINT8) ( (gBreakSet << 6) | (gParity << 3) | (gStop << 2) | Data);
IoWrite8 (gUartBase + LCR_OFFSET, OutputData);
return RETURN_SUCCESS;
@@ -481,7 +481,7 @@ SerialPortSetAttributes (
//
// Switch back to bank 0
//
- OutputData = (UINT8) ((~DLAB << 7) | (gBreakSet << 6) | (LcrParity << 3) | (LcrStop << 2) | LcrData);
+ OutputData = (UINT8) ((gBreakSet << 6) | (LcrParity << 3) | (LcrStop << 2) | LcrData);
IoWrite8 (gUartBase + LCR_OFFSET, OutputData);
return RETURN_SUCCESS;
--
2.6.3.windows.1
next reply other threads:[~2017-05-18 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 17:03 Michael Kinney [this message]
2017-05-18 17:24 ` [Patch] PcAtChipsetPkg/SerialIoLib: Remove negative value shift Laszlo Ersek
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=1495126989-21904-1-git-send-email-michael.d.kinney@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