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

Re: [XEN PATCH 3/4] xen: rename variables and parameters to address MISRA C:2012 Rule 5.3


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 1 Aug 2023 09:46:54 +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=9Gw0CWE+jIe4M6iBCvoM0MNOxL9X3RV4aI5Dc02R25U=; b=McRVWd0U7c38DqVOwBjP4sZLuswVSLU8KpWP8Gwynzx8VYH/v60NY9DgzlypR5StXRboZG3OvV35G0K8M6gW1d2YGL3SdixEAR79ObZjVUrYWKLuSq19BC7xUDWfVa3suM/57shVgaUAtCsK2ph/JUF4WCv36il/dAV6WblmyIWF1g0ojFbIbvbrqXPFRNUg+IgEBuNxtiLn4/59YNRYdpoDiFmPBMCJta/RTISei7zaeN3KuQtWl/aiStAMBdi0igkZ4AqNHAMwMz9e/XNwO8rlLslu8n3Bn9gVF2YwlFNk39Jrpft/7XvNmnH4YNTAVoJYO5JK5dSo3OlCVMf98Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l1UqYlcdERnl5dRISnbPh2/Q6vlBtAUpdAAYOJpAta3zdxzbC9M9plNOlhqBmVgd5/Yclrcs9bMVCdfPa7LMS+sGZgwZ9Iw7AkD6+P8GEb2mHrYN+RUy/9EvgQKAJQD09Cw1Elu4FfChsDHlHS2cNqr14B8h3GFfSpIwl2m5mlM6u/7LG7nJfAVLh+olRa4hosbr1mE50YAm9u2OUxZPW1SWk5u4YLeUMq0VuCdr7Lrnv501VIXxSoovDdKHPvtkzbcTPhb4J23a2VY2jul1wJtrz3byUEd15fbK11IIeBzldIX5qQMBkwSzyL+XjhlmzYXBFXsahJHchmPtQykbaw==
  • 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 Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 01 Aug 2023 07:47:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.08.2023 09:20, Nicola Vetrini wrote:
> On 31/07/2023 16:34, Jan Beulich wrote:
>> On 31.07.2023 15:35, Nicola Vetrini wrote:
>>> --- a/xen/common/compat/memory.c
>>> +++ b/xen/common/compat/memory.c
>>> @@ -321,12 +321,12 @@ int compat_memory_op(unsigned int cmd, 
>>> XEN_GUEST_HANDLE_PARAM(void) compat)
>>>
>>>          case XENMEM_remove_from_physmap:
>>>          {
>>> -            struct compat_remove_from_physmap cmp;
>>> +            struct compat_remove_from_physmap c;
>>
>> The intention of the outer scope cmp is to avoid such inner scope
>> ones then consuming extra stack space. This wants making part of the
>> union there.
>>
> 
> Makes sense, though I've not been able to find a definition for the type
> 'struct compat_remove_from_physmap'.

This is a generated type, so you'll need to look in the build tree
under xen/include/compat/. (In this context I'm curious how Misra and
Eclair deal with generated code.)

Jan



 


Rackspace

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