omnibus NON-include/ cleanup (less big)
Subsystems (11)
PATCH 1/1 omnibus NON-include/ cleanup (less big)
David Weinehall thought my previous posting was useful, so this is the other half. This is a followup to
http://marc.theaimsgroup.com/?l=linux-kernel&m=100587948705950&w=2
which patched up #defines under linux/include/.
Attached below is a patch to fix the rest of the headers not under linux/include/. It applies to linux-2.4.15-pre4.
Nathan Myers
ncm at cantrip dot org
---------------------
arch/alpha/math-emu/sfp-util.h +1 -1
@@ -30,6 +30,6 @@#define abort () goto bad_insn#ifndef __LITTLE_ENDIAN -#define __LITTLE_ENDIAN -1 +#define __LITTLE_ENDIAN (-1)#endif #define __BYTE_ORDER __LITTLE_ENDIAN
arch/arm/nwfpe/fpsr.h +1 -1
@@ -103,6 +103,6 @@#define MASK_ALU 0x9cfff2ff/* only ALU can write these bits */ #define MASK_RESET 0x00000d00/* bits set on reset, all others cleared */ #define MASK_WFC MASK_RESET -#define MASK_RFC ~MASK_RESET +#define MASK_RFC (~MASK_RESET)#endif
arch/cris/drivers/usb-host.h +1 -1
@@ -143,7 +143,7 @@#define RH_ACK 0x01 -#define RH_REQ_ERR -1 +#define RH_REQ_ERR (-1)#define RH_NACK 0x00/* Field definitions for */
drivers/acpi/include/acinterp.h +2 -2
@@ -27,12 +27,12 @@#define __ACINTERP_H__ -#define WALK_OPERANDS &(walk_state->operands [walk_state->num_operands -1]) +#define WALK_OPERANDS (walk_state->operands + walk_state->num_operands - 1)/* Interpreter constants */ -#define AML_END_OF_BLOCK -1 +#define AML_END_OF_BLOCK (-1)#define PUSH_PKG_LENGTH 1#define DO_NOT_PUSH_PKG_LENGTH 0
drivers/cdrom/aztcd.h +1 -1
@@ -25,7 +25,7 @@/* *** change this to set the I/O port address of your CD-ROM drive, set to '-1', if you want autoprobing */ -#define AZT_BASE_ADDR -1 +#define AZT_BASE_ADDR (-1)/* list of autoprobing addresses (not more than 15), last value must be 0x000 Note: Autoprobing is only enabled, if AZT_BASE_ADDR is set to '-1' ! */
drivers/char/rio/cmd.h +1 -1
@@ -48,7 +48,7 @@#define PRE_EMPTIVE_CMD 0x80 -#define INLINE_CMD ~PRE_EMPTIVE_CMD +#define INLINE_CMD (~PRE_EMPTIVE_CMD)#define CMD_IGNORE_PKT ( (ushort) 0)#define CMD_STATUS_REQ ( (ushort) 1)
drivers/char/rio/daemon.h +1 -1
@@ -329,6 +329,6 @@#define RIO_GET_SIVIEW ((('s')<<8) | 106)/* backwards compatible with SI */ -#define RIO_IOCTL_UNKNOWN -2 +#define RIO_IOCTL_UNKNOWN (-2)#endif
drivers/char/rio/rio.h +3 -3
@@ -101,9 +101,9 @@/* ** Flag values returned by functions */ -#define RIO_FAIL -1 +#define RIO_FAIL (-1)#define RIO_SUCCESS 0 -#define COPYFAIL -1/* copy[in|out] failed */ +#define COPYFAIL (-1)/* copy[in|out] failed */ /* ** SysPort value for something that hasn't any ports
@@ -275,7 +275,7 @@#define RIO_MIPS_R3230 31#define RIO_MIPS_R4030 32 -#define RIO_IO_UNKNOWN -2 +#define RIO_IO_UNKNOWN (-2)#undef MODERN#define ERROR (E ) do { u.u_error = E; return OPENFAIL } while ( 0 )
drivers/char/rocket_int.h +6 -6
@@ -78,18 +78,18 @@#define isMC 2/* Controller ID numbers */ -#define CTLID_NULL -1/* no controller exists */ +#define CTLID_NULL (-1)/* no controller exists */ #define CTLID_0001 0x0001/* controller release 1 */ /* AIOP ID numbers, identifies AIOP type implementing channel */ -#define AIOPID_NULL -1/* no AIOP or channel exists */ +#define AIOPID_NULL (-1)/* no AIOP or channel exists */ #define AIOPID_0001 0x0001/* AIOP release 1 */ -#define NULLDEV -1/* identifies non-existant device */ -#define NULLCTL -1/* identifies non-existant controller */ +#define NULLDEV (-1)/* identifies non-existant device */ +#define NULLCTL (-1)/* identifies non-existant controller */ #define NULLCTLPTR (CONTROLLER_T *)0/* identifies non-existant controller */ -#define NULLAIOP -1/* identifies non-existant AIOP */ -#define NULLCHAN -1/* identifies non-existant channel */ +#define NULLAIOP (-1)/* identifies non-existant AIOP */ +#define NULLCHAN (-1)/* identifies non-existant channel */ /************************************************************************ Global Register Offsets - Direct Access - Fixed values
drivers/char/ser_a2232.h +1 -1
@@ -175,7 +175,7 @@/* Standard speeds tables, -1 means unavailable, -2 means 0 baud: switch off line */ -#define A2232_BAUD_TABLE_NOAVAIL -1 +#define A2232_BAUD_TABLE_NOAVAIL (-1)#define A2232_BAUD_TABLE_NUM_RATES (18)static int a2232_baud_table[A2232_BAUD_TABLE_NUM_RATES *3 ] = {//Baud //Normal //Turbo
drivers/fc4/fcp_impl.h +2 -2
@@ -138,8 +138,8 @@#define FC_STATUS_ALLOC_FAIL 0x27#define FC_STATUS_BAD_SID 0x28#define FC_STATUS_NO_SEQ_INIT 0x29 -#define FC_STATUS_TIMED_OUT -1 -#define FC_STATUS_BAD_RSP -2 +#define FC_STATUS_TIMED_OUT (-1) +#define FC_STATUS_BAD_RSP (-2)void fcp_queue_empty (fc_channel *);int fcp_init (fc_channel *);
drivers/ieee1394/ieee1394.h +4 -4
@@ -39,10 +39,10 @@#define ACK_TYPE_ERROR 0xe/* Non-standard "ACK codes" for internal use */ -#define ACKX_NONE -1 -#define ACKX_SEND_ERROR -2 -#define ACKX_ABORTED -3 -#define ACKX_TIMEOUT -4 +#define ACKX_NONE (-1) +#define ACKX_SEND_ERROR (-2) +#define ACKX_ABORTED (-3) +#define ACKX_TIMEOUT (-4)#define SPEED_100 0x0
drivers/isdn/avmb1/capidrv.h +1 -1
@@ -110,7 +110,7 @@/* * per ncci state machine */ -#define ST_NCCI_PREVIOUS -1 +#define ST_NCCI_PREVIOUS (-1)#define ST_NCCI_NONE 0/* N-0 */ #define ST_NCCI_OUTGOING 1/* N-0.1 */ #define ST_NCCI_INCOMING 2/* N-1 */
drivers/isdn/hisax/l3dss1.h +3 -3
@@ -99,9 +99,9 @@#define IE_MANDATORY_1 0x0200#define ERR_IE_COMPREHENSION 1 -#define ERR_IE_UNRECOGNIZED -1 -#define ERR_IE_LENGTH -2 -#define ERR_IE_SEQUENCE -3 +#define ERR_IE_UNRECOGNIZED (-1) +#define ERR_IE_LENGTH (-2) +#define ERR_IE_SEQUENCE (-3)#else /* only l3dss1_process */
drivers/isdn/hisax/l3ni1.h +3 -3
@@ -111,9 +111,9 @@#define IE_MANDATORY_1 0x0200#define ERR_IE_COMPREHENSION 1 -#define ERR_IE_UNRECOGNIZED -1 -#define ERR_IE_LENGTH -2 -#define ERR_IE_SEQUENCE -3 +#define ERR_IE_UNRECOGNIZED (-1) +#define ERR_IE_LENGTH (-2) +#define ERR_IE_SEQUENCE (-3)#else /* only l3ni1_process */
drivers/net/aironet4500.h +1 -1
@@ -49,7 +49,7 @@#include <linux/spinlock.h> -#define AWC_ERROR -1 +#define AWC_ERROR (-1)#define AWC_SUCCESS 0struct awc_cis {
drivers/net/arlan.h +4 -4
@@ -54,8 +54,8 @@extern const char * arlan_version;extern int arlan_command (struct net_device * dev,int command); -#define SIDUNKNOWN -1 -#define radioNodeIdUNKNOWN -1 +#define SIDUNKNOWN (-1) +#define radioNodeIdUNKNOWN (-1)#define encryptionKeyUNKNOWN '\0';#define irqUNKNOWN 0#define memUNKNOWN 0
@@ -66,8 +66,8 @@#define spreadingCodeUNKNOWN 0#define channelNumberUNKNOWN 0#define channelSetUNKNOWN 0 -#define systemIdUNKNOWN -1 -#define registrationModeUNKNOWN -1 +#define systemIdUNKNOWN (-1) +#define registrationModeUNKNOWN (-1)#define siteNameUNKNOWN "LinuxSite"
drivers/net/de4x5.h +45 -45
110 lines not on this page · raw message
drivers/net/dgrs_bcomm.h +2 -2
@@ -129,7 +129,7 @@/* * bc_host values */ -#define BC_DIAGS -1 +#define BC_DIAGS (-1)#define BC_SASWITCH 0#define BC_SWITCH 1#define BC_MULTINIC 2
@@ -142,7 +142,7 @@/* * filter commands */ -#define BC_FILTER_ERR -1 +#define BC_FILTER_ERR (-1)#define BC_FILTER_OK 0#define BC_FILTER_SET 1#define BC_FILTER_CLR 2
drivers/net/gt96100eth.h +2 -2
@@ -48,8 +48,8 @@#define GT96100_ETHER0_IRQ 4#define GT96100_ETHER1_IRQ 4#else -#define GT96100_ETHER0_IRQ -1 -#define GT96100_ETHER1_IRQ -1 +#define GT96100_ETHER0_IRQ (-1) +#define GT96100_ETHER1_IRQ (-1)#endif #define GT96100ETH_READ (gp, offset) \
drivers/net/hamradio/soundmodem/sm_tbl_afsk1200.h +1 -1
@@ -63,7 +63,7 @@static const int afsk12_tx_hi_i[] = {127 ,16 ,-122 ,-48 ,109 ,77 ,-89 ,-100 }; -#define SUM_AFSK12_TX_HI_I -30 +#define SUM_AFSK12_TX_HI_I (-30)static const int afsk12_tx_hi_q[] = {0 ,125 ,32 ,-117 ,-63 ,100 ,89 ,-77
drivers/net/hamradio/soundmodem/sm_tbl_afsk2400_7.h +1 -1
@@ -58,7 +58,7 @@static const int afsk24_tx_lo_q[] = {0 ,11 ,35 ,43 ,0 ,-78 ,-125 ,-89 ,-1 ,62 ,61 ,25 ,0 ,-7 }; -#define SUM_AFSK24_TX_LO_Q -63 +#define SUM_AFSK24_TX_LO_Q (-63)static const int afsk24_tx_hi_i[] = {10 ,2 ,-34 ,-24 ,76 ,69 ,-86 ,-101 ,53 ,83 ,-14 ,-35 ,0 ,10
drivers/net/hamradio/soundmodem/sm_tbl_afsk2400_8.h +1 -1
@@ -58,7 +58,7 @@static const int afsk24_tx_lo_q[] = {0 ,12 ,35 ,34 ,-22 ,-100 ,-115 ,-40 ,55 ,87 ,48 ,2 ,-11 ,-10 }; -#define SUM_AFSK24_TX_LO_Q -25 +#define SUM_AFSK24_TX_LO_Q (-25)static const int afsk24_tx_hi_i[] = {10 ,0 ,-35 ,-2 ,89 ,6 ,-124 ,-10 ,111 ,9 ,-61 ,-4 ,16 ,1
drivers/net/hamradio/soundmodem/sm_tbl_afsk2666.h +6 -6
@@ -58,18 +58,18 @@ { {{ 1, 7, -18, -73, -100, -47, 47, 100, 73, 18, -7, -1 }, { 0, 17, 43, 30, -41, -115, -115, -41, 30, 43, 17, 0 }}, #define AFSK26_DEM_SUM_I_0_0 0 -#define AFSK26_DEM_SUM_Q_0_0 -132 +#define AFSK26_DEM_SUM_Q_0_0 (-132) {{ 1, -7, -46, -10, 100, 76, -75, -100, 10, 46, 7, -1 }, { 1, 17, -6, -79, -41, 99, 99, -41, -79, -6, 17, 1 }} #define AFSK26_DEM_SUM_I_0_1 1 -#define AFSK26_DEM_SUM_Q_0_1 -18 +#define AFSK26_DEM_SUM_Q_0_1 (-18) }, { {{ 8, 22, 0, -67, -118, -89, 0, 67, 63, 22, 0, 0 }, { 0, 22, 63, 67, 0, -89, -118, -67, 0, 22, 8, 0 }}, -#define AFSK26_DEM_SUM_I_1_0 -92 -#define AFSK26_DEM_SUM_Q_1_0 -92 +#define AFSK26_DEM_SUM_I_1_0 (-92) +#define AFSK26_DEM_SUM_Q_1_0 (-92) {{ 8, 8, -54, -67, 59, 122, 0, -91, -31, 22, 7, 0 }, { 0, 30, 31, -67, -102, 32, 118, 24, -54, -22, 4, 0 }} -#define AFSK26_DEM_SUM_I_1_1 -17 -#define AFSK26_DEM_SUM_Q_1_1 -6 +#define AFSK26_DEM_SUM_I_1_1 (-17) +#define AFSK26_DEM_SUM_Q_1_1 (-6) } };
drivers/net/sk98lin/h/skgepnm2.h +1 -1
@@ -145,7 +145,7 @@#endif #ifndef TRUE -#define TRUE !(FALSE) +#define TRUE 1/* this is a stupid macro */ #endif /*
drivers/net/wan/lmc/lmc_ioctl.h +13 -13
@@ -16,20 +16,20 @@* of the GNU General Public License version 2, incorporated herein by reference. */ -#define LMCIOCGINFO SIOCDEVPRIVATE+3/* get current state */ -#define LMCIOCSINFO SIOCDEVPRIVATE+4/* set state to user values */ -#define LMCIOCGETLMCSTATS SIOCDEVPRIVATE+5 -#define LMCIOCCLEARLMCSTATS SIOCDEVPRIVATE+6 -#define LMCIOCDUMPEVENTLOG SIOCDEVPRIVATE+7 -#define LMCIOCGETXINFO SIOCDEVPRIVATE+8 -#define LMCIOCSETCIRCUIT SIOCDEVPRIVATE+9 -#define LMCIOCUNUSEDATM SIOCDEVPRIVATE+10 -#define LMCIOCRESET SIOCDEVPRIVATE+11 -#define LMCIOCT1CONTROL SIOCDEVPRIVATE+12 -#define LMCIOCIFTYPE SIOCDEVPRIVATE+13 -#define LMCIOCXILINX SIOCDEVPRIVATE+14 +#define LMCIOCGINFO (SIOCDEVPRIVATE+3)/* get current state */ +#define LMCIOCSINFO (SIOCDEVPRIVATE+4)/* set state to user values */ +#define LMCIOCGETLMCSTATS (SIOCDEVPRIVATE+5) +#define LMCIOCCLEARLMCSTATS (SIOCDEVPRIVATE+6) +#define LMCIOCDUMPEVENTLOG (SIOCDEVPRIVATE+7) +#define LMCIOCGETXINFO (SIOCDEVPRIVATE+8) +#define LMCIOCSETCIRCUIT (SIOCDEVPRIVATE+9) +#define LMCIOCUNUSEDATM (SIOCDEVPRIVATE+10) +#define LMCIOCRESET (SIOCDEVPRIVATE+11) +#define LMCIOCT1CONTROL (SIOCDEVPRIVATE+12) +#define LMCIOCIFTYPE (SIOCDEVPRIVATE+13) +#define LMCIOCXILINX (SIOCDEVPRIVATE+14) -#define LMC_CARDTYPE_UNKNOWN -1 +#define LMC_CARDTYPE_UNKNOWN (-1)#define LMC_CARDTYPE_HSSI 1/* probed card is a HSSI card */ #define LMC_CARDTYPE_DS3 2/* probed card is a DS3 card */ #define LMC_CARDTYPE_SSI 3/* probed card is a SSI card */
drivers/net/wan/sbni.h +1 -1
@@ -80,7 +80,7 @@ DEFAULT_FRAME_LEN = 1012 }; -#define DEF_RXL_DELTA -1 +#define DEF_RXL_DELTA (-1)#define DEF_RXL 0xf#define SBNI_SIG 0x5a
drivers/s390/block/dasd_int.h +1 -1
@@ -28,7 +28,7 @@#define DASD_FORMAT_INTENS_WRITE_RECZERO 0x01#define DASD_FORMAT_INTENS_WRITE_HOMEADR 0x02 -#define DASD_STATE_DEL -1 +#define DASD_STATE_DEL (-1)#define DASD_STATE_NEW 0#define DASD_STATE_KNOWN 1#define DASD_STATE_ACCEPT 2
drivers/sbus/audio/cs4231.h +2 -2
@@ -105,7 +105,7 @@#define IAR_AUTOCAL_BEGIN 0x40/* MCE */ #define IAR_NOT_READY 0x80/* INIT */ -#define IAR_AUTOCAL_END ~(IAR_AUTOCAL_BEGIN)/* MCD */ +#define IAR_AUTOCAL_END (~(IAR_AUTOCAL_BEGIN))/* MCD */ /* Registers 1-15 modes 1 and 2. Registers 16-31 mode 2 only */ /* Registers assumed to be same in both modes unless noted */
@@ -126,7 +126,7 @@/* 6 - Left Output Control */ /* 7 - Right Output Control */ #define OUTCR_MUTE 0x80 -#define OUTCR_UNMUTE ~0x80 +#define OUTCR_UNMUTE (~0x80)/* 8 - Playback Data Format (Mode 2) */ #define CHANGE_DFR (var, val) ((var & ~(0xF)) | val)
drivers/scsi/NCR5380.h +2 -2
@@ -220,8 +220,8 @@* These are "special" values for the tag parameter passed to NCR5380_select. */ -#define TAG_NEXT -1/* Use next free tag */ -#define TAG_NONE -2/* +#define TAG_NEXT (-1)/* Use next free tag */ +#define TAG_NONE (-2)/* * Establish I_T_L nexus instead of I_T_L_Q * even on SCSI-II devices. */
drivers/scsi/dpt/dpti_i2o.h +1 -1
@@ -456,7 +456,7 @@#define MSG_POOL_SIZE 16384#define I2O_POST_WAIT_OK 0 -#define I2O_POST_WAIT_TIMEOUT -ETIMEDOUT +#define I2O_POST_WAIT_TIMEOUT (-ETIMEDOUT)#endif /* __KERNEL__ */
drivers/scsi/gdth.h +1 -1
@@ -178,7 +178,7 @@#define SCREENSERVICE 11/* screenservice defines */ -#define MSG_INV_HANDLE -1/* special message handle */ +#define MSG_INV_HANDLE (-1)/* special message handle */ #define MSGLEN 16/* size of message text */ #define MSG_SIZE 34/* size of message structure */ #define MSG_REQUEST 0/* async. event: message */
drivers/scsi/sym53c8xx_comm.h +4 -4
@@ -2015,10 +2015,10 @@**=================================================================== */ #define DEF_DEPTH (driver_setup.default_tags) -#define ALL_TARGETS -2 -#define NO_TARGET -1 -#define ALL_LUNS -2 -#define NO_LUN -1 +#define ALL_TARGETS (-2) +#define NO_TARGET (-1) +#define ALL_LUNS (-2) +#define NO_LUN (-1)static int device_queue_depth (int unit,int target,int lun) {
drivers/sound/ac97.h +2 -2
@@ -160,8 +160,8 @@ };/* Values stored in the register cache. */ -#define AC97_REGVAL_UNKNOWN -1 -#define AC97_REG_UNSUPPORTED -2 +#define AC97_REGVAL_UNKNOWN (-1) +#define AC97_REG_UNSUPPORTED (-2)struct ac97_mixer_value_list {
drivers/usb/hpusbscsi.h +1 -1
@@ -36,7 +36,7 @@u8 scsi_state_byte; }; -#define SCSI_ERR_MASK ~0x3fu +#define SCSI_ERR_MASK (~0x3fu)static const unsigned char scsi_command_direction[256 /8 ] = {0x28 ,0x81 ,0x14 ,0x14 ,0x20 ,0x01 ,0x90 ,0x77 ,
drivers/usb/microtek.h +1 -1
@@ -56,5 +56,5 @@#define MTS_EP_IMAGE 0x3#define MTS_EP_TOTAL 0x3 -#define MTS_SCSI_ERR_MASK ~0x3fu +#define MTS_SCSI_ERR_MASK (~0x3fu)
drivers/usb/uhci.h +1 -1
@@ -403,7 +403,7 @@#define RH_REMOVE_EP 0x00#define RH_ACK 0x01 -#define RH_REQ_ERR -1 +#define RH_REQ_ERR (-1)#define RH_NACK 0x00#endif
drivers/usb/usb-ohci.h +1 -1
@@ -288,7 +288,7 @@#define RH_ENDPOINT_STALL 0x01#define RH_ACK 0x01 -#define RH_REQ_ERR -1 +#define RH_REQ_ERR (-1)#define RH_NACK 0x00
drivers/usb/usb-uhci.h +1 -1
@@ -302,7 +302,7 @@#define RH_ACK 0x01 -#define RH_REQ_ERR -1 +#define RH_REQ_ERR (-1)#define RH_NACK 0x00#endif