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

Re: [XEN PATCH v2] x86: address MISRA C:2012 Rule 5.3


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 14 Aug 2023 14:41:23 +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=bSmIZuwRTHlQCdkyyuXqjuxfjFrKEd5LDowPqnYjKPk=; b=GiJnAY5RqD6SvIizxbmZxr0ZM6I6CMxLJ/nqaUbFzxKUSLmbZ5tH1Yqyi3xLuO3hkAoRJt/iqGeff25fmoFbJQN+eoIs6G4rDgU2GRAPCXou2WEgvpREoxkwsjHtmmAdvI9wn1yjQOMKL88yOXOWNEwiHiqMXBXD37Jo650xVYTOH0nfthQNVy/wcAQ59yLHR76bKrogyT0c3BeHBwxOiOPT0U6yCVQq05IGew8MR0c74Njg56NpA7ECnTuHE5/6N0z/820I+Tf5VQLWBT6DBYYMsVACeKFMABbuz+RAmS+5wVGTW5qprKa1GOys83Tl+gxe/X+2T8ERatjPW0iB5w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lZZJspEQFigoBgQNidwX5Ls+XAwhmVne99H4v0r7KmPw37fyWxORCNT/5ySUWRMM+4U0p4P19f93oS4c3f9Fy5+0jQb5CBlkVQ6VJRCYnYi6lfytwiJoEQvUdcnl0Iutr2VZogdbB3rBka4z89+DWboP3aXpMMRi86qH8U/gx4UuLLBbP2htlBJAKSVBNNMiDf5uXR/GzcL92W4utIxNJWG+IwAsKyS1ZAFdoHFyHLRx69Xdd0Ol+J33nDepY4k/PO4aQb5HqDzHlZTekPW4ZV7WLHHSzXYsY8YlZbrHRqyBPrPUSea6MsGzHYEE9q15DqkYmOH9eDXPlgRKPUgsvQ==
  • 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>, Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 14 Aug 2023 12:42:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.08.2023 11:05, Nicola Vetrini wrote:
> Address some occurrences of shadowing between the global
> variable 'e820' in 'xen/arch/x86/e820.c' and the function
> parameter name of 'e820_add_range'.
> 
> Since the function is only ever called with the global variable
> as the actual parameter, so there is no need to have it as a parameter
> because both are defined in the same file (mentioned above).
> This in turn causes several other functions to lose their parameter
> 'e820' because they are involved in the call chain that leads to
> 'e820_add_range'.
> 
> Similarly, 'kexec_reserve_area' is only ever called with the static
> variable 'boot_e820' as a parameter, which is defined in the same file
> as the function, thus it does not need that parameter, which is a cause
> of shadowing, as explained above.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>





 


Rackspace

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