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

Re: [XEN PATCH v3 2/3] xen/drivers/passthrough/arm/smmu-v3.c: fix violations of MISRA C:2012 Rule 3.1


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Thu, 29 Jun 2023 14:52:10 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=bLxL1mbR0RAOmf81uH2XVRc6X6tf+0MlnbuNrPz7d7s=; b=XFJzLzxQmuSytpTJ1zzfk67ZnC6v9hDBuQ9AhAgaImQ1ap689c55nLtqGE3HDO46kERV9je5kp3m6F2DMuhf0xLK/5Qd322pu+DE3jmpwr2liRb9MwBSThzcF0Q6ywgoWPBJtea1mC2H02cYTq0+9/n5p/+z+ZcbVv4kD0qoWLe7NEjnK5PHefUpouslBCtBccnLnvDAUPD07ql4swHDw/tF3UUrbcBKoswXYkYyvR5fZwH5i7RSFzx/IjK8mENHuD6rP1BgqULEokP1CS+FOl6WkiIA01/z0JHQUnVSFdG3K0w9MjVAe8+5R8Lk7vRPk0Ged01qOiuRNG/45G0yzw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IwP4i/nez3n/wzd3MA9h17rAJnSgy109locmgNI81SS1cPlwZYWEQzTJbP2/9l645fji7N5TUtMG3kKs+/fpbJRa9GuZWxA6XHcf1DAYnDRzc18nkYuCL4r9dtdpbzAFcxL9V/JsLcZ+DxHsDZCaZqGim/FJZ1aBqukSmqXg1UGrrj8hcviH9rRLsjH87gM5eksfNy02d3zqnvjDgqVsjRsLMTiQxYAvsuwfNxs3QQuG8YRmznDsJLr5koCqh8XNpheYoDw7fN4TqZJDe0NnOUyvW9c/Xp1zNzZvPrsSBBPNsJGcEUNukkqLS98vdZisW3suIDXyzXUbncuU3cDrkw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, "xenia.ragiadakou@xxxxxxx" <xenia.ragiadakou@xxxxxxx>, "ayan.kumar.halder@xxxxxxx" <ayan.kumar.halder@xxxxxxx>, "consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 29 Jun 2023 14:52:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZqnGK1UuA6ay8JkaojZwzBrWkkK+h3aEA
  • Thread-topic: [XEN PATCH v3 2/3] xen/drivers/passthrough/arm/smmu-v3.c: fix violations of MISRA C:2012 Rule 3.1


> On 29 Jun 2023, at 11:06, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> wrote:
> 
> In the file `xen/drivers/passthrough/arm/smmu-v3.c' there are a few 
> occurrences

here you use a different character to enclose the file path (` vs ‘) may I 
suggest to
use only (‘)?

> of nested '//' character sequences inside C-style comment blocks, which 
> violate
> Rule 3.1.
> 
> The patch aims to resolve those by replacing the nested comments with
> equivalent constructs that do not violate the rule.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

You are missing the “---“ here, meaning that the lines below are part of the
commit message and I’m sure you don’t want that.

Also here, may I suggest to use this commit title instead?
“xen/arm: smmuv3: Fix violations of MISRA C:2012 Rule 3.1”

Apart from that, changes looks good to me:

Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>

Will be the maintainer/committer to decide if addressing these comment,
if accepted, on commit or if you need to send another version, in which
case you can retain my r-by provided that no other modifications are done.

> Changes:
> - Resending the patch with the right maintainers in CC.
> Changes in V2:
> - Split the patch into a series and reworked the fix.
> - Apply the fix to the arm32 `flushtlb.h' file, for consistency
> Changes in V3:
> - Revised the comment to make it clear the function the parallel control
> flows in the comment belong to.
> ---
> xen/drivers/passthrough/arm/smmu-v3.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/drivers/passthrough/arm/smmu-v3.c 
> b/xen/drivers/passthrough/arm/smmu-v3.c
> index 720aa69ff2..cdbb505134 100644
> --- a/xen/drivers/passthrough/arm/smmu-v3.c
> +++ b/xen/drivers/passthrough/arm/smmu-v3.c
> @@ -1047,10 +1047,10 @@ static int arm_smmu_atc_inv_domain(struct 
> arm_smmu_domain *smmu_domain,
> * before we read 'nr_ats_masters' in case of a concurrent call to
> * arm_smmu_enable_ats():
> *
> - * // unmap() // arm_smmu_enable_ats()
> - * TLBI+SYNC atomic_inc(&nr_ats_masters);
> - * smp_mb(); [...]
> - * atomic_read(&nr_ats_masters); pci_enable_ats() // writel()
> + * --- unmap() ---                 --- arm_smmu_enable_ats() ---
> + * TLBI+SYNC                       atomic_inc(&nr_ats_masters);
> + * smp_mb();                       [...]
> + * atomic_read(&nr_ats_masters);   pci_enable_ats() (see writel())
> *
> * Ensures that we always see the incremented 'nr_ats_masters' count if
> * ATS was enabled at the PCI device before completion of the TLBI.
> -- 
> 2.34.1
> 
> 


 


Rackspace

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