From: Andrey Panin <pazke@donpac.ru>
To: Dave Jones <davej@redhat.com>,
Jonathan Campbell <jon@nerdgrounds.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Date: Tue, 25 Sep 2007 08:45:50 +0400 [thread overview]
Message-ID: <20070925044550.GA5419@pazke.donpac.ru> (raw)
In-Reply-To: <20070924190917.GG8127@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]
On 267, 09 24, 2007 at 03:09:17PM -0400, Dave Jones wrote:
> On Mon, Sep 24, 2007 at 01:51:17AM -0700, Jonathan Campbell wrote:
>
>
> > +#if defined(__i386__) && defined(CONFIG_DMI)
> > dmi_check_system(acpi_dmi_table);
> > #endif
> >
> > +#ifdef CONFIG_DMI
> > dmi_scan_machine();
> > +#endif
> >
> > +#ifdef CONFIG_DMI
> > /* Check and install the TSC clocksource */
> > dmi_check_system(bad_tsc_dmi_table);
> > +#endif
> >
> > +#ifdef CONFIG_DMI
> > dmi_check_system(acpi_osl_dmi_table);
> > +#endif
>
> Instead of adding all these ifdefs, we could just define
> add something along the lines of..
>
> #ifndef CONFIG_DMI
> #define dmi_check_system do {} while (0)
> #endif
>
> in some header, which hides the uglies away from the code
> whilst having the same net effect.
Let take a look at linux/dmi.h:
#ifdef CONFIG_DMI
extern int dmi_check_system(struct dmi_system_id *list);
extern char * dmi_get_system_info(int field);
extern struct dmi_device * dmi_find_device(int type, const char *name,
struct dmi_device *from);
extern void dmi_scan_machine(void);
extern int dmi_get_year(int field);
extern int dmi_name_in_vendors(char *str);
#else
static inline int dmi_check_system(struct dmi_system_id *list) { return 0; }
static inline char * dmi_get_system_info(int field) { return NULL; }
static inline struct dmi_device * dmi_find_device(int type, const char *name,
struct dmi_device *from) { return NULL; }
static inline int dmi_get_year(int year) { return 0; }
static inline int dmi_name_in_vendors(char *s) { return 0; }
#endif
--
Andrey Panin | Linux and UNIX system administrator
pazke@donpac.ru | PGP key: wwwkeys.pgp.net
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-09-25 4:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-24 8:51 [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7 Jonathan Campbell
2007-09-24 17:49 ` Randy Dunlap
2007-09-26 18:42 ` Jonathan Campbell
2007-09-26 22:06 ` Randy Dunlap
2007-09-26 23:20 ` Randy Dunlap
2007-09-26 23:44 ` Jonathan Campbell
[not found] ` <46FAEE97.7090902@nerdgrounds.com>
2007-09-26 23:47 ` Randy Dunlap
2007-09-26 23:49 ` Jonathan Campbell
2007-09-28 21:24 ` Bill Davidsen
2007-09-28 21:56 ` Randy Dunlap
2007-10-01 13:44 ` Lennart Sorensen
2007-10-01 14:28 ` Bill Davidsen
2007-10-02 4:48 ` Willy Tarreau
2007-09-24 19:09 ` Dave Jones
2007-09-25 4:45 ` Andrey Panin [this message]
2007-09-25 7:28 ` Jan Engelhardt
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=20070925044550.GA5419@pazke.donpac.ru \
--to=pazke@donpac.ru \
--cc=davej@redhat.com \
--cc=jon@nerdgrounds.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