lkml.org 
[lkml]   [2017]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/platform/intel-mid: make several arrays static, makes code smaller
From
Date
On Fri, 2017-08-25 at 19:51 +0200, Lukas Wunner wrote:
> On Fri, Aug 25, 2017 at 05:32:06PM +0100, Colin King wrote:
> > --- a/arch/x86/platform/intel-mid/pwr.c
> > +++ b/arch/x86/platform/intel-mid/pwr.c
> > @@ -444,7 +444,7 @@ static int mid_set_initial_state(struct mid_pwr
> > *pwr, const u32 *states)
> >  static int pnw_set_initial_state(struct mid_pwr *pwr)
> >  {
> >   /* On Penwell SRAM must stay powered on */
> > - const u32 states[] = {
> > + static const u32 states[] = {
> >   0xf00fffff, /* PM_SSC(0) */
> >   0xffffffff, /* PM_SSC(1) */
> >   0xffffffff, /* PM_SSC(2) */
>
> That's a known gcc bug:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68725
>
> There are hundreds of constant compound literals that are generated
> on the stack rather than stored in rodata, do you intend to file
> patches for all of them?  Adding static everywhere is just a
> workaround that bloats the code.  Fixing the root cause in gcc would
> make more sense.

That is a good point.

--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2017-08-25 20:00    [W:0.057 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site