From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934299AbdBQPB0 (ORCPT ); Fri, 17 Feb 2017 10:01:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46748 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933885AbdBQPBZ (ORCPT ); Fri, 17 Feb 2017 10:01:25 -0500 Date: Fri, 17 Feb 2017 16:01:20 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Cornelia Huck Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Andrew Jones , Marc Zyngier , Christian Borntraeger , James Hogan , Paul Mackerras , Christoffer Dall Subject: Re: [PATCH 1/5] KVM: change API for requests to match bit operations Message-ID: <20170217150120.GB28391@potion> References: <20170216160449.13094-1-rkrcmar@redhat.com> <20170216160449.13094-2-rkrcmar@redhat.com> <20170217103014.5ada1f1c.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170217103014.5ada1f1c.cornelia.huck@de.ibm.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 17 Feb 2017 15:01:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-02-17 10:30+0100, Cornelia Huck: > On Thu, 16 Feb 2017 17:04:45 +0100 > Radim Krčmář wrote: > >> kvm_make_request was a wrapper that added barriers to bit_set and >> kvm_check_request did the same for bit_test and bit_check, but the name >> was not very obvious and we were also lacking operations that cover >> bit_test and bit_clear, which resulted in an inconsistent use. >> >> The renaming: >> kvm_request_set <- kvm_make_request >> kvm_request_test_and_clear <- kvm_check_request >> >> Automated with coccinelle script: >> @@ >> expression VCPU, REQ; >> @@ >> -kvm_make_request(REQ, VCPU) >> +kvm_request_set(REQ, VCPU) >> >> @@ >> expression VCPU, REQ; >> @@ >> -kvm_check_request(REQ, VCPU) >> +kvm_request_test_and_clear(REQ, VCPU) > > Forgot your s-o-b? Oops, thanks. >> +static inline void kvm_request_set(unsigned req, struct kvm_vcpu *vcpu) > > Should we make req unsigned long as well, so that it matches the bit > api even more? >>From the discussion that followed, I'll keep unsigned.