lkml.org 
[lkml]   [2011]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 1/4][kernel][slimdump] Add new elf-note of type NT_NOCOREDUMP to capture slimdump
On 2011-10-07 22:06 +0530, K.Prasad wrote:
> On Tue, Oct 04, 2011 at 11:04:17AM -0400, Nick Bowler wrote:
> > On 2011-10-03 13:02 +0530, K.Prasad wrote:
> > > + const char note_name[] = "PANIC_MCE";
> >
> > static const ...
> >
> > > + const char desc_msg[] = "Crash induced due to a fatal machine "
> > > + "check error";
> >
> > likewise.
>
> Not sure why you wanted them to be defined as static. These strings are
> going to be copied into respective elf-note buffers just a few lines
> below their definitions.

It's possible that GCC's optimizer will do the right thing in either
case and it won't matter at all. I haven't tried compiling this patch
so I've not looked at the compiler output. But for the most part, using
"static" will save the few bytes of code needed to copy these strings
onto the stack (as well as the corresponding reduction in stack usage).

> > Please don't break string literals onto multiple lines like this, since
> > it prevents users from finding the string using "grep".
>
> We could do so, hoping that checkpatch.pl doesn't complain if we crossed
> the 80-column width :-)

If it does, the error is in checkpatch.pl rather than your code. :)

Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)


\
 
 \ /
  Last update: 2011-10-07 20:39    [W:0.317 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site