[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v2 2/4] x86/mtrr: address MISRA C:2012 Rule 5.3
- To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 7 Aug 2023 14:48:25 +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=dqR8kmPEt5MhrMoM3F7CxcM0ZcMpf7kT7H/gmtH+LgQ=; b=ZMKCG6iToE+ZxSIXHZ2zkKJKivizWquXuYVwsmBMgTW/ljs2OZqIILE1D+wIii+o+A6Q0mm9YvdrsZRiFNj6nmUrZ0q3l+v/yVloa1GWVF1BpfzDrq1b2cgYYaw4eFAzSPweeDni/HsbfN117E9gk1N4q3ZnL0tqsK3S1TPubfrP0vuI+MgPU6nmBCjQOTrihFjLOzatZRu1SoenFxXdCstbwXgT5+OGcV9F2EyqWFzYDIPGqAJjBY3fwnwqmBlYXOKswTfMl2o8SZJ+uzMoC8lLF7k/Rc3wIhKhY4ZWZnOOeljAQkDrawJW+qHP7USXXwSzXyi/OKRC76REUfWOfg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YIBhfmGmEU0rIcnUEGdrKg7dhDX/78PznGGKqxie5dfk9dET5rXmLvLabt+TbEePUGsUR2Ig1iLxCFBkwu1eXWDw76TDeuaR78kzpWi5D6iTquQ/fHtFOsIX5xnj42HFJw11L89JeCzi610Ni7RdYk/T0xL9+s7O4mpT9UD61AO3uK+E8DHosKWgv1H4t7pjmvJ6uu0RaZ/svdCK0xcTA+BwcZ4N7kPZfBNCv0H7x0iVA+BleqeRH+NUaBwEz/pR4unTeKIfh1eQAi67wwarzOEN4oJDIqWC2BgRRNKK+jNUilGjZxMpY4dZf+Eop5v1oj3SLEPHYwn/Y62bDNFYKA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, 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>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Mon, 07 Aug 2023 12:48:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 04.08.2023 22:45, Stefano Stabellini wrote:
> On Fri, 4 Aug 2023, Nicola Vetrini wrote:
>> Rename variables to avoid shadowing and thus address
>> MISRA C:2012 Rule 5.3:
>> "An identifier declared in an inner scope shall not hide an
>> identifier declared in an outer scope".
>>
>> The shadowing happens between the struct declaration 'mtrr_state' in
>> 'xen/arch/x86/include/asm/mtrr.h' and local variable names.
Let's try to be precise: The issue isn't with the struct declaration,
but with the declaration of the global variable of that name a few
lines later. Afaict - please clarify.
>> The latter are renamed to 'm', which is used elsewhere in
>> 'xen/arch/x86/hvm/mtrr.c' for the same purpose.
>>
>> No functional changes.
>>
>> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
With - as necessary - a suitable adjustment to the description:
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
|