lkml.org 
[lkml]   [2013]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i915, debugfs: Fix uninitialized warning
On Thu, Nov 21, 2013 at 05:10:30PM +0100, Richard Weinberger wrote:
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 6ed45a984230..1191aa47adc9 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -2347,7 +2347,7 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe,
> > {
> > struct drm_i915_private *dev_priv = dev->dev_private;
> > struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe];
> > - u32 val;
> > + u32 val = 0; /* shut up gcc */
>
> Wouldn't it be better to use uninitialized_var() here?

I remember Linus' rant about this macro so that's why I don't use it
anymore.

In this specific case, it doesn't matter whichever we do so I'll let the
maintainer make a wish :)

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2013-11-21 18:01    [W:0.074 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site