diff options
Diffstat (limited to 'usr/src/cmd/picl/plugins/sun4u/taco')
5 files changed, 47 insertions, 72 deletions
diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile index 1918094ff2..ce349939a9 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile @@ -29,7 +29,7 @@ include $(SRC)/Makefile.psm LIBRARY= libpiclenvd.a VERS= .1 -OBJECTS= piclenvd.o piclenvsetup.o +OBJECTS= piclenvd.o piclenvsetup.o # include library definitions include $(SRC)/lib/Makefile.lib @@ -54,11 +54,7 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= envmodel.info -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES= $(LINTOUT) $(LINTLIB) +CLEANFILES= $(LINTOUT) CFLAGS += $(CCVERBOSE) DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins @@ -80,7 +76,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) $(CONF) @@ -110,11 +105,7 @@ $(LIBLINKS): FRC include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c index 538e156510..8ca5de7a7e 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c +++ b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains the environmental PICL plug-in module. */ @@ -233,15 +231,15 @@ static int get_tach(ptree_rarg_t *parg, void *buf); static int set_tach(ptree_warg_t *parg, const void *buf); static int shutdown_override = 0; -static int sensor_poll_interval = SENSORPOLL_INTERVAL; +static int sensor_poll_interval = SENSORPOLL_INTERVAL; static int warning_interval = WARNING_INTERVAL; -static int shutdown_interval = SHUTDOWN_INTERVAL; +static int shutdown_interval = SHUTDOWN_INTERVAL; static int ovtemp_monitor = 1; /* enabled */ static int pm_monitor = 1; /* enabled */ static int mon_fanstat = 1; /* enabled */ -static int hwm_mode; -static int hwm_tach_enable; +static int hwm_mode; +static int hwm_tach_enable; static char shutdown_cmd[] = SHUTDOWN_CMD; env_tuneable_t tuneables[] = { @@ -901,7 +899,7 @@ envd_setup_sensors(void) */ if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tmin) != -1) { + &tmin) != -1) { sensorp->tmin = TMIN(tmin); } else { sensorp->tmin = -1; @@ -1006,13 +1004,13 @@ updateadm_ranges(char *name, uchar_t cur_lpstate) if (sysfd == -1) { if (env_debug) envd_log(LOG_ERR, ENV_ADM_OPEN_FAIL, hwm_devs[sys_id], - errno, strerror(errno)); + errno, strerror(errno)); return; } /* Read ADM default value only for the first time */ if (tsave == 0) { if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tsave) == -1) { + &tsave) == -1) { if (env_debug) envd_log(LOG_ERR, "read tminrange ioctl failed"); @@ -1038,7 +1036,7 @@ updateadm_ranges(char *name, uchar_t cur_lpstate) * ADM 1031 Tmin/Trange register need to be reprogrammed. */ tdata = ((fanctl->fan_ctl_pairs[cur_lpstate].tMin / TMIN_UNITS) - << TMIN_SHIFT); + << TMIN_SHIFT); /* Need to pack tRange in ADM bits 2:0 */ switch (fanctl->fan_ctl_pairs[cur_lpstate].tRange) { case 5: @@ -1112,13 +1110,13 @@ pmthr(void *args) do { if (env_debug) { envd_log(LOG_INFO, - "pmstate event:0x%x flags:%x comp:%d " - "oldval:%d newval:%d path:%s\n", - pmstate.event, pmstate.flags, - pmstate.component, - pmstate.old_level, - pmstate.new_level, - pmstate.physpath); + "pmstate event:0x%x flags:%x comp:%d " + "oldval:%d newval:%d path:%s\n", + pmstate.event, pmstate.flags, + pmstate.component, + pmstate.old_level, + pmstate.new_level, + pmstate.physpath); } cur_lpstate = (pmstate.flags & PSC_ALL_LOWEST) ? 1 : 0; @@ -1149,11 +1147,11 @@ pmthr(void *args) * * FAN ON * Tmin - * ------------------------------------------- + * ------------------------------------------- * - * FAN ON/OFF + * FAN ON/OFF * - * -------------------------------------------- + * -------------------------------------------- * Tmin - Hysterisis * FAN OFF * @@ -1303,13 +1301,13 @@ handle_overtemp_interrupt(int hwm_id) if (env_debug) envd_log(LOG_ERR, - "sensor name %s, cur temp %d, " - "HW %d LW %d SD %d LS %d\n", - sensorp->name, temp, - sensorp->es_ptr->high_warning, - (int)sensorp->es_ptr->low_warning, - sensorp->es_ptr->high_shutdown, - (int)sensorp->es_ptr->low_shutdown); + "sensor name %s, cur temp %d, " + "HW %d LW %d SD %d LS %d\n", + sensorp->name, temp, + sensorp->es_ptr->high_warning, + (int)sensorp->es_ptr->low_warning, + sensorp->es_ptr->high_shutdown, + (int)sensorp->es_ptr->low_shutdown); if (TEMP_IN_WARNING_RANGE(sensorp->cur_temp, sensorp)) { /* @@ -1484,7 +1482,7 @@ envd_setup(void) * at least one sensor. */ if (envd_setup_sensors() <= 0) { - return (NULL); + return (0); } /* diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c index 5310b2440b..df9bf69684 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c +++ b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains code for setting up environmental related nodes * and properties in the PICL tree. @@ -87,15 +85,15 @@ typedef struct { static sensor_node_t sensor_nodes[] = { {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", SENSOR_CPU_DIE, NULL, - NULL, NULL, NULL}, + 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", SENSOR_INT_AMB, NULL, - NULL, NULL, NULL}, + 0, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", SENSOR_SYS_IN, NULL, - NULL, NULL, NULL} + 0, 0, 0} }; #define NSENSORS (sizeof (sensor_nodes)/sizeof (sensor_nodes[0])) @@ -106,7 +104,7 @@ static sensor_node_t sensor_nodes[] = { typedef struct { char *parent_path; /* parent node path */ char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ + env_fan_t *fanp; /* fan information */ char *speed_unit; /* speed unit string */ picl_nodehdl_t nodeh; /* "fan" node handle */ picl_prophdl_t proph; /* "Speed" property handle */ @@ -118,13 +116,13 @@ typedef struct { */ static fan_node_t fan_nodes[] = { {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_CPU_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_CPU_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_INTAKE_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, + ENV_SYSTEM_INTAKE_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0}, {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_OUT_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL} + ENV_SYSTEM_OUT_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, 0, 0} }; #define NFANS (sizeof (fan_nodes)/sizeof (fan_nodes[0])) @@ -141,7 +139,7 @@ static void delete_fan_nodes_and_props(void); static int get_current_temp(ptree_rarg_t *parg, void *buf) { - tempr_t temp; + tempr_t temp; picl_prophdl_t proph; sensor_node_t *snodep; int i; @@ -427,12 +425,12 @@ delete_sensor_nodes_and_props(void) for (i = 0; i < NSENSORS; ++i) { snodep = &sensor_nodes[i]; - if (snodep->nodeh != NULL) { + if (snodep->nodeh != 0) { /* delete node and all properties under it */ (void) ptree_delete_node(snodep->nodeh); (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; } } } @@ -553,10 +551,10 @@ delete_fan_nodes_and_props(void) for (i = 0; i < NFANS; ++i) { fnodep = &fan_nodes[i]; - if (fnodep->nodeh != NULL) { + if (fnodep->nodeh != 0) { (void) ptree_delete_node(fnodep->nodeh); (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; + fnodep->nodeh = 0; } } } @@ -723,9 +721,9 @@ env_picl_setup(void) for (i = 0; i < NSENSORS; ++i) { snodep = &sensor_nodes[i]; snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; + snodep->nodeh = 0; + snodep->proph = 0; + snodep->target_proph = 0; } /* @@ -734,8 +732,8 @@ env_picl_setup(void) for (i = 0; i < NFANS; ++i) { fnodep = &fan_nodes[i]; fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; + fnodep->nodeh = 0; + fnodep->proph = 0; } /* diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile index f4c3b3b419..ffa5de9635 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile @@ -38,8 +38,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,7 +46,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -58,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile index e011f2af22..ddb83336e2 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile @@ -39,8 +39,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 INFOS= piclfrutree.info system-board.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,9 +47,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONF) +all: $(CONF) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -63,9 +60,6 @@ $(CONF): $(INFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC |