2006-03-24 23:08:10

by Daniel Walker

[permalink] [raw]
Subject: [PATCH]

Signed-Off-By: Daniel Walker <[email protected]>

Index: linux-2.6.16/kernel/time/timeofday.c
===================================================================
--- linux-2.6.16.orig/kernel/time/timeofday.c
+++ linux-2.6.16/kernel/time/timeofday.c
@@ -644,7 +644,7 @@ static void timeofday_periodic_hook(unsi

int something_changed = 0;
int clocksource_changed = 0;
- struct clocksource old_clock;
+ struct clocksource old_clock = { .mult = 1, .shift = 0 };
static s64 second_check;

write_seqlock_irqsave(&system_time_lock, flags);


2006-03-24 23:19:35

by john stultz

[permalink] [raw]
Subject: Re: [PATCH]

On Fri, 2006-03-24 at 15:07 -0800, Daniel Walker wrote:
> Signed-Off-By: Daniel Walker <[email protected]>
>
> Index: linux-2.6.16/kernel/time/timeofday.c
> ===================================================================
> --- linux-2.6.16.orig/kernel/time/timeofday.c
> +++ linux-2.6.16/kernel/time/timeofday.c
> @@ -644,7 +644,7 @@ static void timeofday_periodic_hook(unsi
>
> int something_changed = 0;
> int clocksource_changed = 0;
> - struct clocksource old_clock;
> + struct clocksource old_clock = { .mult = 1, .shift = 0 };
> static s64 second_check;
>
> write_seqlock_irqsave(&system_time_lock, flags);

I assume this is a fix for the GCC "may be used uninitialized" warning?

thanks
-john

2006-03-24 23:22:41

by Daniel Walker

[permalink] [raw]
Subject: Re: [PATCH]

On Fri, 2006-03-24 at 15:19 -0800, john stultz wrote:
> On Fri, 2006-03-24 at 15:07 -0800, Daniel Walker wrote:
> > Signed-Off-By: Daniel Walker <[email protected]>
> >
> > Index: linux-2.6.16/kernel/time/timeofday.c
> > ===================================================================
> > --- linux-2.6.16.orig/kernel/time/timeofday.c
> > +++ linux-2.6.16/kernel/time/timeofday.c
> > @@ -644,7 +644,7 @@ static void timeofday_periodic_hook(unsi
> >
> > int something_changed = 0;
> > int clocksource_changed = 0;
> > - struct clocksource old_clock;
> > + struct clocksource old_clock = { .mult = 1, .shift = 0 };
> > static s64 second_check;
> >
> > write_seqlock_irqsave(&system_time_lock, flags);
>
> I assume this is a fix for the GCC "may be used uninitialized" warning?

Yeah, Sorry ,I accidentally pressed enter before I described it ..

Daniel