From: Christoph Hellwig Subject: Re: [PATCH v3 9/9] qemu-kvm: hpet: Add MSI support for in-kernel irqchip mode Date: Tue, 26 Apr 2011 13:09:28 -0400 Message-ID: <20110426170928.GA7469@infradead.org> References: <3d089633897515a214af032ed633342a7001945f.1303823975.git.jan.kiszka@siemens.com> <4DB6D01C.6080706@siemens.com> <20110426160602.GA1048@infradead.org> <4DB6FB9A.10907@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Avi Kivity , Marcelo Tosatti , "kvm@vger.kernel.org" , "Michael S. Tsirkin" To: Jan Kiszka Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:52812 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754311Ab1DZRJb (ORCPT ); Tue, 26 Apr 2011 13:09:31 -0400 Content-Disposition: inline In-Reply-To: <4DB6FB9A.10907@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Apr 26, 2011 at 07:06:34PM +0200, Jan Kiszka wrote: > On 2011-04-26 18:06, Christoph Hellwig wrote: > > On Tue, Apr 26, 2011 at 04:01:00PM +0200, Jan Kiszka wrote: > >> +static bool modifying_bit(uint64_t old, uint64_t new, uint64_t mask) > >> +{ > >> + return (old ^ new) & mask; > >> +} > >> + > > > > A more usual name would be toggle_bit. But you're passing in a mask > > to be modified, so it would be more a toggle_bits or toggle_mask. > > > > This function is checking for a change. But I've no problem renaming it > to toggling_bit or so if that's preferred. Err, you're right, I read it as doing a ^=. So keeping your naming scheme sounds fine.