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

Re: [PATCH v2 01/13] xen/spinlock: fix coding style issues


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 18 Oct 2023 17:47:29 +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=XzmgHrTUarUxfoFbbaKRndc6kXk/KvE64RBoKg+dT8E=; b=QIGGZgWU3RhwCtA9JvtqxVVXdNatGiW4s3YSIW3goGfRXWmTE8B4Z4jCA/ElDWta+TkTtVn8f8iD6Iy6JM9LpQ8JTqSyVU7OVG4mbQ0o7ec2BLWHdx0DfBy4qLgYPKNPmjbNp3DXJ7xF9oTj4CHYqFfgty5absf/8/7iTrMuReuoqewszBeTux9dG5j61NyQji5dMtSI3Xz3vqY2hnHFglbN1N2G3jBdrTPtF+T/G78MmadGpZCFdAO5PgkFx2168A8njUHMS8ByNME/BxeN8y2vcM7izNYD3EPlGJhw7HKwp5FbUNPU6JnnBLXfRpjNb4P+kkMtGy0+Az08q4Yw5w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jX2qMofryQ7vCxL4nOScMc+120TY9PFTMIId9NJFb3kpH4OVmUak+X/7Bm5YfDbN7ZP/l2PLFZ6rTZrpzLCnfkSS3ot7wd0QSVpk2mUOxj5cEAvv4BYG1KzZ9OT3qBUSk8rfVQqllB76mI1zxqrfLc7scqM1SK8WM0CPXJG7gTNbkfkrdIYLzXvCpz9F6cUvDRQVVicaEoR1HBiU8hscydOjlG51DtJwhQ2Vr2VVkImfJQMa8CPRZfaGaGqWpFlH1QJGv0h59av9DBlg4ojpSVC0bx7AQWfRI4w78xi8lGyr2aItkExLHdsthaA6C/hFDh/3HTmmi4M0mkQj1zcKYg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: javi.merino@xxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 18 Oct 2023 15:47:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.10.2023 11:42, Juergen Gross wrote:
> Fix some coding style issues in spinlock coding:
> 
> - Instead of u64 etc. use the preferred uint64_t etc. types
> - Remove some trailing spaces
> - Add missing spaces in "if" statements
> - Add some missing blank lines
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
with one possible further request:

> @@ -298,7 +298,7 @@ static always_inline spinlock_tickets_t 
> observe_lock(spinlock_tickets_t *t)
>      return v;
>  }
>  
> -static always_inline u16 observe_head(spinlock_tickets_t *t)
> +static always_inline uint16_t observe_head(spinlock_tickets_t *t)

While there, could you also add const to the pointed-to parameter type?
t, after all, ...

>  {
>      smp_rmb();
>      return read_atomic(&t->head);

... is only read through. (I'd also be happy for this to be adjusted on
commit, so long as you agree.)

Jan



 


Rackspace

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