From: Corey Ashford <cjashfor@linux.vnet.ibm.com>
To: LKML <linux-kernel@vger.kernel.org>, Andy Whitcroft <apw@canonical.com>
Subject: [BUG ?] checkpatch.pl rejects as error something I think it ought to be allow
Date: Mon, 21 Feb 2011 15:28:02 -0800 [thread overview]
Message-ID: <4D62F502.9040506@linux.vnet.ibm.com> (raw)
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
next reply other threads:[~2011-02-21 23:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 23:28 Corey Ashford [this message]
2011-02-21 23:40 ` [BUG ?] checkpatch.pl rejects as error something I think it ought to be allow Andy Whitcroft
2011-02-21 23:49 ` Corey Ashford
2011-02-22 9:07 ` Andy Whitcroft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D62F502.9040506@linux.vnet.ibm.com \
--to=cjashfor@linux.vnet.ibm.com \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox