Re: [Qemu-devel] [PATCH 1/1] block: Eliminate the S_1KiB, S_2KiB, ... macros

2019-01-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 1/13/19 10:41 AM, Leonid Bloch wrote: >> On 1/11/19 9:14 PM, Markus Armbruster wrote: >>> We define 54 macros for the powers of two >= 1024. We use six, in six >>> macro definitions. Four of them could just as well use the common MiB >>> macro, so do that.

Re: [Qemu-devel] [PATCH 1/1] block: Eliminate the S_1KiB, S_2KiB, ... macros

2019-01-14 Thread Philippe Mathieu-Daudé
On 1/13/19 10:41 AM, Leonid Bloch wrote: > On 1/11/19 9:14 PM, Markus Armbruster wrote: >> We define 54 macros for the powers of two >= 1024. We use six, in six >> macro definitions. Four of them could just as well use the common MiB >> macro, so do that. The remaining two can't, because they

Re: [Qemu-devel] [PATCH 1/1] block: Eliminate the S_1KiB, S_2KiB, ... macros

2019-01-13 Thread Leonid Bloch
Hi, On 1/11/19 9:14 PM, Markus Armbruster wrote: > We define 54 macros for the powers of two >= 1024. We use six, in six > macro definitions. Four of them could just as well use the common MiB > macro, so do that. The remaining two can't, because they get passed > to stringify. Replace the

Re: [Qemu-devel] [PATCH 1/1] block: Eliminate the S_1KiB, S_2KiB, ... macros

2019-01-11 Thread Eric Blake
On 1/11/19 1:14 PM, Markus Armbruster wrote: > We define 54 macros for the powers of two >= 1024. We use six, in six > macro definitions. Four of them could just as well use the common MiB > macro, so do that. The remaining two can't, because they get passed > to stringify. Replace the macro

[Qemu-devel] [PATCH 1/1] block: Eliminate the S_1KiB, S_2KiB, ... macros

2019-01-11 Thread Markus Armbruster
We define 54 macros for the powers of two >= 1024. We use six, in six macro definitions. Four of them could just as well use the common MiB macro, so do that. The remaining two can't, because they get passed to stringify. Replace the macro by the literal number there. Slightly harder to read