From: Andreas Schwab <schwab@linux-m68k.org>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] ata_id: fix identify string fixup
Date: Mon, 30 Jan 2012 10:51:05 +0000 [thread overview]
Message-ID: <m2vcnth3ae.fsf@igel.home> (raw)
---
| 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--git a/src/extras/ata_id/ata_id.c b/src/extras/ata_id/ata_id.c
index 924d479..c8ffe86 100644
--- a/src/extras/ata_id/ata_id.c
+++ b/src/extras/ata_id/ata_id.c
@@ -307,8 +307,8 @@ static void disk_identify_get_string (uint8_t identify[512],
assert ((dest_len & 1) = 0);
while (dest_len > 0) {
- c1 = ((uint16_t *) identify)[offset_words] >> 8;
- c2 = ((uint16_t *) identify)[offset_words] & 0xff;
+ c1 = identify[offset_words * 2 + 1];
+ c2 = identify[offset_words * 2];
*dest = c1;
dest++;
*dest = c2;
--
1.7.9
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next reply other threads:[~2012-01-30 10:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 10:51 Andreas Schwab [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-01 13:00 [PATCH] ata_id: fix identify string fixup Kay Sievers
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=m2vcnth3ae.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=linux-hotplug@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).