From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gClYI-0004AW-S3 for qemu-devel@nongnu.org; Wed, 17 Oct 2018 09:07:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gClYB-0002TT-Ph for qemu-devel@nongnu.org; Wed, 17 Oct 2018 09:07:54 -0400 MIME-Version: 1.0 References: <20181017091204.GC22755@stefanha-x1.localdomain> <5a83aab6-1277-cc0e-7913-964a8fea5265@redhat.com> In-Reply-To: From: Artem Pisarenko Date: Wed, 17 Oct 2018 19:07:33 +0600 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Kevin Wolf , Fam Zheng , Pavel Dovgalyuk , "open list:Block I/O path" , Max Reitz , Stefan Hajnoczi Yes, but without words ..."when they fire" in attributes comments. =D1=81=D1=80, 17 =D0=BE=D0=BA=D1=82. 2018 =D0=B3. =D0=B2 17:24, Paolo Bonzi= ni : > On 17/10/2018 12:57, Artem Pisarenko wrote: > >> Further down in this patch the notation is QEMU_TIMER_ATTR_, which= I > >> think is clearer because QEMU_TIMER_ATTR(id) looks like a (non-existen= t) > >> macro. Please use the QEMU_TIMER_ATTR_ notation consistently. > > > > Yes, I've just forgot to update comments after previous patch version, > > where it actually was macro. > > > >> What is the purpose of this bit? I guess it's just here as a > >> placeholder because no real bits have been defined yet. Hopefully the > >> next patch removes it (/* This placeholder is removed in the next patc= h > >> */ would be a nice way to document this for reviewers). > > > > It's just to prevent compilation errors, as required by > > https://wiki.qemu.org/Contribute/SubmitAPatch#Split_up_long_patches > > > >> The enum isn't needed and makes debugging harder since the bit number = is > >> implicit in the enum ordering. This alternative is clearer and more > >> concise: > >> > >> #define QEMU_TIMER_ATTR_foo BIT(n) > > > > Agree. > > Like this? > > ... > > -- =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=90=D1=80=D1=82=D0=B5=D0=BC =D0=9F=D0=B8=D1=81=D0=B0=D1=80=D0=B5=D0=BD= =D0=BA=D0=BE