1.1 --- a/patches/linux/2.6.11.3/100-arch_alpha_kernel_srcons.patch Fri Sep 05 16:15:34 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,134 +0,0 @@
1.4 -Date: Sun, 20 Mar 2005 20:26:02 -0800
1.5 -From: Richard Henderson <rth@twiddle.net>
1.6 -To: Andrew Morton <akpm@osdl.org>
1.7 -Cc: Dan Kegel <dank@kegel.com>, jbglaw@lug-owl.de,
1.8 - linux-kernel@vger.kernel.org, torvalds@osdl.org
1.9 -Subject: Re: 2.6.11.3 build problem in arch/alpha/kernel/srcons.c with gcc-4.0
1.10 -Message-ID: <20050321042602.GA3795@twiddle.net>
1.11 -Mail-Followup-To: Andrew Morton <akpm@osdl.org>, Dan Kegel <dank@kegel.com>,
1.12 - jbglaw@lug-owl.de, linux-kernel@vger.kernel.org, torvalds@osdl.org
1.13 -References: <423E238F.3030805@kegel.com> <20050320190352.65cc1396.akpm@osdl.org>
1.14 -Mime-Version: 1.0
1.15 -Content-Type: text/plain; charset=us-ascii
1.16 -Content-Disposition: inline
1.17 -In-Reply-To: <20050320190352.65cc1396.akpm@osdl.org>
1.18 -User-Agent: Mutt/1.4.1i
1.19 -
1.20 -On Sun, Mar 20, 2005 at 07:03:52PM -0800, Andrew Morton wrote:
1.21 -> Dan Kegel <dank@kegel.com> wrote:
1.22 -> >
1.23 -> > Anyone with an alpha care to suggest a fix for this?
1.24 -> >
1.25 -> > arch/alpha/kernel/srmcons.c: In function 'srmcons_open':
1.26 -> > arch/alpha/kernel/srmcons.c:196: warning: 'srmconsp' may be used uninitialized in this function
1.27 -> > make[1]: *** [arch/alpha/kernel/srmcons.o] Error 1
1.28 -> > make: *** [arch/alpha/kernel] Error 2
1.29 -> >
1.30 -> > I get this when building the 2.6.11.3 kernel with a recent gcc-4.0 snapshot.
1.31 -> >
1.32 ->
1.33 -> It's beyond gcc's ability to figure out that the code is OK. Options would
1.34 -> be to disable -Werror, or to artificially initialise that variable.
1.35 -
1.36 -Fixed thus.
1.37 -
1.38 -Note that even with a _raw_read_trylock implementation, smp still
1.39 -doesn't work. Everything that init spawns dies immediately. I
1.40 -havn't had a chance to find out why yet...
1.41 -
1.42 -[ Note: deleted changes to smp.c, since they didn't apply cleanly
1.43 - to 2.6.11.3 (the function had moved, I guess), and they seemed unrelated.]
1.44 -
1.45 -r~
1.46 -
1.47 -
1.48 -
1.49 -You can import this changeset into BK by piping this whole message to:
1.50 -'| bk receive [path to repository]' or apply the patch as usual.
1.51 -
1.52 -===================================================================
1.53 -
1.54 -
1.55 -ChangeSet@1.2289, 2005-03-20 12:29:41-08:00, rth@kanga.twiddle.home
1.56 - [ALPHA] Elimitate two warnings from gcc4.
1.57 -
1.58 -
1.59 - smp.c | 43 -------------------------------------------
1.60 - srmcons.c | 27 ++++++++++-----------------
1.61 - 2 files changed, 10 insertions(+), 60 deletions(-)
1.62 -
1.63 -
1.64 -diff -Nru a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
1.65 ---- a/arch/alpha/kernel/srmcons.c 2005-03-20 20:23:28 -08:00
1.66 -+++ b/arch/alpha/kernel/srmcons.c 2005-03-20 20:23:28 -08:00
1.67 -@@ -164,29 +164,22 @@
1.68 - unsigned long flags;
1.69 - int retval = 0;
1.70 -
1.71 -- spin_lock_irqsave(&srmconsp_lock, flags);
1.72 --
1.73 -- do {
1.74 -- if (srmconsp != NULL) {
1.75 -- *ps = srmconsp;
1.76 -- break;
1.77 -- }
1.78 -+ if (srmconsp == NULL) {
1.79 -+ spin_lock_irqsave(&srmconsp_lock, flags);
1.80 -
1.81 - srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL);
1.82 -- if (srmconsp == NULL) {
1.83 -+ if (srmconsp == NULL)
1.84 - retval = -ENOMEM;
1.85 -- break;
1.86 -+ else {
1.87 -+ srmconsp->tty = NULL;
1.88 -+ spin_lock_init(&srmconsp->lock);
1.89 -+ init_timer(&srmconsp->timer);
1.90 - }
1.91 -
1.92 -- srmconsp->tty = NULL;
1.93 -- spin_lock_init(&srmconsp->lock);
1.94 -- init_timer(&srmconsp->timer);
1.95 --
1.96 -- *ps = srmconsp;
1.97 -- } while(0);
1.98 --
1.99 -- spin_unlock_irqrestore(&srmconsp_lock, flags);
1.100 -+ spin_unlock_irqrestore(&srmconsp_lock, flags);
1.101 -+ }
1.102 -
1.103 -+ *ps = srmconsp;
1.104 - return retval;
1.105 - }
1.106 -
1.107 -
1.108 -===================================================================
1.109 -
1.110 -
1.111 -This BitKeeper patch contains the following changesets:
1.112 -1.2289
1.113 -## Wrapped with gzip_uu ##
1.114 -
1.115 -
1.116 -M'XL( $!,/D( [56[V_;-A#]+/X5!Q38FFV628KZY<!!TJ98BP9;D"&?BL)@
1.117 -M),H6+%$:2=DQIOWO)>4XSH8D1KK%-F#@>'J\]^[>V6_@6@LU\919H#?PL=%F
1.118 -MXG$E?+,N\[P2OA3&QJ^:QL;'BZ868YLY?O=YS&_;$?4C9$\ON<D6L!)*3SSB
1.119 -M!_<1LVG%Q+OZ\.OUQ=D50M,IO%]P.1=_" /3*3*-6O$JUZ?<+*I&^D9QJ6MA
1.120 -MN)\U=7^?VE.,J7V') YP&/4DPBSN,Y(3PAD1.:8LB=@>3:P:O]%YY3=J_D^4
1.121 -M$ <DH4&0!LRBL"A YT!\2I,4<#C&P9AB('1"TPDC(YQ,, 9+]G1I(?B]($X#
1.122 -M^)G""*-W\/]2>(\R^')V<?GQ["M\J,JZ--P(,.L&UES)4LXU%*JI89YES$>?
1.123 -M@82,8'2Y5Q6-7OA""'.,3AZA:?O><Y4MQKQJ%WR\%$J*:JQ5G352^YEC%&!"
1.124 -ML664!%%/+:^PCW-:I 7)XUSDE*;Q$_(= K9]<FK1E(0]HPPS6^'S2C\"6+=;
1.125 -ML#O=&::T#^*8QGU*;D@>)3BWJA?I3?Z"*G>@#RND49R&PW0_0\O-^RN)C,R\
1.126 -MNCVM2MD9U<CRUL_%EYU:7P]+32@A$644]RQ,*!TL0>B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