Commit 6ce8ea8a authored by Linus Torvalds's avatar Linus Torvalds

Use "ifdef" rather than "if" to test for __KERNEL__

Both work, but the latter can cause warnings in user space
from compilers that don't like using undefined identifiers
in preprocessor expressions (quite reasonable).

Pointed out by Randy Dunlap.
parent 21366d93
......@@ -3384,7 +3384,7 @@ typedef ii_icrb0_e_u_t icrbe_t;
#define IO_PERF_SETS 32
#if __KERNEL__
#ifdef __KERNEL__
#include <asm/sn/dmamap.h>
#include <asm/sn/driver.h>
#include <asm/sn/xtalk/xtalk.h>
......
......@@ -55,7 +55,7 @@ typedef struct xtalk_piomap_s *xtalk_piomap_t;
/*
* Kernel/driver only definitions
*/
#if __KERNEL__
#ifdef __KERNEL__
#include <asm/types.h>
#include <asm/sn/types.h>
......
......@@ -183,7 +183,7 @@ typedef struct xwidget_hwid_s {
/* Generic crosstalk widget initialization interface */
#if __KERNEL__
#ifdef __KERNEL__
extern int xwidget_driver_register(xwidget_part_num_t part_num,
xwidget_mfg_num_t mfg_num,
......
......@@ -15,7 +15,7 @@
#ifndef _KOBJECT_H_
#define _KOBJECT_H_
#if __KERNEL__
#ifdef __KERNEL__
#include <linux/types.h>
#include <linux/list.h>
......
......@@ -15,7 +15,7 @@
#ifndef _KREF_H_
#define _KREF_H_
#if __KERNEL__
#ifdef __KERNEL__
#include <linux/types.h>
#include <asm/atomic.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment