* [PATCH] drm/i915: fix warn, struct may be used uninitialized
@ 2010-06-16 14:54 Christoph Fritz
2010-06-17 13:27 ` Christoph Fritz
2010-07-01 22:59 ` Eric Anholt
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Fritz @ 2010-06-16 14:54 UTC (permalink / raw)
To: kernel-janitors
In function ‘i915_setup_compression’:
warning: ‘compressed_llb’ may be used uninitialized in this function
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
drivers/gpu/drm/i915/i915_dma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 59a2bf8..772a72a 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1229,7 +1229,8 @@ static void i915_warn_stolen(struct drm_device *dev)
static void i915_setup_compression(struct drm_device *dev, int size)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- struct drm_mm_node *compressed_fb, *compressed_llb;
+ struct drm_mm_node *compressed_fb;
+ struct drm_mm_node *compressed_llb;
unsigned long cfb_base;
unsigned long ll_base = 0;
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: fix warn, struct may be used uninitialized
2010-06-16 14:54 [PATCH] drm/i915: fix warn, struct may be used uninitialized Christoph Fritz
@ 2010-06-17 13:27 ` Christoph Fritz
2010-07-01 22:59 ` Eric Anholt
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Fritz @ 2010-06-17 13:27 UTC (permalink / raw)
To: kernel-janitors
I meant to send the following patch.
Thanks for pointing out,
chf
---
In function ‘i915_setup_compression’:
warning: ‘compressed_llb’ may be used uninitialized in this function
this modifies the topology of the function a bit
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
drivers/gpu/drm/i915/i915_dma.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 59a2bf8..17b5dc8 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1274,21 +1274,18 @@ static void i915_setup_compression(struct drm_device *dev, int size)
drm_mm_put_block(compressed_fb);
drm_mm_put_block(compressed_llb);
}
- }
-
- dev_priv->cfb_size = size;
- intel_disable_fbc(dev);
- dev_priv->compressed_fb = compressed_fb;
-
- if (IS_GM45(dev)) {
- I915_WRITE(DPFC_CB_BASE, compressed_fb->start);
- } else {
I915_WRITE(FBC_CFB_BASE, cfb_base);
I915_WRITE(FBC_LL_BASE, ll_base);
dev_priv->compressed_llb = compressed_llb;
+ } else {
+ I915_WRITE(DPFC_CB_BASE, compressed_fb->start);
}
+ dev_priv->cfb_size = size;
+ intel_disable_fbc(dev);
+ dev_priv->compressed_fb = compressed_fb;
+
DRM_DEBUG("FBC base 0x%08lx, ll base 0x%08lx, size %dM\n", cfb_base,
ll_base, size >> 20);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: fix warn, struct may be used uninitialized
2010-06-16 14:54 [PATCH] drm/i915: fix warn, struct may be used uninitialized Christoph Fritz
2010-06-17 13:27 ` Christoph Fritz
@ 2010-07-01 22:59 ` Eric Anholt
1 sibling, 0 replies; 3+ messages in thread
From: Eric Anholt @ 2010-07-01 22:59 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 271 bytes --]
On Thu, 17 Jun 2010 15:27:29 +0200, Christoph Fritz <chf.fritz@googlemail.com> wrote:
> I meant to send the following patch.
>
> Thanks for pointing out,
> chf
I went with a simpler one from another submitter that didn't change the
structure of the function.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-01 22:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16 14:54 [PATCH] drm/i915: fix warn, struct may be used uninitialized Christoph Fritz
2010-06-17 13:27 ` Christoph Fritz
2010-07-01 22:59 ` Eric Anholt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).