* [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds
@ 2012-02-15 13:42 Ben Widawsky
2012-02-15 13:42 ` [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized Ben Widawsky
2012-02-15 13:57 ` [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds Daniel Vetter
0 siblings, 2 replies; 6+ messages in thread
From: Ben Widawsky @ 2012-02-15 13:42 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, Ben Widawsky
Introduced in commits c1cd90ed and d27b1e0e
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_debugfs.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index ae73288..9f1fb33 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -704,6 +704,7 @@ static void i915_ring_error_state(struct seq_file *m,
struct drm_i915_error_state *error,
unsigned ring)
{
+ BUG_ON(ring > VCS);
seq_printf(m, "%s command stream:\n", ring_str(ring));
seq_printf(m, " HEAD: 0x%08x\n", error->head[ring]);
seq_printf(m, " TAIL: 0x%08x\n", error->tail[ring]);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized
2012-02-15 13:42 [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds Ben Widawsky
@ 2012-02-15 13:42 ` Ben Widawsky
2012-02-15 13:51 ` Chris Wilson
2012-03-22 16:53 ` Daniel Vetter
2012-02-15 13:57 ` [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds Daniel Vetter
1 sibling, 2 replies; 6+ messages in thread
From: Ben Widawsky @ 2012-02-15 13:42 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, Ben Widawsky
Introduced in commit 8461d226 and 8c59967c
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_gem.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 2031cc7..3059082 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -387,7 +387,7 @@ i915_gem_shmem_pread_slow(struct drm_device *dev,
char __user *user_data;
ssize_t remain;
loff_t offset;
- int shmem_page_offset, page_length, ret;
+ int shmem_page_offset, page_length, ret = 0;
int obj_do_bit17_swizzling, page_do_bit17_swizzling;
user_data = (char __user *) (uintptr_t) args->data_ptr;
@@ -794,7 +794,7 @@ i915_gem_shmem_pwrite_slow(struct drm_device *dev,
ssize_t remain;
loff_t offset;
char __user *user_data;
- int shmem_page_offset, page_length, ret;
+ int shmem_page_offset, page_length, ret = 0;
int obj_do_bit17_swizzling, page_do_bit17_swizzling;
user_data = (char __user *) (uintptr_t) args->data_ptr;
--
1.7.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized
2012-02-15 13:42 ` [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized Ben Widawsky
@ 2012-02-15 13:51 ` Chris Wilson
2012-02-15 13:55 ` Ben Widawsky
2012-03-22 16:53 ` Daniel Vetter
1 sibling, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2012-02-15 13:51 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, Ben Widawsky
On Wed, 15 Feb 2012 14:42:43 +0100, Ben Widawsky <ben@bwidawsk.net> wrote:
> Introduced in commit 8461d226 and 8c59967c
I quibble at the word 'fix', since both are merely silencing the
compiler. :)
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized
2012-02-15 13:51 ` Chris Wilson
@ 2012-02-15 13:55 ` Ben Widawsky
0 siblings, 0 replies; 6+ messages in thread
From: Ben Widawsky @ 2012-02-15 13:55 UTC (permalink / raw)
To: Chris Wilson; +Cc: Daniel Vetter, intel-gfx
On Wed, 15 Feb 2012 13:51:15 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Wed, 15 Feb 2012 14:42:43 +0100, Ben Widawsky <ben@bwidawsk.net> wrote:
> > Introduced in commit 8461d226 and 8c59967c
>
> I quibble at the word 'fix', since both are merely silencing the
> compiler. :)
> -Chris
>
I think Daniel isn't taking the patches... I'm just sick of seeing the
warnings, and having VIM jump to this irrelevant bit after compile.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized
2012-02-15 13:42 ` [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized Ben Widawsky
2012-02-15 13:51 ` Chris Wilson
@ 2012-03-22 16:53 ` Daniel Vetter
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-03-22 16:53 UTC (permalink / raw)
To: Ben Widawsky; +Cc: Daniel Vetter, intel-gfx
On Wed, Feb 15, 2012 at 02:42:43PM +0100, Ben Widawsky wrote:
> Introduced in commit 8461d226 and 8c59967c
>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
I've merged this two here, but not before adding some grumpy complains
about gcc (and doing a s/fix/shut up/ in the commit headlines).
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds
2012-02-15 13:42 [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds Ben Widawsky
2012-02-15 13:42 ` [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized Ben Widawsky
@ 2012-02-15 13:57 ` Daniel Vetter
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-02-15 13:57 UTC (permalink / raw)
To: Ben Widawsky; +Cc: Daniel Vetter, intel-gfx
On Wed, Feb 15, 2012 at 02:42:42PM +0100, Ben Widawsky wrote:
> Introduced in commits c1cd90ed and d27b1e0e
>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
This one smells like gcc being stupid - it's in a static function an gcc
sees all the callsites and we only pass in a const ring argument. I'll
drop that one.
The other one is a bit more fishy, but we do check args->size == 0 before
calling into these functions, so we will execute the loop at least once
and hence is guaranteed to be initialized. It's harder to check, so gcc
has a point here. But this code is scheduled to get completely rewritten
anyway, so I'll drop this one, too. I'll re-send the new code in a few
days or so.
Cheers, Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-22 16:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-15 13:42 [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds Ben Widawsky
2012-02-15 13:42 ` [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized Ben Widawsky
2012-02-15 13:51 ` Chris Wilson
2012-02-15 13:55 ` Ben Widawsky
2012-03-22 16:53 ` Daniel Vetter
2012-02-15 13:57 ` [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds Daniel Vetter
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.