Blame 0015-Clarify-a-comment-in-dmi_memory_device_extended_size.patch
|
Anton Arapov |
32682d |
From 5696fa33e5f9fce843fa3b5972b87a705fed2067 Mon Sep 17 00:00:00 2001
|
|
Anton Arapov |
32682d |
From: Jean Delvare <jdelvare@suse.de>
|
|
Anton Arapov |
32682d |
Date: Wed, 7 Sep 2016 22:16:16 +0200
|
|
Anton Arapov |
32682d |
Subject: [PATCH 15/17] Clarify a comment in dmi_memory_device_extended_size
|
|
Anton Arapov |
32682d |
|
|
Anton Arapov |
32682d |
Improve the comment to avoid the confusion as reported in bug #48723:
|
|
Anton Arapov |
32682d |
http://savannah.nongnu.org/bugs/?48723
|
|
Anton Arapov |
32682d |
---
|
|
Anton Arapov |
32682d |
dmidecode.c | 5 ++++-
|
|
Anton Arapov |
32682d |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
Anton Arapov |
32682d |
|
|
Anton Arapov |
32682d |
diff --git a/dmidecode.c b/dmidecode.c
|
|
Anton Arapov |
32682d |
index f56d0c5..f929b28 100644
|
|
Anton Arapov |
32682d |
--- a/dmidecode.c
|
|
Anton Arapov |
32682d |
+++ b/dmidecode.c
|
|
Anton Arapov |
32682d |
@@ -2277,7 +2277,10 @@ static void dmi_memory_device_extended_size(u32 code)
|
|
Anton Arapov |
32682d |
{
|
|
Anton Arapov |
32682d |
code &= 0x7FFFFFFFUL;
|
|
Anton Arapov |
32682d |
|
|
Anton Arapov |
32682d |
- /* Use the most suitable unit depending on size */
|
|
Anton Arapov |
32682d |
+ /*
|
|
Anton Arapov |
32682d |
+ * Use the greatest unit for which the exact value can be displayed
|
|
Anton Arapov |
32682d |
+ * as an integer without rounding
|
|
Anton Arapov |
32682d |
+ */
|
|
Anton Arapov |
32682d |
if (code & 0x3FFUL)
|
|
Anton Arapov |
32682d |
printf(" %lu MB", (unsigned long)code);
|
|
Anton Arapov |
32682d |
else if (code & 0xFFFFFUL)
|
|
Anton Arapov |
32682d |
--
|
|
Anton Arapov |
32682d |
2.7.4
|
|
Anton Arapov |
32682d |
|