| To: | Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
|---|---|
| Subject: | Re: COMMAND_LINE_SIZE and CONFIG_FRAME_WARN |
| From: | Dmitri Vorobiev <dmitri.vorobiev@gmail.com> |
| Date: | Fri, 6 Nov 2009 18:34:10 +0200 |
| Cc: | linux-mips@linux-mips.org |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=hWZnce3LBdQP1RP3aDxEklftz7SjDoJsY3wIUCxx7rU=; b=Ag1d4ldhtVVT2JITdDR9KgOCOS/KHoQQFKueiXzbq6WbLYV5yTbWGQ/mEvAa8ovGKD fEqByScqXVNFlQ2Bwo7tJibzuryOJromITfqeBKO6VxjaSS4cO5LL8WEU7XgwT7vxUOR CsZP/O0WQmxbnRU9N0jjvMy3D2720T6+8Dl64= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=BloOUPPl8DVGzVmN3lIL8pKPsWX4xaGRPNV6SVI3b8jfVwqeftg2uX0WJ4kOAQrbb+ AGxE8b8O7nXGHPq4kmvnrdjPfDemPGLI9qhByFV8ejcqAVZL7DDzkmuRMvwRoEFCNikp mxBJ5h9nB0cuVvG8D8+40tjIl1zIyWo+nVv6Q= |
| In-reply-to: | <90edad820911060822g40233a8ft28001d68186b989e@mail.gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <20091107.010839.246840249.anemo@mba.ocn.ne.jp> <90edad820911060822g40233a8ft28001d68186b989e@mail.gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
On Fri, Nov 6, 2009 at 6:22 PM, Dmitri Vorobiev <dmitri.vorobiev@gmail.com> wrote: > On Fri, Nov 6, 2009 at 6:08 PM, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote: >> Recently COMMAND_LINE_SIZE (CL_SIZE) was extended to 4096 from 512. >> (commit 22242681 "MIPS: Extend COMMAND_LINE_SIZE") >> >> This cause warning if something like buf[CL_SIZE] was declared as a >> local variable, for example in prom_init_cmdline() on some platforms. >> >> And since many Makefiles in arch/mips enables -Werror, this cause >> build failure. >> >> How can we avoid this error? >> >> - do not use local array? (but dynamic allocation cannot be used in >> such an early stage. static array?) > > Maybe a static array marked with __initdata? Also, I just thought that maybe it's possible to use a c99 variable-length array here? Like this: int n = COMMAND_LINE_SIZE; char buf[n]; This way, we don't put yet another variable in the .init.data section, unlike with the static array solution. However, this is totally untested, just a thought... Dmitri > > Dmitri > |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: COMMAND_LINE_SIZE and CONFIG_FRAME_WARN, Maciej W. Rozycki |
|---|---|
| Next by Date: | Re: COMMAND_LINE_SIZE and CONFIG_FRAME_WARN, Dmitri Vorobiev |
| Previous by Thread: | Re: COMMAND_LINE_SIZE and CONFIG_FRAME_WARN, Dmitri Vorobiev |
| Next by Thread: | Re: COMMAND_LINE_SIZE and CONFIG_FRAME_WARN, Dmitri Vorobiev |
| Indexes: | [Date] [Thread] [Top] [All Lists] |