Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8450b99a
Commit
8450b99a
authored
Jul 26, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jul 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] #if abuses in drivers/*
Signed-off-by:
Linus Torvalds
<
torvalds@osdl.org
>
parent
0f173da3
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
27 additions
and
27 deletions
+27
-27
drivers/char/tpqic02.c
drivers/char/tpqic02.c
+2
-2
drivers/input/joystick/analog.c
drivers/input/joystick/analog.c
+2
-2
drivers/isdn/hisax/hfc_2bds0.c
drivers/isdn/hisax/hfc_2bds0.c
+2
-2
drivers/isdn/hisax/st5481_d.c
drivers/isdn/hisax/st5481_d.c
+1
-1
drivers/media/radio/miropcm20-radio.c
drivers/media/radio/miropcm20-radio.c
+3
-3
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-core.c
+4
-4
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/aacraid.h
+1
-1
drivers/scsi/aic7xxx/aic79xx_core.c
drivers/scsi/aic7xxx/aic79xx_core.c
+7
-7
drivers/scsi/aic7xxx_old.c
drivers/scsi/aic7xxx_old.c
+1
-1
drivers/scsi/eata_pio.c
drivers/scsi/eata_pio.c
+4
-4
No files found.
drivers/char/tpqic02.c
View file @
8450b99a
...
@@ -898,7 +898,7 @@ static int ll_do_qic_cmd(int cmd, time_t timeout)
...
@@ -898,7 +898,7 @@ static int ll_do_qic_cmd(int cmd, time_t timeout)
printk
(
TPQIC02_NAME
": ll_do_qic_cmd(%x, %ld) failed
\n
"
,
cmd
,
(
long
)
timeout
);
printk
(
TPQIC02_NAME
": ll_do_qic_cmd(%x, %ld) failed
\n
"
,
cmd
,
(
long
)
timeout
);
return
-
EIO
;
return
-
EIO
;
}
}
#if OBSOLETE
#if
def
OBSOLETE
/* wait for ready since it may not be active immediately after reading status */
/* wait for ready since it may not be active immediately after reading status */
while
((
inb_p
(
QIC02_STAT_PORT
)
&
QIC02_STAT_READY
)
!=
0
)
while
((
inb_p
(
QIC02_STAT_PORT
)
&
QIC02_STAT_READY
)
!=
0
)
cpu_relax
();
cpu_relax
();
...
@@ -1419,7 +1419,7 @@ static int start_dma(short mode, unsigned long bytes_todo)
...
@@ -1419,7 +1419,7 @@ static int start_dma(short mode, unsigned long bytes_todo)
if
(
stat
!=
TE_OK
)
if
(
stat
!=
TE_OK
)
return
stat
;
return
stat
;
#if OBSOLETE
#if
def
OBSOLETE
/************* not needed iff rd_status() would wait for ready!!!!!! **********/
/************* not needed iff rd_status() would wait for ready!!!!!! **********/
if
(
wait_for_ready
(
TIM_S
)
!=
TE_OK
)
{
/*** not sure this is needed ***/
if
(
wait_for_ready
(
TIM_S
)
!=
TE_OK
)
{
/*** not sure this is needed ***/
tpqputs
(
TPQD_ALWAYS
,
"wait_for_ready failed in start_dma"
);
tpqputs
(
TPQD_ALWAYS
,
"wait_for_ready failed in start_dma"
);
...
...
drivers/input/joystick/analog.c
View file @
8450b99a
...
@@ -158,11 +158,11 @@ static unsigned int get_time_pit(void)
...
@@ -158,11 +158,11 @@ static unsigned int get_time_pit(void)
return
count
;
return
count
;
}
}
#elif
__x86_64__
#elif
defined(__x86_64__)
#define GET_TIME(x) rdtscl(x)
#define GET_TIME(x) rdtscl(x)
#define DELTA(x,y) ((y)-(x))
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "TSC"
#define TIME_NAME "TSC"
#elif
__alpha__
#elif
defined(__alpha__)
#define GET_TIME(x) do { x = get_cycles(); } while (0)
#define GET_TIME(x) do { x = get_cycles(); } while (0)
#define DELTA(x,y) ((y)-(x))
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "PCC"
#define TIME_NAME "PCC"
...
...
drivers/isdn/hisax/hfc_2bds0.c
View file @
8450b99a
...
@@ -40,7 +40,7 @@ ReadReg(struct IsdnCardState *cs, int data, u_char reg)
...
@@ -40,7 +40,7 @@ ReadReg(struct IsdnCardState *cs, int data, u_char reg)
byteout
(
cs
->
hw
.
hfcD
.
addr
|
1
,
reg
);
byteout
(
cs
->
hw
.
hfcD
.
addr
|
1
,
reg
);
}
}
ret
=
bytein
(
cs
->
hw
.
hfcD
.
addr
);
ret
=
bytein
(
cs
->
hw
.
hfcD
.
addr
);
#if HFC_REG_DEBUG
#if
def
HFC_REG_DEBUG
if
(
cs
->
debug
&
L1_DEB_HSCX_FIFO
&&
(
data
!=
2
))
if
(
cs
->
debug
&
L1_DEB_HSCX_FIFO
&&
(
data
!=
2
))
debugl1
(
cs
,
"t3c RD %02x %02x"
,
reg
,
ret
);
debugl1
(
cs
,
"t3c RD %02x %02x"
,
reg
,
ret
);
#endif
#endif
...
@@ -58,7 +58,7 @@ WriteReg(struct IsdnCardState *cs, int data, u_char reg, u_char value)
...
@@ -58,7 +58,7 @@ WriteReg(struct IsdnCardState *cs, int data, u_char reg, u_char value)
}
}
if
(
data
)
if
(
data
)
byteout
(
cs
->
hw
.
hfcD
.
addr
,
value
);
byteout
(
cs
->
hw
.
hfcD
.
addr
,
value
);
#if HFC_REG_DEBUG
#if
def
HFC_REG_DEBUG
if
(
cs
->
debug
&
L1_DEB_HSCX_FIFO
&&
(
data
!=
HFCD_DATA_NODEB
))
if
(
cs
->
debug
&
L1_DEB_HSCX_FIFO
&&
(
data
!=
HFCD_DATA_NODEB
))
debugl1
(
cs
,
"t3c W%c %02x %02x"
,
data
?
'D'
:
'C'
,
reg
,
value
);
debugl1
(
cs
,
"t3c W%c %02x %02x"
,
data
?
'D'
:
'C'
,
reg
,
value
);
#endif
#endif
...
...
drivers/isdn/hisax/st5481_d.c
View file @
8450b99a
...
@@ -623,7 +623,7 @@ static void ph_connect(struct st5481_adapter *adapter)
...
@@ -623,7 +623,7 @@ static void ph_connect(struct st5481_adapter *adapter)
st5481_usb_device_ctrl_msg
(
adapter
,
FFMSK_D
,
0xfc
,
NULL
,
NULL
);
st5481_usb_device_ctrl_msg
(
adapter
,
FFMSK_D
,
0xfc
,
NULL
,
NULL
);
st5481_in_mode
(
d_in
,
L1_MODE_HDLC
);
st5481_in_mode
(
d_in
,
L1_MODE_HDLC
);
#if LOOPBACK
#if
def
LOOPBACK
// Turn loopback on (data sent on B and D looped back)
// Turn loopback on (data sent on B and D looped back)
st5481_usb_device_ctrl_msg
(
cs
,
LBB
,
0x04
,
NULL
,
NULL
);
st5481_usb_device_ctrl_msg
(
cs
,
LBB
,
0x04
,
NULL
,
NULL
);
#endif
#endif
...
...
drivers/media/radio/miropcm20-radio.c
View file @
8450b99a
...
@@ -75,7 +75,7 @@ static int pcm20_getflags(struct pcm20_device *dev, __u32 *flags, __u16 *signal)
...
@@ -75,7 +75,7 @@ static int pcm20_getflags(struct pcm20_device *dev, __u32 *flags, __u16 *signal)
if
((
i
=
aci_rw_cmd
(
ACI_READ_TUNERSTATION
,
-
1
,
-
1
))
<
0
)
if
((
i
=
aci_rw_cmd
(
ACI_READ_TUNERSTATION
,
-
1
,
-
1
))
<
0
)
return
i
;
return
i
;
#if DEBUG
#if
def
DEBUG
printk
(
"check_sig: 0x%x
\n
"
,
i
);
printk
(
"check_sig: 0x%x
\n
"
,
i
);
#endif
#endif
if
(
i
&
0x80
)
{
if
(
i
&
0x80
)
{
...
@@ -107,7 +107,7 @@ static int pcm20_getflags(struct pcm20_device *dev, __u32 *flags, __u16 *signal)
...
@@ -107,7 +107,7 @@ static int pcm20_getflags(struct pcm20_device *dev, __u32 *flags, __u16 *signal)
if
((
i
=
aci_rds_cmd
(
RDS_RXVALUE
,
&
buf
,
1
))
<
0
)
if
((
i
=
aci_rds_cmd
(
RDS_RXVALUE
,
&
buf
,
1
))
<
0
)
return
i
;
return
i
;
#if DEBUG
#if
def
DEBUG
printk
(
"rds-signal: %d
\n
"
,
buf
);
printk
(
"rds-signal: %d
\n
"
,
buf
);
#endif
#endif
if
(
buf
>
15
)
{
if
(
buf
>
15
)
{
...
@@ -172,7 +172,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
...
@@ -172,7 +172,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
unsigned
long
*
freq
=
arg
;
unsigned
long
*
freq
=
arg
;
pcm20
->
freq
=
*
freq
;
pcm20
->
freq
=
*
freq
;
i
=
pcm20_setfreq
(
pcm20
,
pcm20
->
freq
);
i
=
pcm20_setfreq
(
pcm20
,
pcm20
->
freq
);
#if DEBUG
#if
def
DEBUG
printk
(
"First view (setfreq): 0x%x
\n
"
,
i
);
printk
(
"First view (setfreq): 0x%x
\n
"
,
i
);
#endif
#endif
return
i
;
return
i
;
...
...
drivers/media/video/saa7134/saa7134-core.c
View file @
8450b99a
...
@@ -324,7 +324,7 @@ int saa7134_buffer_queue(struct saa7134_dev *dev,
...
@@ -324,7 +324,7 @@ int saa7134_buffer_queue(struct saa7134_dev *dev,
struct
saa7134_buf
*
buf
)
struct
saa7134_buf
*
buf
)
{
{
struct
saa7134_buf
*
next
=
NULL
;
struct
saa7134_buf
*
next
=
NULL
;
#if DEBUG_SPINLOCKS
#if
def
DEBUG_SPINLOCKS
BUG_ON
(
!
spin_is_locked
(
&
dev
->
slock
));
BUG_ON
(
!
spin_is_locked
(
&
dev
->
slock
));
#endif
#endif
...
@@ -353,7 +353,7 @@ void saa7134_buffer_finish(struct saa7134_dev *dev,
...
@@ -353,7 +353,7 @@ void saa7134_buffer_finish(struct saa7134_dev *dev,
struct
saa7134_dmaqueue
*
q
,
struct
saa7134_dmaqueue
*
q
,
unsigned
int
state
)
unsigned
int
state
)
{
{
#if DEBUG_SPINLOCKS
#if
def
DEBUG_SPINLOCKS
BUG_ON
(
!
spin_is_locked
(
&
dev
->
slock
));
BUG_ON
(
!
spin_is_locked
(
&
dev
->
slock
));
#endif
#endif
dprintk
(
"buffer_finish %p
\n
"
,
q
->
curr
);
dprintk
(
"buffer_finish %p
\n
"
,
q
->
curr
);
...
@@ -370,7 +370,7 @@ void saa7134_buffer_next(struct saa7134_dev *dev,
...
@@ -370,7 +370,7 @@ void saa7134_buffer_next(struct saa7134_dev *dev,
{
{
struct
saa7134_buf
*
buf
,
*
next
=
NULL
;
struct
saa7134_buf
*
buf
,
*
next
=
NULL
;
#if DEBUG_SPINLOCKS
#if
def
DEBUG_SPINLOCKS
BUG_ON
(
!
spin_is_locked
(
&
dev
->
slock
));
BUG_ON
(
!
spin_is_locked
(
&
dev
->
slock
));
#endif
#endif
BUG_ON
(
NULL
!=
q
->
curr
);
BUG_ON
(
NULL
!=
q
->
curr
);
...
@@ -427,7 +427,7 @@ int saa7134_set_dmabits(struct saa7134_dev *dev)
...
@@ -427,7 +427,7 @@ int saa7134_set_dmabits(struct saa7134_dev *dev)
enum
v4l2_field
cap
=
V4L2_FIELD_ANY
;
enum
v4l2_field
cap
=
V4L2_FIELD_ANY
;
enum
v4l2_field
ov
=
V4L2_FIELD_ANY
;
enum
v4l2_field
ov
=
V4L2_FIELD_ANY
;
#if DEBUG_SPINLOCKS
#if
def
DEBUG_SPINLOCKS
BUG_ON
(
!
spin_is_locked
(
&
dev
->
slock
));
BUG_ON
(
!
spin_is_locked
(
&
dev
->
slock
));
#endif
#endif
...
...
drivers/scsi/aacraid/aacraid.h
View file @
8450b99a
...
@@ -1313,7 +1313,7 @@ extern struct aac_common aac_config;
...
@@ -1313,7 +1313,7 @@ extern struct aac_common aac_config;
* only used for debugging.
* only used for debugging.
*/
*/
#if DBG
#if
def
DBG
#define FIB_COUNTER_INCREMENT(counter) (counter)++
#define FIB_COUNTER_INCREMENT(counter) (counter)++
#else
#else
#define FIB_COUNTER_INCREMENT(counter)
#define FIB_COUNTER_INCREMENT(counter)
...
...
drivers/scsi/aic7xxx/aic79xx_core.c
View file @
8450b99a
...
@@ -173,7 +173,7 @@ static void ahd_handle_devreset(struct ahd_softc *ahd,
...
@@ -173,7 +173,7 @@ static void ahd_handle_devreset(struct ahd_softc *ahd,
struct
ahd_devinfo
*
devinfo
,
struct
ahd_devinfo
*
devinfo
,
u_int
lun
,
cam_status
status
,
u_int
lun
,
cam_status
status
,
char
*
message
,
int
verbose_level
);
char
*
message
,
int
verbose_level
);
#if AHD_TARGET_MODE
#if
def
AHD_TARGET_MODE
static
void
ahd_setup_target_msgin
(
struct
ahd_softc
*
ahd
,
static
void
ahd_setup_target_msgin
(
struct
ahd_softc
*
ahd
,
struct
ahd_devinfo
*
devinfo
,
struct
ahd_devinfo
*
devinfo
,
struct
scb
*
scb
);
struct
scb
*
scb
);
...
@@ -1190,7 +1190,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
...
@@ -1190,7 +1190,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
ahd
->
msgin_index
=
0
;
ahd
->
msgin_index
=
0
;
}
}
}
}
#if AHD_TARGET_MODE
#if
def
AHD_TARGET_MODE
else
{
else
{
if
(
bus_phase
==
P_MESGOUT
)
{
if
(
bus_phase
==
P_MESGOUT
)
{
ahd
->
msg_type
=
ahd
->
msg_type
=
...
@@ -5303,7 +5303,7 @@ ahd_free(struct ahd_softc *ahd)
...
@@ -5303,7 +5303,7 @@ ahd_free(struct ahd_softc *ahd)
tstate
=
ahd
->
enabled_targets
[
i
];
tstate
=
ahd
->
enabled_targets
[
i
];
if
(
tstate
!=
NULL
)
{
if
(
tstate
!=
NULL
)
{
#if AHD_TARGET_MODE
#if
def
AHD_TARGET_MODE
int
j
;
int
j
;
for
(
j
=
0
;
j
<
AHD_NUM_LUNS
;
j
++
)
{
for
(
j
=
0
;
j
<
AHD_NUM_LUNS
;
j
++
)
{
...
@@ -5319,7 +5319,7 @@ ahd_free(struct ahd_softc *ahd)
...
@@ -5319,7 +5319,7 @@ ahd_free(struct ahd_softc *ahd)
free
(
tstate
,
M_DEVBUF
);
free
(
tstate
,
M_DEVBUF
);
}
}
}
}
#if AHD_TARGET_MODE
#if
def
AHD_TARGET_MODE
if
(
ahd
->
black_hole
!=
NULL
)
{
if
(
ahd
->
black_hole
!=
NULL
)
{
xpt_free_path
(
ahd
->
black_hole
->
path
);
xpt_free_path
(
ahd
->
black_hole
->
path
);
free
(
ahd
->
black_hole
,
M_DEVBUF
);
free
(
ahd
->
black_hole
,
M_DEVBUF
);
...
@@ -6575,7 +6575,7 @@ ahd_chip_init(struct ahd_softc *ahd)
...
@@ -6575,7 +6575,7 @@ ahd_chip_init(struct ahd_softc *ahd)
ahd_outb
(
ahd
,
CLRSINT3
,
NTRAMPERR
|
OSRAMPERR
);
ahd_outb
(
ahd
,
CLRSINT3
,
NTRAMPERR
|
OSRAMPERR
);
ahd_outb
(
ahd
,
CLRINT
,
CLRSCSIINT
);
ahd_outb
(
ahd
,
CLRINT
,
CLRSCSIINT
);
#if NEEDS_MORE_TESTING
#if
def
NEEDS_MORE_TESTING
/*
/*
* Always enable abort on incoming L_Qs if this feature is
* Always enable abort on incoming L_Qs if this feature is
* supported. We use this to catch invalid SCB references.
* supported. We use this to catch invalid SCB references.
...
@@ -7157,7 +7157,7 @@ ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
...
@@ -7157,7 +7157,7 @@ ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
if
(
match
!=
0
)
if
(
match
!=
0
)
match
=
((
lun
==
slun
)
||
(
lun
==
CAM_LUN_WILDCARD
));
match
=
((
lun
==
slun
)
||
(
lun
==
CAM_LUN_WILDCARD
));
if
(
match
!=
0
)
{
if
(
match
!=
0
)
{
#if AHD_TARGET_MODE
#if
def
AHD_TARGET_MODE
int
group
;
int
group
;
group
=
XPT_FC_GROUP
(
scb
->
io_ctx
->
ccb_h
.
func_code
);
group
=
XPT_FC_GROUP
(
scb
->
io_ctx
->
ccb_h
.
func_code
);
...
@@ -7768,7 +7768,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
...
@@ -7768,7 +7768,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
/* Make sure the sequencer is in a safe location. */
/* Make sure the sequencer is in a safe location. */
ahd_clear_critical_section
(
ahd
);
ahd_clear_critical_section
(
ahd
);
#if AHD_TARGET_MODE
#if
def
AHD_TARGET_MODE
if
((
ahd
->
flags
&
AHD_TARGETROLE
)
!=
0
)
{
if
((
ahd
->
flags
&
AHD_TARGETROLE
)
!=
0
)
{
ahd_run_tqinfifo
(
ahd
,
/*paused*/
TRUE
);
ahd_run_tqinfifo
(
ahd
,
/*paused*/
TRUE
);
}
}
...
...
drivers/scsi/aic7xxx_old.c
View file @
8450b99a
...
@@ -4881,7 +4881,7 @@ aic7xxx_handle_seqint(struct aic7xxx_host *p, unsigned char intstat)
...
@@ -4881,7 +4881,7 @@ aic7xxx_handle_seqint(struct aic7xxx_host *p, unsigned char intstat)
}
}
break
;
break
;
#if AIC7XXX_NOT_YET
#if
def
AIC7XXX_NOT_YET
case
TRACEPOINT2
:
case
TRACEPOINT2
:
{
{
printk
(
INFO_LEAD
"Tracepoint #2 reached.
\n
"
,
p
->
host_no
,
printk
(
INFO_LEAD
"Tracepoint #2 reached.
\n
"
,
p
->
host_no
,
...
...
drivers/scsi/eata_pio.c
View file @
8450b99a
...
@@ -840,7 +840,7 @@ static void find_pio_EISA(struct get_conf *buf)
...
@@ -840,7 +840,7 @@ static void find_pio_EISA(struct get_conf *buf)
u32
base
;
u32
base
;
int
i
;
int
i
;
#if CHECKPAL
#if
def
CHECKPAL
u8
pal1
,
pal2
,
pal3
;
u8
pal1
,
pal2
,
pal3
;
#endif
#endif
...
@@ -848,7 +848,7 @@ static void find_pio_EISA(struct get_conf *buf)
...
@@ -848,7 +848,7 @@ static void find_pio_EISA(struct get_conf *buf)
if
(
EISAbases
[
i
])
{
/* Still a possibility ? */
if
(
EISAbases
[
i
])
{
/* Still a possibility ? */
base
=
0x1c88
+
(
i
*
0x1000
);
base
=
0x1c88
+
(
i
*
0x1000
);
#if CHECKPAL
#if
def
CHECKPAL
pal1
=
inb
((
u16
)
base
-
8
);
pal1
=
inb
((
u16
)
base
-
8
);
pal2
=
inb
((
u16
)
base
-
7
);
pal2
=
inb
((
u16
)
base
-
7
);
pal3
=
inb
((
u16
)
base
-
6
);
pal3
=
inb
((
u16
)
base
-
6
);
...
@@ -868,7 +868,7 @@ static void find_pio_EISA(struct get_conf *buf)
...
@@ -868,7 +868,7 @@ static void find_pio_EISA(struct get_conf *buf)
}
}
/* Nothing found here so we take it from the list */
/* Nothing found here so we take it from the list */
EISAbases
[
i
]
=
0
;
EISAbases
[
i
]
=
0
;
#if CHECKPAL
#if
def
CHECKPAL
}
}
#endif
#endif
}
}
...
@@ -929,7 +929,7 @@ static void find_pio_PCI(struct get_conf *buf)
...
@@ -929,7 +929,7 @@ static void find_pio_PCI(struct get_conf *buf)
EISAbases
[
x
]
=
0
;
EISAbases
[
x
]
=
0
;
}
}
}
}
#if CHECK_BLINK
#if
def
CHECK_BLINK
else
if
(
check_blink_state
(
base
))
{
else
if
(
check_blink_state
(
base
))
{
printk
(
"eata_pio: HBA is in BLINK state.
\n
"
"Consult your HBAs manual to correct this.
\n
"
);
printk
(
"eata_pio: HBA is in BLINK state.
\n
"
"Consult your HBAs manual to correct this.
\n
"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment