* [PATCH] drm/tegra: vic: fix implicit function declaration warning
@ 2019-02-18 11:00 Anders Roxell
2019-02-18 14:43 ` Thierry Reding
0 siblings, 1 reply; 3+ messages in thread
From: Anders Roxell @ 2019-02-18 11:00 UTC (permalink / raw)
To: thierry.reding, airlied, daniel, jonathanh
Cc: dri-devel, linux-tegra, linux-kernel, Anders Roxell
When CONFIG_IOMMU_API isn't set the following warnings pops up:
drivers/gpu/drm/tegra/vic.c: In function ‘vic_boot’:
drivers/gpu/drm/tegra/vic.c:110:31: error: implicit declaration of function ‘dev_iommu_fwspec_get’; did you mean ‘iommu_fwspec_free’? [-Werror=implicit-function-declaration]
struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev);
^~~~~~~~~~~~~~~~~~~~
iommu_fwspec_free
drivers/gpu/drm/tegra/vic.c:110:31: warning: initialization of ‘struct iommu_fwspec *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
drivers/gpu/drm/tegra/vic.c:117:19: error: ‘struct iommu_fwspec’ has no member named ‘num_ids’
if (spec && spec->num_ids > 0) {
^~
drivers/gpu/drm/tegra/vic.c:118:16: error: ‘struct iommu_fwspec’ has no member named ‘ids’
value = spec->ids[0] & 0xffff;
^~
Rework so that its inside a '#ifdef CONFIG_IOMMU_API' block.
Fixes: f3779cb190a5 ("drm/tegra: vic: Support stream ID register programming")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
drivers/gpu/drm/tegra/vic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
index 39bfed9623de..982ce37ecde1 100644
--- a/drivers/gpu/drm/tegra/vic.c
+++ b/drivers/gpu/drm/tegra/vic.c
@@ -106,6 +106,7 @@ static int vic_boot(struct vic *vic)
if (vic->booted)
return 0;
+#ifdef CONFIG_IOMMU_API
if (vic->config->supports_sid) {
struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev);
u32 value;
@@ -121,6 +122,7 @@ static int vic_boot(struct vic *vic)
vic_writel(vic, value, VIC_THI_STREAMID1);
}
}
+#endif
/* setup clockgating registers */
vic_writel(vic, CG_IDLE_CG_DLY_CNT(4) |
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/tegra: vic: fix implicit function declaration warning
2019-02-18 11:00 [PATCH] drm/tegra: vic: fix implicit function declaration warning Anders Roxell
@ 2019-02-18 14:43 ` Thierry Reding
0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2019-02-18 14:43 UTC (permalink / raw)
To: Anders Roxell; +Cc: airlied, linux-kernel, dri-devel, jonathanh, linux-tegra
[-- Attachment #1.1: Type: text/plain, Size: 1381 bytes --]
On Mon, Feb 18, 2019 at 12:00:50PM +0100, Anders Roxell wrote:
> When CONFIG_IOMMU_API isn't set the following warnings pops up:
>
> drivers/gpu/drm/tegra/vic.c: In function ‘vic_boot’:
> drivers/gpu/drm/tegra/vic.c:110:31: error: implicit declaration of function ‘dev_iommu_fwspec_get’; did you mean ‘iommu_fwspec_free’? [-Werror=implicit-function-declaration]
> struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev);
> ^~~~~~~~~~~~~~~~~~~~
> iommu_fwspec_free
> drivers/gpu/drm/tegra/vic.c:110:31: warning: initialization of ‘struct iommu_fwspec *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
> drivers/gpu/drm/tegra/vic.c:117:19: error: ‘struct iommu_fwspec’ has no member named ‘num_ids’
> if (spec && spec->num_ids > 0) {
> ^~
> drivers/gpu/drm/tegra/vic.c:118:16: error: ‘struct iommu_fwspec’ has no member named ‘ids’
> value = spec->ids[0] & 0xffff;
> ^~
>
> Rework so that its inside a '#ifdef CONFIG_IOMMU_API' block.
>
> Fixes: f3779cb190a5 ("drm/tegra: vic: Support stream ID register programming")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
> drivers/gpu/drm/tegra/vic.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/tegra: vic: fix implicit function declaration warning
@ 2019-02-18 14:43 ` Thierry Reding
0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2019-02-18 14:43 UTC (permalink / raw)
To: Anders Roxell
Cc: airlied, daniel, jonathanh, dri-devel, linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]
On Mon, Feb 18, 2019 at 12:00:50PM +0100, Anders Roxell wrote:
> When CONFIG_IOMMU_API isn't set the following warnings pops up:
>
> drivers/gpu/drm/tegra/vic.c: In function ‘vic_boot’:
> drivers/gpu/drm/tegra/vic.c:110:31: error: implicit declaration of function ‘dev_iommu_fwspec_get’; did you mean ‘iommu_fwspec_free’? [-Werror=implicit-function-declaration]
> struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev);
> ^~~~~~~~~~~~~~~~~~~~
> iommu_fwspec_free
> drivers/gpu/drm/tegra/vic.c:110:31: warning: initialization of ‘struct iommu_fwspec *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
> drivers/gpu/drm/tegra/vic.c:117:19: error: ‘struct iommu_fwspec’ has no member named ‘num_ids’
> if (spec && spec->num_ids > 0) {
> ^~
> drivers/gpu/drm/tegra/vic.c:118:16: error: ‘struct iommu_fwspec’ has no member named ‘ids’
> value = spec->ids[0] & 0xffff;
> ^~
>
> Rework so that its inside a '#ifdef CONFIG_IOMMU_API' block.
>
> Fixes: f3779cb190a5 ("drm/tegra: vic: Support stream ID register programming")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
> drivers/gpu/drm/tegra/vic.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-18 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 11:00 [PATCH] drm/tegra: vic: fix implicit function declaration warning Anders Roxell
2019-02-18 14:43 ` Thierry Reding
2019-02-18 14:43 ` Thierry Reding
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.