[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v2 4/4] x86/setup: address MISRA C:2012 Rule 5.3
- To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 7 Aug 2023 15:42: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=oDCpqA2DMQEWGDHwlOIUA5l2DQrdOo/HLKMJr9lzSas=; b=dfYZfDYjaKWEQTqhM6TUz+LAj8iKaHpf87d0ya5/Tnh2BUgocu9DiMi2ym+UgUORUiV+qFBXu8B3KUfUc9PHYg9Aj5Y0GxGPyx6/hY5BKFnLDRQsgQg0OLPYY1D9i9UsubbXDYRAli17Avee4jvWhYjL8zj1a/rBNw0NOnQmwtembAIVVcdajpDDTSENe2vVnz0sQewoDR8ymh4sXUhQ8YxmttrYTOxqV0qtBujIRSJRwf2jOxY4YYtKZvc2K2mc6tyy+blYGfuaCpR5Viwxxuv5UDSOwKmYHFwlF5dFYrdL66H5aL9URawv3RpVKt6a6bfGdT5LoOsfFcgV8g4Pzw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CQqMqH3WB5GLOpvUpDIS1xGVYaPTyNP2vdRbvQiJQlFMoMA2IgKnJ4KBo6A5MxP7n1K1Czw2k5GCF+iK8ih4jiEyf8jHRMyJtfT/oGcmlA1FrJ42u3o0+e3urY/DkmhQeFD5AjHC3AQ4r4asOEjSjkQioCl2adg8bv0GUgEpde3Dcq0vPxciC5KsrXmh4xRMQenpNn0EhdUnKGwyr/fqZ6gLSGoedGyja1Zl8L7RTm/LgMIq9bpmX5LIgQuZ9JbvnJax8zGw/GvtBThfb4vwtVHSG+AW0nz9Qu+M4oVJITQaZH1EoRrA/TGoogKudv/FcUid31C1N7bGFCf/MYv+uw==
- 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 07 Aug 2023 13:42:15 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 07.08.2023 15:18, Nicola Vetrini wrote:
> On 07/08/2023 15:05, Jan Beulich wrote:
>> On 04.08.2023 10:03, Nicola Vetrini wrote:
>>> The parameters renamed in the function declaration caused shadowing
>>> with the homonymous variable in 'xen/common/efi/boot.c'. Renaming
>>> them also addresses Rule 8.3:
>>> "All declarations of an object or function shall use the same names
>>> and type qualifiers".
>>
>> Can you explain to me how shadowing can happen in a declaration? I
>> would focus on 8.3 here, and only mention the other name collision.
>
> There's "static struct file __initdata kernel;" in
> xen/common/efi/boot.c, which
> is visible when the function is declared. Since renaming these parameter
> names would
> have been addressed by Federico for R8.3 anyway, my intention was to
> address them both.
I understand what you say, but your reply doesn't answer my question.
Just to emphasize the important aspect: I could see the shadowing
aspect if the _definition_ of construct_dom0() used "kernel". But I'm
asking about declarations (the one here as well as in general): I
can't see how any shadowing can occur without there being any code in
the position of using any such variable / parameter. IOW if Eclair
spits out 5.3 violations on declarations, I'm inclined to think it's
wrong. (Because of 8.3 a violation there would then need dealing with
anyway, but _only_ because of 8.3, if the definition is already okay.)
Jan
|