* [PATCH] iommu/vt-d: Set variable intel_dirty_ops to static
@ 2023-11-20 10:10 Kunwu Chan
2023-11-20 14:07 ` Jason Gunthorpe
2023-11-21 10:05 ` Joao Martins
0 siblings, 2 replies; 3+ messages in thread
From: Kunwu Chan @ 2023-11-20 10:10 UTC (permalink / raw)
To: dwmw2, baolu.lu, joro, will, robin.murphy
Cc: kunwu.chan, iommu, linux-kernel, Kunwu Chan
Fix the followng warning:
drivers/iommu/intel/iommu.c:302:30: warning: symbol
'intel_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/intel/iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 3531b956556c..68e4d4006300 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -299,7 +299,7 @@ static int iommu_skip_te_disable;
#define IDENTMAP_AZALIA 4
const struct iommu_ops intel_iommu_ops;
-const struct iommu_dirty_ops intel_dirty_ops;
+static const struct iommu_dirty_ops intel_dirty_ops;
static bool translation_pre_enabled(struct intel_iommu *iommu)
{
@@ -4925,7 +4925,7 @@ static int intel_iommu_read_and_clear_dirty(struct iommu_domain *domain,
return 0;
}
-const struct iommu_dirty_ops intel_dirty_ops = {
+static const struct iommu_dirty_ops intel_dirty_ops = {
.set_dirty_tracking = intel_iommu_set_dirty_tracking,
.read_and_clear_dirty = intel_iommu_read_and_clear_dirty,
};
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/vt-d: Set variable intel_dirty_ops to static
2023-11-20 10:10 [PATCH] iommu/vt-d: Set variable intel_dirty_ops to static Kunwu Chan
@ 2023-11-20 14:07 ` Jason Gunthorpe
2023-11-21 10:05 ` Joao Martins
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2023-11-20 14:07 UTC (permalink / raw)
To: Kunwu Chan
Cc: dwmw2, baolu.lu, joro, will, robin.murphy, kunwu.chan, iommu,
linux-kernel
On Mon, Nov 20, 2023 at 06:10:25PM +0800, Kunwu Chan wrote:
> Fix the followng warning:
> drivers/iommu/intel/iommu.c:302:30: warning: symbol
> 'intel_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/intel/iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/vt-d: Set variable intel_dirty_ops to static
2023-11-20 10:10 [PATCH] iommu/vt-d: Set variable intel_dirty_ops to static Kunwu Chan
2023-11-20 14:07 ` Jason Gunthorpe
@ 2023-11-21 10:05 ` Joao Martins
1 sibling, 0 replies; 3+ messages in thread
From: Joao Martins @ 2023-11-21 10:05 UTC (permalink / raw)
To: Kunwu Chan, dwmw2, baolu.lu, joro, will, robin.murphy
Cc: kunwu.chan, iommu, linux-kernel
On 20/11/2023 10:10, Kunwu Chan wrote:
> Fix the followng warning:
> drivers/iommu/intel/iommu.c:302:30: warning: symbol
> 'intel_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/intel/iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index 3531b956556c..68e4d4006300 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -299,7 +299,7 @@ static int iommu_skip_te_disable;
> #define IDENTMAP_AZALIA 4
>
> const struct iommu_ops intel_iommu_ops;
> -const struct iommu_dirty_ops intel_dirty_ops;
> +static const struct iommu_dirty_ops intel_dirty_ops;
>
> static bool translation_pre_enabled(struct intel_iommu *iommu)
> {
> @@ -4925,7 +4925,7 @@ static int intel_iommu_read_and_clear_dirty(struct iommu_domain *domain,
> return 0;
> }
>
> -const struct iommu_dirty_ops intel_dirty_ops = {
> +static const struct iommu_dirty_ops intel_dirty_ops = {
> .set_dirty_tracking = intel_iommu_set_dirty_tracking,
> .read_and_clear_dirty = intel_iommu_read_and_clear_dirty,
> };
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-21 10:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 10:10 [PATCH] iommu/vt-d: Set variable intel_dirty_ops to static Kunwu Chan
2023-11-20 14:07 ` Jason Gunthorpe
2023-11-21 10:05 ` Joao Martins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox