iommu/amd: Fix typo in macro parameter name

Message ID 381fbc430c0ccdd78b3b696cfc0c32b233526ca5.1669159392.git.mforney@mforney.org
State New
Headers
Series iommu/amd: Fix typo in macro parameter name |

Commit Message

Michael Forney Nov. 22, 2022, 10:18 p.m. UTC
  IVRS_GET_SBDF_ID is only called with fn as the fourth parameter,
so this had no effect, but fixing the name will avoid bugs if that
ever changes.

Signed-off-by: Michael Forney <mforney@mforney.org>
---
 drivers/iommu/amd/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Vasant Hegde Nov. 24, 2022, 4:51 a.m. UTC | #1
HI Michael,

On 11/23/2022 3:48 AM, Michael Forney wrote:
> IVRS_GET_SBDF_ID is only called with fn as the fourth parameter,
> so this had no effect, but fixing the name will avoid bugs if that
> ever changes.>
> Signed-off-by: Michael Forney <mforney@mforney.org>

Thanks for finding and fixing this issue.

Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>

-Vasant

> ---
>  drivers/iommu/amd/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
> index 1a2d425bf568..099ca3ed7d73 100644
> --- a/drivers/iommu/amd/init.c
> +++ b/drivers/iommu/amd/init.c
> @@ -85,7 +85,7 @@
>  
>  #define LOOP_TIMEOUT	2000000
>  
> -#define IVRS_GET_SBDF_ID(seg, bus, dev, fd)	(((seg & 0xffff) << 16) | ((bus & 0xff) << 8) \
> +#define IVRS_GET_SBDF_ID(seg, bus, dev, fn)	(((seg & 0xffff) << 16) | ((bus & 0xff) << 8) \
>  						 | ((dev & 0x1f) << 3) | (fn & 0x7))
>  
>  /*
  
Joerg Roedel Dec. 5, 2022, 10:48 a.m. UTC | #2
On Tue, Nov 22, 2022 at 02:18:25PM -0800, Michael Forney wrote:
> IVRS_GET_SBDF_ID is only called with fn as the fourth parameter,
> so this had no effect, but fixing the name will avoid bugs if that
> ever changes.
> 
> Signed-off-by: Michael Forney <mforney@mforney.org>
> ---
>  drivers/iommu/amd/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.
  

Patch

diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 1a2d425bf568..099ca3ed7d73 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -85,7 +85,7 @@ 
 
 #define LOOP_TIMEOUT	2000000
 
-#define IVRS_GET_SBDF_ID(seg, bus, dev, fd)	(((seg & 0xffff) << 16) | ((bus & 0xff) << 8) \
+#define IVRS_GET_SBDF_ID(seg, bus, dev, fn)	(((seg & 0xffff) << 16) | ((bus & 0xff) << 8) \
 						 | ((dev & 0x1f) << 3) | (fn & 0x7))
 
 /*