qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: lbloch@janustech.com, armbru@redhat.com, kwolf@redhat.com,
	qemu-block@nongnu.org
Subject: [Qemu-devel] [PATCH v3 6/6] Revert "include: Add a lookup table of sizes"
Date: Thu, 10 Jan 2019 13:19:00 -0600	[thread overview]
Message-ID: <20190110191901.5082-7-eblake@redhat.com> (raw)
In-Reply-To: <20190110191901.5082-1-eblake@redhat.com>

This reverts commit 540b8492618ebbe98e7462bd7d31361b8cb10a05.

Now that QemuOpts can accept default values as integers, there
are no more clients of the S_*iB macros, and no longer a reason
to have a list of macros that contain a specific spelling of
special values merely for the sake of stringify(), when it is
a lot nicer to just compute integers in the first place using
ordinary arithmetic and our smaller list of xiB scaling macros.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 include/qemu/units.h | 55 --------------------------------------------
 1 file changed, 55 deletions(-)

diff --git a/include/qemu/units.h b/include/qemu/units.h
index 68a77586504..692db3fbb26 100644
--- a/include/qemu/units.h
+++ b/include/qemu/units.h
@@ -17,59 +17,4 @@
 #define PiB     (INT64_C(1) << 50)
 #define EiB     (INT64_C(1) << 60)

-#define S_1KiB                  1024
-#define S_2KiB                  2048
-#define S_4KiB                  4096
-#define S_8KiB                  8192
-#define S_16KiB                16384
-#define S_32KiB                32768
-#define S_64KiB                65536
-#define S_128KiB              131072
-#define S_256KiB              262144
-#define S_512KiB              524288
-#define S_1MiB               1048576
-#define S_2MiB               2097152
-#define S_4MiB               4194304
-#define S_8MiB               8388608
-#define S_16MiB             16777216
-#define S_32MiB             33554432
-#define S_64MiB             67108864
-#define S_128MiB           134217728
-#define S_256MiB           268435456
-#define S_512MiB           536870912
-#define S_1GiB            1073741824
-#define S_2GiB            2147483648
-#define S_4GiB            4294967296
-#define S_8GiB            8589934592
-#define S_16GiB          17179869184
-#define S_32GiB          34359738368
-#define S_64GiB          68719476736
-#define S_128GiB        137438953472
-#define S_256GiB        274877906944
-#define S_512GiB        549755813888
-#define S_1TiB         1099511627776
-#define S_2TiB         2199023255552
-#define S_4TiB         4398046511104
-#define S_8TiB         8796093022208
-#define S_16TiB       17592186044416
-#define S_32TiB       35184372088832
-#define S_64TiB       70368744177664
-#define S_128TiB     140737488355328
-#define S_256TiB     281474976710656
-#define S_512TiB     562949953421312
-#define S_1PiB      1125899906842624
-#define S_2PiB      2251799813685248
-#define S_4PiB      4503599627370496
-#define S_8PiB      9007199254740992
-#define S_16PiB    18014398509481984
-#define S_32PiB    36028797018963968
-#define S_64PiB    72057594037927936
-#define S_128PiB  144115188075855872
-#define S_256PiB  288230376151711744
-#define S_512PiB  576460752303423488
-#define S_1EiB   1152921504606846976
-#define S_2EiB   2305843009213693952
-#define S_4EiB   4611686018427387904
-#define S_8EiB   9223372036854775808
-
 #endif
-- 
2.20.1

  parent reply	other threads:[~2019-01-10 19:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 19:18 [Qemu-devel] [PATCH v3 0/6] include: Auto-generate the sizes lookup table Eric Blake
2019-01-10 19:18 ` [Qemu-devel] [PATCH v3 1/6] qemu-option: Allow integer defaults Eric Blake
2019-01-11 14:14   ` Leonid Bloch
2019-01-11 16:23     ` Eric Blake
2019-01-11 18:54       ` Leonid Bloch
2019-01-10 19:18 ` [Qemu-devel] [PATCH v3 2/6] block: Take advantage of QemuOpt default integers Eric Blake
2019-01-11 10:38   ` Kevin Wolf
2019-01-11 16:28     ` Eric Blake
2019-01-10 19:18 ` [Qemu-devel] [PATCH v3 3/6] Revert "vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE" Eric Blake
2019-01-10 19:42   ` Eric Blake
2019-01-10 19:18 ` [Qemu-devel] [PATCH v3 4/6] qemu: Prefer '(x * MiB)' over 'S_xiB' Eric Blake
2019-01-10 19:18 ` [Qemu-devel] [PATCH v3 5/6] Revert "include: Add a comment to explain the origin of sizes' lookup table" Eric Blake
2019-01-10 19:19 ` Eric Blake [this message]
2019-01-10 19:26 ` [Qemu-devel] [Qemu-block] [PATCH v3 0/6] include: Auto-generate the sizes lookup table Eric Blake
2019-01-10 20:21   ` Eric Blake
2019-01-10 20:28     ` Eric Blake
2019-01-11 10:02 ` [Qemu-devel] " Kevin Wolf
2019-01-13 22:50 ` no-reply

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=20190110191901.5082-7-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lbloch@janustech.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.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).