drivers/scsi/aic7xxx: Convert to generic boolean-values
Subsystems (2)
PATCH 1/1 drivers/scsi/aic7xxx: Convert to generic boolean-values
Convert:
FALSE -> false
TRUE -> true
var == FALSE -> !var
var != FALSE -> var
var == TRUE -> var
Signed-off-by Richard Knutsson <[email protected]>
---
Compile-tested with "allyes", "allmod" & "allno" on i386 Whitespace cleaning on affected lines
drivers/scsi/aic7xxx/aic7770.c | 4 drivers/scsi/aic7xxx/aic7770_osm.c | 2 drivers/scsi/aic7xxx/aic79xx.h | 7 drivers/scsi/aic7xxx/aic79xx_core.c | 218 +++++++++++++--------------- drivers/scsi/aic7xxx/aic79xx_inline.h | 2 drivers/scsi/aic7xxx/aic79xx_osm.c | 60 +++---- drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 2 drivers/scsi/aic7xxx/aic79xx_pci.c | 6 drivers/scsi/aic7xxx/aic79xx_proc.c | 4 drivers/scsi/aic7xxx/aic7xxx.h | 7 drivers/scsi/aic7xxx/aic7xxx_core.c | 179 +++++++++++----------- drivers/scsi/aic7xxx/aic7xxx_inline.h | 2 drivers/scsi/aic7xxx/aic7xxx_osm.c | 56 +++---- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 2 drivers/scsi/aic7xxx/aic7xxx_pci.c | 30 +-- drivers/scsi/aic7xxx/aic7xxx_proc.c | 4 drivers/scsi/aic7xxx/aicasm/aicasm.c | 2 drivers/scsi/aic7xxx/aicasm/aicasm.h | 8 - drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | 24 +-- drivers/scsi/aic7xxx/aicasm/aicasm_scan.l | 4 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c | 4 21 files changed, 301 insertions(+), 326 deletions(-)
drivers/scsi/aic7xxx/aic7770.c +2 -2
@@ -147,7 +147,7 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)* a misstep to hang the machine in an interrupt * storm. */ -ahc_intr_enable (ahc, FALSE); +ahc_intr_enable (ahc, false); ahc->description = entry->name; error =ahc_softc_init (ahc);
@@ -158,7 +158,7 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io) ahc->bus_suspend = aic7770_suspend; ahc->bus_resume = aic7770_resume; - error =ahc_reset (ahc,/*reinit*/ FALSE); + error =ahc_reset (ahc,/*reinit*/ false);if (error !=0 )return (error);
drivers/scsi/aic7xxx/aic7770_osm.c +1 -1
@@ -116,7 +116,7 @@ aic7770_remove(struct device *dev)scsi_remove_host (ahc->platform_data->host);ahc_lock (ahc, &s); -ahc_intr_enable (ahc, FALSE); +ahc_intr_enable (ahc, false);ahc_unlock (ahc, &s);ahc_free (ahc);
drivers/scsi/aic7xxx/aic79xx.h +0 -7
@@ -53,13 +53,6 @@ struct ahd_platform_data;struct scb_platform_data ;/****************************** Useful Macros *********************************/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -#define ALL_CHANNELS '\0'#define ALL_TARGETS_MASK 0xFFFF#define INITIATOR_WILDCARD (~0)
drivers/scsi/aic7xxx/aic79xx_core.c +108 -110
754 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_inline.h +1 -1
@@ -923,7 +923,7 @@ ahd_intr(struct ahd_softc *ahd) ahd->cmdcmplt_total++;#ifdef AHD_TARGET_MODE if ((ahd->flags &AHD_TARGETROLE ) !=0 ) -ahd_run_tqinfifo (ahd,/*paused*/ FALSE); +ahd_run_tqinfifo (ahd,/*paused*/ false);#endif }
drivers/scsi/aic7xxx/aic79xx_osm.c +30 -30
223 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_osm_pci.c +1 -1
@@ -100,7 +100,7 @@ ahd_linux_pci_dev_remove(struct pci_dev *pdev)scsi_remove_host (ahd->platform_data->host);ahd_lock (ahd, &s); -ahd_intr_enable (ahd, FALSE); +ahd_intr_enable (ahd, false);ahd_unlock (ahd, &s);ahd_free (ahd); }
drivers/scsi/aic7xxx/aic79xx_pci.c +3 -3
@@ -360,7 +360,7 @@ ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry) ahd->bus_intr = ahd_pci_intr; - error =ahd_reset (ahd,/*reinit*/ FALSE); + error =ahd_reset (ahd,/*reinit*/ false);if (error !=0 )return (ENXIO );
@@ -514,7 +514,7 @@ ahd_check_extport(struct ahd_softc *ahd) error =ahd_read_seeprom (ahd, (uint16_t *)&vpd, start_addr,sizeof (vpd)/2 , -/*bytestream*/ TRUE); +/*bytestream*/ true);if (error ==0 ) error =ahd_parse_vpddata (ahd, &vpd);if (bootverbose)
@@ -530,7 +530,7 @@ ahd_check_extport(struct ahd_softc *ahd) error =ahd_read_seeprom (ahd, (uint16_t *)sc, start_addr,sizeof (*sc)/2 , -/*bytestream*/ FALSE); +/*bytestream*/ false);if (error !=0 ) {printf ("Unable to read SEEPROM\n" );
drivers/scsi/aic7xxx/aic79xx_proc.c +2 -2
@@ -304,7 +304,7 @@ ahd_proc_write_seeprom(struct ahd_softc *ahd, char *buffer, int length) sizeof(struct seeprom_config)/2);ahd_read_seeprom (ahd, (uint16_t *)ahd->seep_config, start_addr,sizeof (struct seeprom_config )/2 , -/*ByteStream*/ FALSE); +/*ByteStream*/ false);ahd_release_seeprom (ahd); written = length; }
@@ -331,7 +331,7 @@ ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,int retval;/* Has data been written to the file? */ -if (inout == TRUE) { +if (inout) { retval =ahd_proc_write_seeprom (ahd, buffer, length); goto done; }
drivers/scsi/aic7xxx/aic7xxx.h +0 -7
@@ -54,13 +54,6 @@ struct scb_platform_data;struct seeprom_descriptor ;/****************************** Useful Macros *********************************/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -#define ALL_CHANNELS '\0'#define ALL_TARGETS_MASK 0xFFFF#define INITIATOR_WILDCARD (~0)
drivers/scsi/aic7xxx/aic7xxx_core.c +89 -90
626 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_inline.h +1 -1
@@ -622,7 +622,7 @@ ahc_intr(struct ahc_softc *ahc)ahc_run_qoutfifo (ahc);#ifdef AHC_TARGET_MODE if ((ahc->flags &AHC_TARGETROLE ) !=0 ) -ahc_run_tqinfifo (ahc,/*paused*/ FALSE); +ahc_run_tqinfifo (ahc,/*paused*/ false);#endif }
drivers/scsi/aic7xxx/aic7xxx_osm.c +28 -28
198 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +1 -1
@@ -147,7 +147,7 @@ ahc_linux_pci_dev_remove(struct pci_dev *pdev)scsi_remove_host (ahc->platform_data->host);ahc_lock (ahc, &s); -ahc_intr_enable (ahc, FALSE); +ahc_intr_enable (ahc, false);ahc_unlock (ahc, &s);ahc_free (ahc); }
drivers/scsi/aic7xxx/aic7xxx_pci.c +15 -15
@@ -742,7 +742,7 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry)* a misstep to hang the machine in an interrupt * storm. */ -ahc_intr_enable (ahc, FALSE); +ahc_intr_enable (ahc, false); devconfig =ahc_pci_read_config (ahc->dev_softc,DEVCONFIG ,/*bytes*/ 4 );
@@ -809,7 +809,7 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry) scsiseq =0 ; } - error =ahc_reset (ahc,/*reinit*/ FALSE); + error =ahc_reset (ahc,/*reinit*/ false);if (error !=0 )return (ENXIO );
@@ -1085,10 +1085,10 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc)int fast;int large; - enable = FALSE; - pcheck = FALSE; - fast = FALSE; - large = FALSE; + enable = false; + pcheck = false; + fast = false; + large = false; num_scbs =0 ;if (ahc_ext_scbram_present (ahc) ==0 )
@@ -1097,13 +1097,13 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc)/* * Probe for the best parameters to use. */ -ahc_scbram_config (ahc,/*enable*/ TRUE, pcheck, fast, large); +ahc_scbram_config (ahc,/*enable*/ true, pcheck, fast, large); num_scbs =ahc_probe_scbs (ahc);if (num_scbs ==0 ) {/* The SRAM wasn't really present. */ goto done; } - enable = TRUE; + enable = true;/* * Clear any outstanding parity error
@@ -1115,33 +1115,33 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc)ahc_outb (ahc,CLRINT ,CLRBRKADRINT );/* Now see if we can do parity */ -ahc_scbram_config (ahc, enable,/*pcheck*/ TRUE, fast, large); +ahc_scbram_config (ahc, enable,/*pcheck*/ true, fast, large); num_scbs =ahc_probe_scbs (ahc);if ((ahc_inb (ahc,INTSTAT ) &BRKADRINT ) ==0 || (ahc_inb (ahc,ERROR ) &MPARERR ) ==0 ) - pcheck = TRUE; + pcheck = true;/* Clear any resulting parity error */ ahc_outb (ahc,CLRINT ,CLRPARERR );ahc_outb (ahc,CLRINT ,CLRBRKADRINT );/* Now see if we can do fast timing */ -ahc_scbram_config (ahc, enable, pcheck,/*fast*/ TRUE, large); +ahc_scbram_config (ahc, enable, pcheck,/*fast*/ true, large); test_num_scbs =ahc_probe_scbs (ahc);if (test_num_scbs == num_scbs && ((ahc_inb (ahc,INTSTAT ) &BRKADRINT ) ==0 || (ahc_inb (ahc,ERROR ) &MPARERR ) ==0 )) - fast = TRUE; + fast = true;/* * See if we can use large SCBs and still maintain * the same overall count of SCBs. */ if ((ahc->features &AHC_LARGE_SCBS ) !=0 ) { -ahc_scbram_config (ahc, enable, pcheck, fast,/*large*/ TRUE); +ahc_scbram_config (ahc, enable, pcheck, fast,/*large*/ true); test_num_scbs =ahc_probe_scbs (ahc);if (test_num_scbs >= num_scbs) { - large = TRUE; + large = true; num_scbs = test_num_scbs;if (num_scbs >=64 ) {/*
@@ -1395,7 +1395,7 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)*/ if ((ahc->features &AHC_SPIOCAP ) !=0 ) {if ((ahc_inb (ahc,SPIOCAP ) &SSPIOCPS ) ==0 ) - have_autoterm = FALSE; + have_autoterm = false; }if (have_autoterm) {
drivers/scsi/aic7xxx/aic7xxx_proc.c +2 -2
@@ -288,7 +288,7 @@ ahc_proc_write_seeprom(struct ahc_softc *ahc, char *buffer, int length) sd.sd_CK =CK_2840 ; sd.sd_DO =DO_2840 ; sd.sd_DI =DI_2840 ; - have_seeprom = TRUE; + have_seeprom = true; }else {printf ("ahc_proc_write_seeprom: unsupported adapter type\n" ); goto done;
@@ -344,7 +344,7 @@ ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,int retval;/* Has data been written to the file? */ -if (inout == TRUE) { +if (inout) { retval =ahc_proc_write_seeprom (ahc, buffer, length); goto done; }
drivers/scsi/aic7xxx/aicasm/aicasm.c +1 -1
@@ -555,7 +555,7 @@ output_listing(char *ifilename)if (func_values ==NULL )stop ("Could not malloc" ,EX_OSERR ); - func_values[0 ] =0 ;/* FALSE func */ + func_values[0 ] =0 ;/* false func */ func_count--;/*
drivers/scsi/aic7xxx/aicasm/aicasm.h +0 -8
@@ -48,14 +48,6 @@#include <sys/queue.h> #endif -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - typedef struct path_entry { char *directory; int quoted_includes_only;
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +12 -12
@@ -980,14 +980,14 @@ critical_section_start: { critical_section_t *cs; - if (in_critical_section != FALSE) { + if (in_critical_section) { stop("Critical Section within Critical Section", EX_DATAERR); /* NOTREACHED */ } cs = cs_alloc(); cs->begin_addr = instruction_ptr; - in_critical_section = TRUE; + in_critical_section = true; } ;
@@ -996,13 +996,13 @@ critical_section_end: { critical_section_t *cs; - if (in_critical_section == FALSE) { + if (!in_critical_section) { stop("Unballanced 'end_cs'", EX_DATAERR); /* NOTREACHED */ } cs = TAILQ_LAST(&cs_tailq, cs_tailq); cs->end_addr = instruction_ptr; - in_critical_section = FALSE; + in_critical_section = false; } ;
@@ -1290,7 +1290,7 @@ code: expression_t immed; make_expression(&immed, 0xff); - format_1_instr(AIC_OP_AND, &none, &immed, &allzeros, TRUE); + format_1_instr(AIC_OP_AND, &none, &immed, &allzeros, true); } ;
@@ -1436,7 +1436,7 @@ process_field(int field_type, symbol_t *sym, int value) symlist_add(&(sym->info.finfo->symrefs), cur_symbol, SYMLIST_INSERT_HEAD); cur_symbol->info.rinfo->valid_bitmask |= sym->info.finfo->mask; - cur_symbol->info.rinfo->typecheck_masks = TRUE; + cur_symbol->info.rinfo->typecheck_masks = true; symlist_add(&(cur_symbol->info.rinfo->fields), sym, SYMLIST_SORT); }
@@ -1835,16 +1835,16 @@ type_check(symbol_t *symbol, expression_t *expression, int opcode) symbol_node_t *node; int and_op; - and_op = FALSE; + and_op = false; if (opcode == AIC_OP_AND || opcode == AIC_OP_JNZ || AIC_OP_JZ) - and_op = TRUE; + and_op = true; /* * Make sure that we aren't attempting to write something * that hasn't been defined. If this is an and operation, * this is a mask, so "undefined" bits are okay. */ - if (and_op == FALSE + if (!and_op && (expression->value & ~symbol->info.rinfo->valid_bitmask) != 0) { snprintf(errbuf, sizeof(errbuf), "Invalid bit(s) 0x%x in immediate written to %s",
@@ -1858,7 +1858,7 @@ type_check(symbol_t *symbol, expression_t *expression, int opcode) * Now make sure that all of the symbols referenced by the * expression are defined for this register. */ - if (symbol->info.rinfo->typecheck_masks != FALSE) { + if (symbol->info.rinfo->typecheck_masks) { for(node = expression->referenced_syms.slh_first; node != NULL; node = node->links.sle_next) {
@@ -1954,7 +1954,7 @@ is_download_const(expression_t *immed) { if ((immed->referenced_syms.slh_first != NULL) && (immed->referenced_syms.slh_first->symbol->type == DOWNLOAD_CONST)) - return (TRUE); + return (true); - return (FALSE); + return (false); }
drivers/scsi/aic7xxx/aicasm/aicasm_scan.l +2 -2
@@ -159,7 +159,7 @@ PATCH_ARG_LIST { return T_PATCH_ARG_LIST; } /* Register/SCB/SRAM definition keywords */ export { return T_EXPORT; } register { return T_REGISTER; } -const { yylval.value = FALSE; return T_CONST; } +const { yylval.value = false; return T_CONST; } download { return T_DOWNLOAD; } address { return T_ADDRESS; } access_mode { return T_ACCESS_MODE; }
@@ -476,7 +476,7 @@ include_file(char *file_name, include_type type) include_dir = include_dir->links.sle_next) { char fullname[PATH_MAX]; - if ((include_dir->quoted_includes_only == TRUE) + if (include_dir->quoted_includes_only && (type != QUOTED_INCLUDE)) continue;
drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c +2 -2
@@ -230,7 +230,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how)symbol_node_t *curnode;int field; - field = FALSE; + field = false;switch (symbol->type) {case REGISTER :case SCBLOC :
@@ -240,7 +240,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how)case MASK :case ENUM :case ENUM_ENTRY : - field = TRUE; + field = true;break ;default : stop("symlist_add: Invalid symbol type for sorting",