qemu/include
Leonid Bloch 1240ac558d include: Add a comment to explain the origin of sizes' lookup table
The lookup table for power-of-two sizes was added in commit 540b849261
for the purpose of having convenient shortcuts for these sizes in cases
when the literal number has to be present at compile time, and
expressions as '(1 * KiB)' can not be used. One such case is the
stringification of sizes. Beyond that, it is convenient to use these
shortcuts for all power-of-two sizes, even if they don't have to be
literal numbers.

Despite its convenience, this table introduced 55 lines of "dumb" code,
the purpose and origin of which are obscure without reading the message
of the commit which introduced it. This patch fixes that by adding a
comment to the code itself with a brief explanation for the reasoning
behind this table. This comment includes the short AWK script that
generated the table, so that anyone who's interested could make sure
that the values in it are correct (otherwise these values look as if
they were typed manually).

Signed-off-by: Leonid Bloch <lbloch@janustech.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-11-05 15:29:59 +01:00
..
block block: Require auto-read-only for existing fallbacks 2018-11-05 15:09:55 +01:00
chardev chardev: mark the calls that allow an implicit mux monitor 2018-10-03 14:45:05 +04:00
crypto tests: call qcrypto_init instead of gnutls_global_init 2018-07-24 17:33:39 +01:00
disas target/mips: Add disassembler support for nanoMIPS 2018-10-25 22:13:33 +02:00
exec cputlb: Remove tlb_c.pending_flushes 2018-10-31 12:16:39 +00:00
fpu softfloat: Don't execute divdeu without power7 2018-11-04 10:04:40 +00:00
hw hw/arm: versal: Add a model of Xilinx Versal SoC 2018-11-02 14:10:53 +00:00
io
libdecnumber
migration COLO: Remove colo_state migration struct 2018-10-19 11:15:03 +08:00
monitor qdev-monitor: print help to stdout 2018-10-05 16:14:22 +04:00
net filter: Add handle_event method for NetFilterClass 2018-10-19 11:15:03 +08:00
qapi error: Fix use of error_prepend() with &error_fatal, &error_abort 2018-10-19 14:51:34 +02:00
qemu include: Add a comment to explain the origin of sizes' lookup table 2018-11-05 15:29:59 +01:00
qom cputlb: Move cpu->pending_tlb_flush to env->tlb_c.pending_flush 2018-10-31 12:16:02 +00:00
scsi pr-manager: add query-pr-managers QMP command 2018-06-28 19:05:35 +02:00
standard-headers linux-headers: update 2018-10-12 11:32:18 +02:00
sysemu block: change some function return type to bool 2018-11-05 15:09:54 +01:00
ui ui: Convert vnc_display_init(), init_keyboard_layout() to Error 2018-10-19 14:51:34 +02:00
elf.h elf: Define MIPS_ABI_FP_UNKNOWN macro 2018-10-29 15:47:32 +01:00
glib-compat.h glib: enforce the minimum required version and warn about old APIs 2018-06-29 12:22:28 +01:00
qemu-common.h qemu-common.h: update copyright date to 2018 2018-10-16 17:52:06 +02:00
qemu-io.h qemu-io: Let command functions return error code 2018-06-11 16:18:45 +02:00
trace-tcg.h