From: Mitchell Blank Jr <mitch@sfgoth.com>
To: Alessandro Zummo <alessandro.zummo@towertech.it>
Cc: Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 1/6] RTC subsystem, class
Date: Tue, 20 Dec 2005 17:50:12 -0800 [thread overview]
Message-ID: <20051221015012.GC86547@gaz.sfgoth.com> (raw)
In-Reply-To: <20051220222343.71ee6bab@inspiron>
Alessandro Zummo wrote:
> > > +static const unsigned char rtc_days_in_month[] = {
> > > + 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
> > > +};
> > > +EXPORT_SYMBOL(rtc_days_in_month);
> >
> > exporting static symbols is pretty wrong. Exporting tables is pretty
> > bad style aswell.
>
> Tables like this one are often used in rtc drivers. What
> can I use instead?
Why not just provide a macro in a .h file? Something like:
/* Days in month -- month is in the range (0..11), no leap year */
#define rtc_days_in_month(mon) (28 + ((0xEEFBB3 >> ((mon) * 2)) & 3))
-Mitch
next prev parent reply other threads:[~2005-12-21 1:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-20 20:45 [RFC][PATCH 1/6] RTC subsystem, class Alessandro Zummo
2005-12-20 21:13 ` Christoph Hellwig
2005-12-20 21:23 ` Alessandro Zummo
2005-12-21 1:50 ` Mitchell Blank Jr [this message]
2005-12-21 9:30 ` Alessandro Zummo
2005-12-20 21:30 ` Russell King
2005-12-21 2:01 ` Dmitry Torokhov
2005-12-21 9:50 ` Alessandro Zummo
2005-12-21 19:43 ` Dmitry Torokhov
2005-12-21 23:10 ` Alessandro Zummo
2005-12-22 13:35 ` Pavel Machek
2005-12-26 2:47 ` Alessandro Zummo
2005-12-26 20:16 ` Pavel Machek
2005-12-27 3:16 ` Alessandro Zummo
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=20051221015012.GC86547@gaz.sfgoth.com \
--to=mitch@sfgoth.com \
--cc=alessandro.zummo@towertech.it \
--cc=hch@infradead.org \
--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;
as well as URLs for NNTP newsgroup(s).