[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] x86/vPIT: re-order functions


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 1 Jun 2023 11:56:12 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lPxPgAZnECpeEwSholZa3wqfIXi7TDHXi1G01LS/mwk=; b=oGsOJveUTVQdIZdOkQhqHFkusDx0EpbdHkdpMjIRRIPz3MuP2dJ3HHCJ0DUTxXgCLko9Qa1lFANjLc3SsqyS7is2487b7sKff4eEfHiN6wZPDMYuDXwTW4Bx5Z5Jc3pQg36w+sQACQz8vA21eeJpVy3n00uPBUY7OgXBTQO24J9FY0QA5AUEJka+aV79snmL/r/l3WhmuePUle2pRtylT0AJ+ZHJxWZfU8ggR7Lxy2h7hOkACWrFwXP4jIgl+RlEZW9QTOWFTYF7aeUOj8xBlmWKHgJkrFDLI3I9ibnJzj3bVa1tj2hY2H8vyFs2QGK87gQoEW4H6ZU8r88KDcWU6w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YvkiKVf/zzmvs1gBzdSU2jG1dAY1f66KSIrilzKuAD3nziKISkllKqNTZhDPhgOqs4yQtjTFdvYIAapUs4aHy8oT4JxAspdZgSpn8qIXH0ebRrs2vBRLNpu/K4pryKbUlPi+0VGfpbo1GtsaULSgpiGgmIJBsz1jBzBLazH/hZH89iCr+uKolupVNixcrNaKJe6skntTrVCbqx4r8cEcJTENQuJlXSCBPUT5m3nMC0Wqq5nNM7Zd7z7t4ioiDuv4SBa7kxt2ca2K28MXjc/aEHLTK34MNwkg1J4aI/B7yd/TnY3V+TjzFh57UKNkalfbTlMB4F/gVnS+R7v8tRzmgA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 01 Jun 2023 09:56:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.06.2023 11:17, Roger Pau Monné wrote:
> On Tue, May 30, 2023 at 05:30:02PM +0200, Jan Beulich wrote:
>> To avoid the need for a forward declaration of pit_load_count() in a
>> subsequent change, move it earlier in the file (along with its helper
>> callback).
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

> Just a couple of nits, which you might also noticed but decided to not
> fix given this is just code movement.

Indeed, I meant this to be pure code movement. Nevertheless I'd be happy
to take care of style issues, if that's deemed okay in a "pure code
movement" patch. However, ...

>> --- a/xen/arch/x86/emul-i8254.c
>> +++ b/xen/arch/x86/emul-i8254.c
>> @@ -87,6 +87,57 @@ static int pit_get_count(PITState *pit,
>>      return counter;
>>  }
>>  
>> +static void cf_check pit_time_fired(struct vcpu *v, void *priv)
> 
> Seems like v could be constified?

... the function being used as a callback, I doubt adding const would
be possible. Otoh ...

>> +{
>> +    uint64_t *count_load_time = priv;

... there's a blank line missing here, if I was to go for style
adjustments.

Jan

>> +    TRACE_0D(TRC_HVM_EMUL_PIT_TIMER_CB);
>> +    *count_load_time = get_guest_time(v);
>> +}
>> +
>> +static void pit_load_count(PITState *pit, int channel, int val)
>> +{
>> +    u32 period;
> 
> uint32_t
> 
> Thanks, Roger.




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.