[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v2] CODING_STYLE: document intended usage of types
- To: George Dunlap <george.dunlap@xxxxxxxxxx>
- From: Jan Beulich <JBeulich@xxxxxxxx>
- Date: Mon, 5 Aug 2019 11:55:23 +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=uCcbOPg4vuSTvg4s5IrgHje0yFKid6qqmAo7XAHZ/oM=; b=SE+4z0nGw2QZXnCjixBMgQ/4IxlIMcAOTd7cUgzFAzJyNlp6LBUQcDOvI4F5R9tbl2vEiZL7BL+Nue2qYM9Y7msNIXlJQU518zg2ka7SJCpeCAPjxGAIMZhpaUFCUhoGo5fx51HEJbrqSEk/eLbgcAj5OfSG3e1EMYN0PUatk6p3NfbcPua7rxI29WlmFfea3oF9a8Hz6qmMSfXptshYzZooGzbRgdUnBii3/kUFzSzx9BwG1aGi/FBgLwL5M2b9o2aGSUZ20/K4HIcx5KeJIb+1SxQVejtr+J/qApkx2lxuVbuCrSrTY0u/sJpVFxyZfQsIL4YPqLMGATf/J9dbCQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKKQ2kqAWnM/tG2UZU++O/kXjFOpfmylKfh3D+soI1Vt1UJEMaDa4mpU5fdS14i5/ljnJBhTz8bCzHqOmNyn3GhpEsrpWSW51+B6ePUZMNkyjKA+yca4wxRRF06Jo35MNKuidm6F6Dmr+JFFE7OGSiMBFlxTVmtRzgsRF2YcqrBH3uPymqaffeQPZ6h1imCgyadTmOGnkCpVub877/xSFV+h5gbKZw72ZS2cldC1a6ms7rjSwOEU1mvKAU7WqPnv8Iwg3DoLFVzWLQlngH/qwTnVDkT3KB9TKeuxUPp9/kz9Pc7E3FUE6/WH9RYbChuX5pE0PngZw+S5cNKTI/P4xQ==
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 05 Aug 2019 11:56:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHVS3zWhCjk0U9++E+I/4nSrlmXN6bsclmA
- Thread-topic: [PATCH v2] CODING_STYLE: document intended usage of types
On 05.08.2019 12:58, George Dunlap wrote:
> On 11/26/18 9:31 AM, Jan Beulich wrote:
>> +Fixed width types should only be used when a fixed width quantity is
>> +meant (which for example may be a value read from or to be written to a
>> +register).
>
> I'm having trouble understanding the intent / implications of this one.
> Can you give me an example of where you've seen a fixed width type used
> inappropriately?
Grep the code base for "uint32_t size" for example. These should
(almost?) all be unsigned int (or, where necessary, size_t). And
while there is uint_least32_t I think we should prefer
unsigned int for such purposes, as we expect this type to have
at least 32 significant bits anyway.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|