[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
On 16/10/2023 17:49, Jan Beulich wrote: 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? I don't think so, even if that wouldn't make much sense. Given that the usage of the zero lenght array extension is documented, that shouldn't be a concern either. + * 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 Isn't it useful to record why it was left as-is, and what should be done about it? If it's not, this can be dropped on commit, in my opinion. -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |