* [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays
@ 2016-10-04 9:54 Jani Nikula
2016-10-04 9:54 ` [PATCH RESEND 2/2] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces Jani Nikula
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jani Nikula @ 2016-10-04 9:54 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Fix sparse warning:
drivers/gpu/drm/i915/intel_device_info.c:195:31: warning: Variable
length array is used.
In truth the array does have constant length, but sparse is too dumb to
realize. This is a bit ugly, but silence the warning no matter what.
Fixes: 91bedd34abf0 ("drm/i915/bdw: Check for slice, subslice and EU count for BDW")
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_device_info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 73b6858600ac..1b20e160bc1f 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -192,7 +192,7 @@ static void broadwell_sseu_info_init(struct drm_i915_private *dev_priv)
struct sseu_dev_info *sseu = &mkwrite_device_info(dev_priv)->sseu;
const int s_max = 3, ss_max = 3, eu_max = 8;
int s, ss;
- u32 fuse2, eu_disable[s_max];
+ u32 fuse2, eu_disable[3]; /* s_max */
fuse2 = I915_READ(GEN8_FUSE2);
sseu->slice_mask = (fuse2 & GEN8_F2_S_ENA_MASK) >> GEN8_F2_S_ENA_SHIFT;
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH RESEND 2/2] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces
2016-10-04 9:54 [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays Jani Nikula
@ 2016-10-04 9:54 ` Jani Nikula
2016-10-04 10:13 ` Joonas Lahtinen
2016-10-04 9:58 ` [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays Joonas Lahtinen
2016-10-04 11:49 ` ✗ Fi.CI.BAT: warning for series starting with [RESEND,1/2] " Patchwork
2 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2016-10-04 9:54 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52: warning: incorrect type in argument 1 (different address spaces)
drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52: expected void [noderef] <asn:2>*vaddr
drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52: got void *
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15: warning: incorrect type in assignment (different address spaces)
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15: expected void *vaddr
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15: got void [noderef] <asn:2>*
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 33c85227643d..e88786ea1219 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -429,7 +429,7 @@ static void *reloc_iomap(struct drm_i915_gem_object *obj,
}
if (cache->vaddr) {
- io_mapping_unmap_atomic(unmask_page(cache->vaddr));
+ io_mapping_unmap_atomic((void __force __iomem *) unmask_page(cache->vaddr));
} else {
struct i915_vma *vma;
int ret;
@@ -474,7 +474,7 @@ static void *reloc_iomap(struct drm_i915_gem_object *obj,
offset += page << PAGE_SHIFT;
}
- vaddr = io_mapping_map_atomic_wc(&cache->i915->ggtt.mappable, offset);
+ vaddr = (void __force *) io_mapping_map_atomic_wc(&cache->i915->ggtt.mappable, offset);
cache->page = page;
cache->vaddr = (unsigned long)vaddr;
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays
2016-10-04 9:54 [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays Jani Nikula
2016-10-04 9:54 ` [PATCH RESEND 2/2] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces Jani Nikula
@ 2016-10-04 9:58 ` Joonas Lahtinen
2016-10-04 10:09 ` Jani Nikula
2016-10-04 11:49 ` ✗ Fi.CI.BAT: warning for series starting with [RESEND,1/2] " Patchwork
2 siblings, 1 reply; 6+ messages in thread
From: Joonas Lahtinen @ 2016-10-04 9:58 UTC (permalink / raw)
To: Jani Nikula, intel-gfx
On ti, 2016-10-04 at 12:54 +0300, Jani Nikula wrote:
> @@ -192,7 +192,7 @@ static void broadwell_sseu_info_init(struct drm_i915_private *dev_priv)
> struct sseu_dev_info *sseu = &mkwrite_device_info(dev_priv)->sseu;
> const int s_max = 3, ss_max = 3, eu_max = 8;
Does sparse shut up if you split these into their own lines?
> int s, ss;
> - u32 fuse2, eu_disable[s_max];
> + u32 fuse2, eu_disable[3]; /* s_max */
If not;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays
2016-10-04 9:58 ` [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays Joonas Lahtinen
@ 2016-10-04 10:09 ` Jani Nikula
0 siblings, 0 replies; 6+ messages in thread
From: Jani Nikula @ 2016-10-04 10:09 UTC (permalink / raw)
To: Joonas Lahtinen, intel-gfx
On Tue, 04 Oct 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> On ti, 2016-10-04 at 12:54 +0300, Jani Nikula wrote:
>> @@ -192,7 +192,7 @@ static void broadwell_sseu_info_init(struct drm_i915_private *dev_priv)
>> struct sseu_dev_info *sseu = &mkwrite_device_info(dev_priv)->sseu;
>> const int s_max = 3, ss_max = 3, eu_max = 8;
>
> Does sparse shut up if you split these into their own lines?
>
>> int s, ss;
>> - u32 fuse2, eu_disable[s_max];
>> + u32 fuse2, eu_disable[3]; /* s_max */
>
> If not;
>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
No go, pushed this one. Thanks for the review.
How about patch 2/2?
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 2/2] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces
2016-10-04 9:54 ` [PATCH RESEND 2/2] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces Jani Nikula
@ 2016-10-04 10:13 ` Joonas Lahtinen
0 siblings, 0 replies; 6+ messages in thread
From: Joonas Lahtinen @ 2016-10-04 10:13 UTC (permalink / raw)
To: Jani Nikula, intel-gfx
On ti, 2016-10-04 at 12:54 +0300, Jani Nikula wrote:
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52: warning: incorrect type in argument 1 (different address spaces)
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52: expected void [noderef] <asn:2>*vaddr
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52: got void *
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15: warning: incorrect type in assignment (different address spaces)
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15: expected void *vaddr
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15: got void [noderef] <asn:2>*
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✗ Fi.CI.BAT: warning for series starting with [RESEND,1/2] drm/i915: workaround sparse warning on variable length arrays
2016-10-04 9:54 [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays Jani Nikula
2016-10-04 9:54 ` [PATCH RESEND 2/2] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces Jani Nikula
2016-10-04 9:58 ` [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays Joonas Lahtinen
@ 2016-10-04 11:49 ` Patchwork
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2016-10-04 11:49 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [RESEND,1/2] drm/i915: workaround sparse warning on variable length arrays
URL : https://patchwork.freedesktop.org/series/13269/
State : warning
== Summary ==
Series 13269v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/13269/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-byt-j1900)
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS (fi-skl-6700hq)
fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15
fi-bsw-n3050 total:244 pass:202 dwarn:0 dfail:0 fail:0 skip:42
fi-bxt-t5700 total:244 pass:214 dwarn:0 dfail:0 fail:0 skip:30
fi-byt-j1900 total:244 pass:210 dwarn:2 dfail:0 fail:1 skip:31
fi-byt-n2820 total:244 pass:208 dwarn:0 dfail:0 fail:1 skip:35
fi-hsw-4770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-hsw-4770r total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-ilk-650 total:244 pass:182 dwarn:0 dfail:0 fail:2 skip:60
fi-ivb-3520m total:244 pass:219 dwarn:0 dfail:0 fail:0 skip:25
fi-ivb-3770 total:244 pass:207 dwarn:0 dfail:0 fail:0 skip:37
fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14
fi-skl-6700hq total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-skl-6700k total:244 pass:219 dwarn:1 dfail:0 fail:0 skip:24
fi-skl-6770hq total:244 pass:228 dwarn:1 dfail:0 fail:1 skip:14
fi-snb-2520m total:244 pass:208 dwarn:0 dfail:0 fail:0 skip:36
fi-snb-2600 total:244 pass:207 dwarn:0 dfail:0 fail:0 skip:37
Results at /archive/results/CI_IGT_test/Patchwork_2620/
cedbdecff4c878309133e066f696ea63d41cee73 drm-intel-nightly: 2016y-10m-04d-10h-53m-20s UTC integration manifest
323d3a4 drm/i915: silence io mapping/unmapping sparse warnings on different address spaces
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-04 11:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-04 9:54 [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays Jani Nikula
2016-10-04 9:54 ` [PATCH RESEND 2/2] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces Jani Nikula
2016-10-04 10:13 ` Joonas Lahtinen
2016-10-04 9:58 ` [PATCH RESEND 1/2] drm/i915: workaround sparse warning on variable length arrays Joonas Lahtinen
2016-10-04 10:09 ` Jani Nikula
2016-10-04 11:49 ` ✗ Fi.CI.BAT: warning for series starting with [RESEND,1/2] " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox