* [PATCH] iommu/amd: Set variable amd_dirty_ops to static
@ 2023-11-20 9:53 Kunwu Chan
2023-11-20 14:07 ` Jason Gunthorpe
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kunwu Chan @ 2023-11-20 9:53 UTC (permalink / raw)
To: joro, suravee.suthikulpanit, will, robin.murphy
Cc: kunwu.chan, iommu, linux-kernel, Kunwu Chan
Fix the followng warning:
drivers/iommu/amd/iommu.c:67:30: warning: symbol
'amd_dirty_ops' was not declared. Should it be static?
This variable is only used in its defining file, so it should be static.
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
drivers/iommu/amd/iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index fcc987f5d4ed..9f7064360828 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -64,7 +64,7 @@ LIST_HEAD(hpet_map);
LIST_HEAD(acpihid_map);
const struct iommu_ops amd_iommu_ops;
-const struct iommu_dirty_ops amd_dirty_ops;
+static const struct iommu_dirty_ops amd_dirty_ops;
int amd_iommu_max_glx_val = -1;
@@ -2635,7 +2635,7 @@ static bool amd_iommu_enforce_cache_coherency(struct iommu_domain *domain)
return true;
}
-const struct iommu_dirty_ops amd_dirty_ops = {
+static const struct iommu_dirty_ops amd_dirty_ops = {
.set_dirty_tracking = amd_iommu_set_dirty_tracking,
.read_and_clear_dirty = amd_iommu_read_and_clear_dirty,
};
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/amd: Set variable amd_dirty_ops to static
2023-11-20 9:53 [PATCH] iommu/amd: Set variable amd_dirty_ops to static Kunwu Chan
@ 2023-11-20 14:07 ` Jason Gunthorpe
2023-11-21 6:15 ` Vasant Hegde
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2023-11-20 14:07 UTC (permalink / raw)
To: Kunwu Chan
Cc: joro, suravee.suthikulpanit, will, robin.murphy, kunwu.chan,
iommu, linux-kernel
On Mon, Nov 20, 2023 at 05:53:42PM +0800, Kunwu Chan wrote:
> Fix the followng warning:
> drivers/iommu/amd/iommu.c:67:30: warning: symbol
> 'amd_dirty_ops' was not declared. Should it be static?
>
> This variable is only used in its defining file, so it should be static.
>
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
> ---
> drivers/iommu/amd/iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/amd: Set variable amd_dirty_ops to static
2023-11-20 9:53 [PATCH] iommu/amd: Set variable amd_dirty_ops to static Kunwu Chan
2023-11-20 14:07 ` Jason Gunthorpe
@ 2023-11-21 6:15 ` Vasant Hegde
2023-11-21 10:05 ` Joao Martins
2023-11-27 9:59 ` Joerg Roedel
3 siblings, 0 replies; 5+ messages in thread
From: Vasant Hegde @ 2023-11-21 6:15 UTC (permalink / raw)
To: Kunwu Chan, joro, suravee.suthikulpanit, will, robin.murphy
Cc: kunwu.chan, iommu, linux-kernel
On 11/20/2023 3:23 PM, Kunwu Chan wrote:
> Fix the followng warning:
> drivers/iommu/amd/iommu.c:67:30: warning: symbol
> 'amd_dirty_ops' was not declared. Should it be static?
>
> This variable is only used in its defining file, so it should be static.
>
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Thanks for the fix. Looks good to me.
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
-Vasant
> ---
> drivers/iommu/amd/iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
> index fcc987f5d4ed..9f7064360828 100644
> --- a/drivers/iommu/amd/iommu.c
> +++ b/drivers/iommu/amd/iommu.c
> @@ -64,7 +64,7 @@ LIST_HEAD(hpet_map);
> LIST_HEAD(acpihid_map);
>
> const struct iommu_ops amd_iommu_ops;
> -const struct iommu_dirty_ops amd_dirty_ops;
> +static const struct iommu_dirty_ops amd_dirty_ops;
>
> int amd_iommu_max_glx_val = -1;
>
> @@ -2635,7 +2635,7 @@ static bool amd_iommu_enforce_cache_coherency(struct iommu_domain *domain)
> return true;
> }
>
> -const struct iommu_dirty_ops amd_dirty_ops = {
> +static const struct iommu_dirty_ops amd_dirty_ops = {
> .set_dirty_tracking = amd_iommu_set_dirty_tracking,
> .read_and_clear_dirty = amd_iommu_read_and_clear_dirty,
> };
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/amd: Set variable amd_dirty_ops to static
2023-11-20 9:53 [PATCH] iommu/amd: Set variable amd_dirty_ops to static Kunwu Chan
2023-11-20 14:07 ` Jason Gunthorpe
2023-11-21 6:15 ` Vasant Hegde
@ 2023-11-21 10:05 ` Joao Martins
2023-11-27 9:59 ` Joerg Roedel
3 siblings, 0 replies; 5+ messages in thread
From: Joao Martins @ 2023-11-21 10:05 UTC (permalink / raw)
To: Kunwu Chan, joro, suravee.suthikulpanit, will, robin.murphy
Cc: kunwu.chan, iommu, linux-kernel
On 20/11/2023 09:53, Kunwu Chan wrote:
> Fix the followng warning:
> drivers/iommu/amd/iommu.c:67:30: warning: symbol
> 'amd_dirty_ops' was not declared. Should it be static?
>
> This variable is only used in its defining file, so it should be static.
>
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
> ---
> drivers/iommu/amd/iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
> index fcc987f5d4ed..9f7064360828 100644
> --- a/drivers/iommu/amd/iommu.c
> +++ b/drivers/iommu/amd/iommu.c
> @@ -64,7 +64,7 @@ LIST_HEAD(hpet_map);
> LIST_HEAD(acpihid_map);
>
> const struct iommu_ops amd_iommu_ops;
> -const struct iommu_dirty_ops amd_dirty_ops;
> +static const struct iommu_dirty_ops amd_dirty_ops;
>
> int amd_iommu_max_glx_val = -1;
>
> @@ -2635,7 +2635,7 @@ static bool amd_iommu_enforce_cache_coherency(struct iommu_domain *domain)
> return true;
> }
>
> -const struct iommu_dirty_ops amd_dirty_ops = {
> +static const struct iommu_dirty_ops amd_dirty_ops = {
> .set_dirty_tracking = amd_iommu_set_dirty_tracking,
> .read_and_clear_dirty = amd_iommu_read_and_clear_dirty,
> };
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/amd: Set variable amd_dirty_ops to static
2023-11-20 9:53 [PATCH] iommu/amd: Set variable amd_dirty_ops to static Kunwu Chan
` (2 preceding siblings ...)
2023-11-21 10:05 ` Joao Martins
@ 2023-11-27 9:59 ` Joerg Roedel
3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2023-11-27 9:59 UTC (permalink / raw)
To: Kunwu Chan
Cc: suravee.suthikulpanit, will, robin.murphy, kunwu.chan, iommu,
linux-kernel
On Mon, Nov 20, 2023 at 05:53:42PM +0800, Kunwu Chan wrote:
> drivers/iommu/amd/iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-27 9:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 9:53 [PATCH] iommu/amd: Set variable amd_dirty_ops to static Kunwu Chan
2023-11-20 14:07 ` Jason Gunthorpe
2023-11-21 6:15 ` Vasant Hegde
2023-11-21 10:05 ` Joao Martins
2023-11-27 9:59 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox