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

Re: [XEN PATCH v2 2/4] x86/mm: remove variable to avoid shadowing


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 31 Jul 2023 13:47: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=imALnMsTSg632PBB97Srx8D9nMUjfHLOjZQI9qW3tuI=; b=KtLTpo92Uw8sgG9Y+dx8xTuwzAeix9WdbQUsXFZDA9k7qzAtcmmZxfvFNQDXysJfhKG6pgl0TQlJh7osvsloS83XHvcGQimz2z6iKu7FeYe5/DlT8v8wUyHONne+vnFnaubfgGdHmSGr/5FICaZzvuWp/pdvJHdqJcQqvBp0/NnS2KzS1DHQ3Vb+A8a0ErMiOZpBxNbW8TH++LR+Me6aD9P3H/JYGwLztSDPjbyJB/aZFTz6lkcydHHHDpSp7Hic8QLhKRsI1JnHx/vtkVfDSv7wQH2BT+GYiUROK9IV4qZuld9B32JsRAw0qMDmuxikgIQs5Y/GgSO31z7liaOjzg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OnXr39GAjj3kmTLgBEWasQVxmb+J3Mru2nc/vbyA+xHNsO2SgM7n9XQA1cqMXteYNkVrHuWY4RXpxGHJuJJGkNh0qZmVRc/a0Mxi9EWUHnHJsSUFSSEz2mt/DVDHMPK5hqXdp1NNAs09rxcRh9MgTey5fACzPSR5r1xhNn3ga3tTT1dQkdYJC4XpKASpt5VbXdqpeI0LSqn3OSg9xbkrPgqbGWk8TfztE99RgJ7xCtPeDEMDBgppccLrDeDWLHNMl4nMfEB2EkLICDTnZSlZLB/AXnndYRRe+S0qvTAsforSGVm0BRHW+h+x/yueE3a45HgH7RWLt8HrgJdjKMBcpg==
  • 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 31 Jul 2023 11:47:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.07.2023 09:33, Nicola Vetrini wrote:
> The local variable 'p2mt' shadows a declaration of the same variable
> in the enclosing scope, but removing the inner declaration
> does not alter the semantics ('p2mt' is an output for the get_gfn
> call later on) and this resolves a violation of
> MISRA C:2012 Rule 5.3.
> 
> Both variables were last introduced by commit
> d4f699a0df6cea907c1de5c277500b98c0729685.

No, that commit moved the function (without correcting the issue,
perhaps because of not noticing it, but perhaps also intentionally).

> No functional changes.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

With the misleading part of the description either dropped (which
I'd be okay doing while committing) or made meaningful:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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