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

Re: [XEN PATCH] xen/iommu_init: address a violation of MISRA C:2012 Rule 8.3


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 24 Oct 2023 16:44:35 +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=+hJXjalN24Q7+66gwZSmLp+kTa06SRjUpzk4wy4bVfs=; b=UTTOK61Mvrna8+RncM6X2PkpJjlGmt6Inx0+PFinC22tVViPHmLQudYU4fppfPTEQxk5zybu8FDoce5sRkgdRGvZ2S/jYYB4HfSvtJy1N0LwWKhOcuY7nL67qiMFbtp6/91INpcKdnHFKg4VYdSgUDLRHWyslJ/fBTUJESRUVOzNA+wENWYxmdaij5Id+emvwK9xh4bAZ/sGYempZBfBTJRvsX3yboZZgTQVb3ENw7XVhR7MqmmqXO/7wnc9RMHwbuNR9SKUTUG7EzBqH+0/wQZIg5Mwzs7uoublgjG7+apL/dSjP3Q0pbdAhtzk8A767SegeA8mJR0epEBhedYu7g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H3WVIYPsUhligDOou2TOgrueHEkDNzS0sBMzRMfrbt9oootWQzpzhWEX9wgmNSHUGyy1tRnKosAbQxG3NFc3Z1PG4jeJyaeKs8j4ocOxNLDXmnC9dW+9hYfkyPaDQwS5M/GkZz3s8jvliLuNDuStAkp5waMEYaiaKLjmf6IXAESoH4gA/Ga/a2vBGlWAUJzeZKEtVp9KT5YFbLDXTkIiwIgoZtzxO5eV44BXzDEguZH+lEwzMZ/49jQVd3HlQi+2pVg3Bo43pZWI2yXuP7W+/UjUvGyamhJX1YQwtK/zvJFSA5cHIf4W74/aBqQFD9/jZgwMM5HCH/djzsvmDQJUXg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 24 Oct 2023 14:44:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.10.2023 16:01, Federico Serafini wrote:
> --- a/xen/drivers/passthrough/amd/iommu_init.c
> +++ b/xen/drivers/passthrough/amd/iommu_init.c
> @@ -692,7 +692,7 @@ static void iommu_check_ppr_log(struct amd_iommu *iommu)
>      spin_unlock_irqrestore(&iommu->lock, flags);
>  }
>  
> -static void cf_check do_amd_iommu_irq(void *unused)
> +static void cf_check do_amd_iommu_irq(void *data)
>  {
>      struct amd_iommu *iommu;
>  
> @@ -702,6 +702,11 @@ static void cf_check do_amd_iommu_irq(void *unused)
>          return;
>      }
>  
> +    /*
> +     * Formal parameter is deliberately unused.
> +     */
> +    (void) data;

Besides me thinking that the original way of expressing things was more
clear (and still even machine-recognizable), there are (nit) also style
issues here: The comment is malformed and there shouldn't be a blank
between the cast operator and the expression it applies to.

Jan



 


Rackspace

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