* [PATCH] iommu/vt-d: Make function signatures static
@ 2019-09-07 6:49 Adam Zerella
2019-09-07 12:10 ` Lu Baolu
2019-09-10 8:15 ` Joerg Roedel
0 siblings, 2 replies; 5+ messages in thread
From: Adam Zerella @ 2019-09-07 6:49 UTC (permalink / raw)
Cc: dwmw2, iommu, adam.zerella
warning: symbol 'intel_iommu_gfx_mapped' was not declared. Should it be static?
warning: symbol 'intel_iommu_ops' was not declared. Should it be static?
Squash a couple of Sparse warnings by making these symbols static.
Signed-off-by: Adam Zerella <adam.zerella@gmail.com>
---
drivers/iommu/intel-iommu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 12d094d08c0a..28134891fa9c 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -365,7 +365,7 @@ static int iommu_identity_mapping;
#define IDENTMAP_GFX 2
#define IDENTMAP_AZALIA 4
-int intel_iommu_gfx_mapped;
+static int intel_iommu_gfx_mapped;
EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped);
#define DUMMY_DEVICE_DOMAIN_INFO ((struct device_domain_info *)(-1))
@@ -397,7 +397,7 @@ int for_each_device_domain(int (*fn)(struct device_domain_info *info,
return 0;
}
-const struct iommu_ops intel_iommu_ops;
+static const struct iommu_ops intel_iommu_ops;
static bool translation_pre_enabled(struct intel_iommu *iommu)
{
@@ -5613,7 +5613,7 @@ static bool intel_iommu_is_attach_deferred(struct iommu_domain *domain,
return dev->archdata.iommu == DEFER_DEVICE_DOMAIN_INFO;
}
-const struct iommu_ops intel_iommu_ops = {
+static const struct iommu_ops intel_iommu_ops = {
.capable = intel_iommu_capable,
.domain_alloc = intel_iommu_domain_alloc,
.domain_free = intel_iommu_domain_free,
--
2.21.0
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/vt-d: Make function signatures static
2019-09-07 6:49 [PATCH] iommu/vt-d: Make function signatures static Adam Zerella
@ 2019-09-07 12:10 ` Lu Baolu
2019-09-10 8:15 ` Joerg Roedel
1 sibling, 0 replies; 5+ messages in thread
From: Lu Baolu @ 2019-09-07 12:10 UTC (permalink / raw)
To: Adam Zerella; +Cc: iommu, dwmw2
Hi,
On 9/7/19 2:49 PM, Adam Zerella wrote:
> warning: symbol 'intel_iommu_gfx_mapped' was not declared. Should it be static?
> warning: symbol 'intel_iommu_ops' was not declared. Should it be static?
>
> Squash a couple of Sparse warnings by making these symbols static.
>
> Signed-off-by: Adam Zerella <adam.zerella@gmail.com>
> ---
> drivers/iommu/intel-iommu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index 12d094d08c0a..28134891fa9c 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -365,7 +365,7 @@ static int iommu_identity_mapping;
> #define IDENTMAP_GFX 2
> #define IDENTMAP_AZALIA 4
>
> -int intel_iommu_gfx_mapped;
> +static int intel_iommu_gfx_mapped;
> EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped);
It's hard to understand this. This symbol is exported and used in the
graphic driver. How could it be static?
>
> #define DUMMY_DEVICE_DOMAIN_INFO ((struct device_domain_info *)(-1))
> @@ -397,7 +397,7 @@ int for_each_device_domain(int (*fn)(struct device_domain_info *info,
> return 0;
> }
>
> -const struct iommu_ops intel_iommu_ops;
> +static const struct iommu_ops intel_iommu_ops;
Ditto. This is used in dmar.c.
Best regards,
Baolu
>
> static bool translation_pre_enabled(struct intel_iommu *iommu)
> {
> @@ -5613,7 +5613,7 @@ static bool intel_iommu_is_attach_deferred(struct iommu_domain *domain,
> return dev->archdata.iommu == DEFER_DEVICE_DOMAIN_INFO;
> }
>
> -const struct iommu_ops intel_iommu_ops = {
> +static const struct iommu_ops intel_iommu_ops = {
> .capable = intel_iommu_capable,
> .domain_alloc = intel_iommu_domain_alloc,
> .domain_free = intel_iommu_domain_free,
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/vt-d: Make function signatures static
2019-09-07 6:49 [PATCH] iommu/vt-d: Make function signatures static Adam Zerella
2019-09-07 12:10 ` Lu Baolu
@ 2019-09-10 8:15 ` Joerg Roedel
2019-09-10 13:06 ` Qian Cai
1 sibling, 1 reply; 5+ messages in thread
From: Joerg Roedel @ 2019-09-10 8:15 UTC (permalink / raw)
To: Adam Zerella; +Cc: iommu, dwmw2
On Sat, Sep 07, 2019 at 04:49:33PM +1000, Adam Zerella wrote:
> drivers/iommu/intel-iommu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/vt-d: Make function signatures static
2019-09-10 8:15 ` Joerg Roedel
@ 2019-09-10 13:06 ` Qian Cai
2019-09-10 14:44 ` Joerg Roedel
0 siblings, 1 reply; 5+ messages in thread
From: Qian Cai @ 2019-09-10 13:06 UTC (permalink / raw)
To: Joerg Roedel, Adam Zerella; +Cc: iommu, dwmw2
On Tue, 2019-09-10 at 10:15 +0200, Joerg Roedel wrote:
> On Sat, Sep 07, 2019 at 04:49:33PM +1000, Adam Zerella wrote:
> > drivers/iommu/intel-iommu.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Applied, thanks.
Joerg, not sure if you saw the reply from Lu,
https://lore.kernel.org/linux-iommu/ba8d4792-3b62-98a8-31d8-74a08be2f983@linux.i
ntel.com/
This patch is not even compiled for me as well.
WARNING: "intel_iommu_gfx_mapped" [vmlinux] is a static EXPORT_SYMBOL_GPL
drivers/iommu/dmar.o: In function `iommu_device_set_ops':
/home/linux-mm/linux/./include/linux/iommu.h:382: undefined reference to
`intel_iommu_ops'
make: *** [Makefile:1096: vmlinux] Error 1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/vt-d: Make function signatures static
2019-09-10 13:06 ` Qian Cai
@ 2019-09-10 14:44 ` Joerg Roedel
0 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2019-09-10 14:44 UTC (permalink / raw)
To: Qian Cai; +Cc: iommu, dwmw2, Adam Zerella
On Tue, Sep 10, 2019 at 09:06:56AM -0400, Qian Cai wrote:
> On Tue, 2019-09-10 at 10:15 +0200, Joerg Roedel wrote:
> > On Sat, Sep 07, 2019 at 04:49:33PM +1000, Adam Zerella wrote:
> > > drivers/iommu/intel-iommu.c | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > Applied, thanks.
>
> Joerg, not sure if you saw the reply from Lu,
>
> https://lore.kernel.org/linux-iommu/ba8d4792-3b62-98a8-31d8-74a08be2f983@linux.i
> ntel.com/
No, havn't seen any reply, but I figured out myself :)
This patch is already unmerged.
Joerg
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-09-10 14:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-07 6:49 [PATCH] iommu/vt-d: Make function signatures static Adam Zerella
2019-09-07 12:10 ` Lu Baolu
2019-09-10 8:15 ` Joerg Roedel
2019-09-10 13:06 ` Qian Cai
2019-09-10 14:44 ` Joerg Roedel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.