lkml.org 
[lkml]   [2011]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 21 Feb 2011 15:28:02 -0800
FromCorey Ashford <>
Subject[BUG ?] checkpatch.pl rejects as error something I think it ought to be allow
Hi,

I have a piece of code where I have two constants defined as follows:

static const unsigned long polling_interval_sec = 1;
static const unsigned long polling_interval_ns = 0;

Now, it's clear to me that I want these two values to have the keywords
const and static. I could use a #define here, but const static seemed
cleaner to me.

When I run checkpatch.pl across this code, I get this error:

ERROR: do not initialise statics to 0 or NULL.

I think the problem here is that another case is needed for "static
const" that does allow 0.

What do you think?

Thanks for your consideration,

- Corey


\
 
 \ /
  Last update: 2011-02-22 00:31    [from the cache]
©2003-2010