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

Re: [Xen-devel] [PATCH v3 04/10] xen/mask: Convert {cpu, node}mask_test() to be static inline


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Tue, 30 Jul 2019 08:52:25 +0000
  • Accept-language: en-US
  • 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-SenderADCheck; bh=bgvXewOVxRurH+Y4OmvFa7WoiUY+/z/0YvpUCcRiErA=; b=VwQ46RTZjnxnjwH3IQ1QdfVqOt16DLMmD81PgY/Ls6sLUC4nn4WS2XX6UqGPgeh0vE4qFMAsOpaB5O8on8EqyyWxd4jypi7SUSb6S0YtA7JsxP9vETp4kwlMfc7xFAOGptahZYA7TU/28fxzUXMmgFXS4/HXwTL8bfE4S97JNun5ATJC957nSg5ZUuE3p9QYJTMyHGJ/iJUJiZDxqZLiRNSMU9NiZWpWkqi8s9hyxoRTsGmayZv4CnilRjS/PyD1TVvd+MCg9P2Jvrd09J287Kkf55JSXstT/IB7UBLfbvaqRx5ZJ2XfStAKDN/tPFkq5VmGtEnjyLLD/JWCHUXp4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WYDFIvzCZCqCArXscgcFMD6C8M/IhpvIS53dCui8MQdSmqF8x5lt696MyBLTHe6PQXlTkGMB7SjtFq3xrwZEncPi9ODTx/1wbX0Yi/cLTXiSGMatIwXUsZixTuS/UPLZJAgkvz/+iwEzJdneoMBC8u3RdKrUBwrvddtIRzRDh2ANfkz7mYvE/3xfUdI36BbaV9rq6X+2wEOiLOLDAMZ+pF/huKZs5uBtcwgKUlsj0wNd4qptXy/tReiaRiP3XdoBUxa/mS6BpEiLccTeuP8+znsoOmg0knjmnNba41S+6STeUmXGq6nLyI3M08Poh46xCyyZENuGZv3Rp2w6ilFn0g==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: StefanoStabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 30 Jul 2019 08:58:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVRgbpDOdFjryO+EmqrqZxqjugP6bi3CEA
  • Thread-topic: [PATCH v3 04/10] xen/mask: Convert {cpu,node}mask_test() to be static inline

On 29.07.2019 14:11, Andrew Cooper wrote:
> The buggy version of GCC isn't supported by Xen, so reimplement the helpers
> with type checking, using Xen's latest type expectations.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
with one remark:

> @@ -117,9 +108,10 @@ static inline void cpumask_clear(cpumask_t *dstp)
>       bitmap_zero(dstp->bits, nr_cpumask_bits);
>   }
>   
> -/* No static inline type checking - see Subtlety (1) above. */
> -#define cpumask_test_cpu(cpu, cpumask) \
> -     test_bit(cpumask_check(cpu), (cpumask)->bits)
> +static inline bool cpumask_test_cpu(unsigned int cpu, const cpumask_t *dst)

In particular in combination with const I don't think "dst" is a
particularly good name. "src", "msk", or "mask" would all seem
better to me.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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