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

Re: [XEN PATCH][for-4.19 v2 7/8] xen/types: address Rule 10.1 for DECLARE_BITMAP use


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 16 Oct 2023 17:49:03 +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=Co9c1WJR1J2gKj9Q39bNNmznPJ7Sf5SJUde9ztGPp1o=; b=AfLYUfzK6PNr/pTVMz6suJHnCcdveHQMf9dBwp0S0NtnOyw96lQcSwQAtn+KfUG04QIw6dBx3oNXBzpCcJxBtvW+vV4AYbR69oRRSHhpihW2iRswausu6Lx+oTZ1QZiox9ITqG9ONyw7ZSXlvr+h/w8+7Cl/imTiH4Zxj+JFnxpZ4mrNrWmZ8YxppF7n3pK1RA7uQDboV5sFoFA++Co+4goY8pvJ7vJassrEsv2fFE7+mvgy5kzth0H+BzXpwrnMWtM7zJ2OdcfoXwib9H7V+AM3R+4z25neullNpCzWNNKwlbvCvTm3neTLGLO8lSukmzF0w47a4xCh4pmcomdwxg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PaJD8QkCwmjfTyl95ZOwHZY2u1H8mqTAej/ZnH/Y+7e0gmtmaWokWmOT4nRF6s05EthZ2eG5DQAIMkF+bt1ryZq/iHgTry80oEGsikUQInl6bHsvIno4CR9m6JaaOIybmGQjRBTOyI18cO4lxlzD+/KQib3v1JnJ/14Mk1bA6/Y028G9wNjFYroPP5u2hX1/4uCSyQvAc8Bnljfp4Ey3W3Kr/6xK7NnVNwifPryb17yjMyJkMU8Oyy2+iDtBJPh8VfBXIvoKgFOeuyS5y2eMpUjuo9QkQDXfEB9GYv+S4Cj0lvgX//cHaiRqYAlH4a41LoKTkPgP9b066/69idKaxw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 16 Oct 2023 15:49:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.10.2023 17:28, Nicola Vetrini wrote:
> --- a/xen/include/xen/types.h
> +++ b/xen/include/xen/types.h
> @@ -22,6 +22,14 @@ typedef signed long ssize_t;
>  
>  typedef __PTRDIFF_TYPE__ ptrdiff_t;
>  
> +/*
> + * Users of this macro are expected to pass a positive value.

Is passing 0 going to cause any issues?

> + * Eventually, this should become an unsigned quantity, but this
> + * requires fixing various uses of this macro and BITS_PER_LONG in signed
> + * contexts, such as type-safe 'min' macro uses, which give rise to build 
> errors
> + * when the arguments have differing signedness, due to the build flags used.
> + */

I'm not convinced of the usefulness of this part of the comment.

Jan

>  #define BITS_TO_LONGS(bits) \
>      (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
>  #define DECLARE_BITMAP(name,bits) \




 


Rackspace

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