summaryrefslogtreecommitdiff
path: root/usr/src/cmd/picl/plugins/sun4u/grover
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-05-26 13:57:13 +0000
committerJohn Levon <john.levon@joyent.com>2020-05-26 13:57:13 +0000
commit5b2acc0949194447bba6e45a0fa44d0b5f42f208 (patch)
tree7ea9eb87bc68fee386dd39035ce715e87a0e673c /usr/src/cmd/picl/plugins/sun4u/grover
parent8ca018083101bf1cb175869679bc123187fb1bab (diff)
parent2a1277d3064386cd5c4e372301007aa330bf1d5e (diff)
downloadillumos-joyent-gcc9.tar.gz
mergegcc9
Diffstat (limited to 'usr/src/cmd/picl/plugins/sun4u/grover')
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile13
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c40
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile6
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile11
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c10
5 files changed, 24 insertions, 56 deletions
diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile
index 6002d0c4d9..481f1d6d48 100644
--- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile
@@ -28,7 +28,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
@@ -51,12 +51,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%)
$(ROOTCONF) := FILEMODE = 0644
INFOS= envmodel.info
-LINTSRC = $(LINTLIB:%.ln=%)
-ROOTLINTDIR = $(ROOTLIBDIR)
-ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%)
-
-CLEANFILES= $(LINTOUT) $(LINTLIB)
-
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
@@ -77,7 +71,6 @@ all := TARGET= all
install := TARGET= install
clean := TARGET= clean
clobber := TARGET= clobber
-lint := TARGET= lint
_msg := TARGET= _msg
all: $(LIBS) $(LIBLINKS)
@@ -105,11 +98,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/grover/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c
index 6431df8bde..f456eb0fb2 100644
--- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c
+++ b/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This file contains code for setting up environmental related nodes
* and properties in the PICL tree.
@@ -154,7 +152,7 @@ static sensor_node_t sensor_nodes[] = {
*/
typedef struct {
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 */
@@ -188,7 +186,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;
@@ -275,7 +273,7 @@ add_node_to_list(picl_nodehdl_t nodeh, node_list_t *listp)
*/
static node_list_t *
get_node_list_by_class(picl_nodehdl_t nodeh, const char *classname,
- node_list_t *listp)
+ node_list_t *listp)
{
int err;
char clname[PICL_CLASSNAMELEN_MAX+1];
@@ -484,7 +482,7 @@ add_sensor_nodes_and_props(picl_nodehdl_t plath)
* Skip if already initialized or no sensor info
*/
sensorp = snodep->sensorp;
- if (snodep->nodeh != NULL || sensorp == NULL)
+ if (snodep->nodeh != 0 || sensorp == NULL)
continue;
/*
@@ -590,18 +588,18 @@ delete_sensor_nodes_and_props(void)
*/
for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) {
- if (snodep->sdev_proph != NULL) {
+ if (snodep->sdev_proph != 0) {
(void) ptree_delete_prop(snodep->sdev_proph);
(void) ptree_destroy_prop(snodep->sdev_proph);
- snodep->sdev_proph = NULL;
+ snodep->sdev_proph = 0;
}
- 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;
}
}
}
@@ -644,7 +642,7 @@ add_fan_nodes_and_props(picl_nodehdl_t plath)
for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) {
/* Skip if already initialized or no fan info */
- if (fnodep->nodeh != NULL || fnodep->fanp == NULL)
+ if (fnodep->nodeh != 0 || fnodep->fanp == NULL)
continue;
/*
@@ -691,7 +689,7 @@ add_fan_nodes_and_props(picl_nodehdl_t plath)
/*
* Add other "fan" class properties
*/
- pname = PROP_FAN_SPEED_UNIT,
+ pname = PROP_FAN_SPEED_UNIT;
err = add_regular_prop(cnodeh, pname,
PICL_PTYPE_CHARSTRING, PICL_READ,
strlen(fnodep->speed_unit)+1,
@@ -732,10 +730,10 @@ delete_fan_nodes_and_props(void)
*/
for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) {
- 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;
}
}
}
@@ -768,7 +766,7 @@ get_envmodel_conf_file(char *outfilename)
}
(void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR,
- ENVMODEL_CONF_FILE);
+ ENVMODEL_CONF_FILE);
if (access(pname, R_OK) == 0) {
(void) strlcpy(outfilename, pname, PATH_MAX);
@@ -793,9 +791,9 @@ env_picl_setup(void)
*/
for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) {
snodep->sensorp = sensor_lookup(snodep->sensor_name);
- snodep->nodeh = NULL;
- snodep->proph = NULL;
- snodep->sdev_proph = NULL;
+ snodep->nodeh = 0;
+ snodep->proph = 0;
+ snodep->sdev_proph = 0;
}
/*
@@ -803,8 +801,8 @@ env_picl_setup(void)
*/
for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) {
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/grover/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile
index c6f93ba6b4..eabffc5363 100644
--- a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile
@@ -39,8 +39,6 @@ ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%)
$(ROOTCONF) := FILEMODE = 0644
INFOS= piclfrutree.info system-board.info
-ROOTLINTDIR = $(ROOTLIBDIR)
-
.KEEP_STATE:
SUBDIRS=
@@ -49,7 +47,6 @@ all := TARGET= all
install := TARGET= install
clean := TARGET= clean
clobber := TARGET= clobber
-lint := TARGET= lint
all: $(CONF)
@@ -63,9 +60,6 @@ $(CONF): $(INFOS)
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/grover/memcfg/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile
index a1a6034e34..96f5b718fd 100644
--- a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile
@@ -44,12 +44,6 @@ LIBS = $(DYNLIB)
ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR)
-LINTSRC = $(LINTLIB:%.ln=%)
-ROOTLINTDIR = $(ROOTLIBDIR)
-ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%)
-
-CLEANFILES= $(LINTOUT) $(LINTLIB)
-
CPPFLAGS += -I$(SRC)/cmd/picl/plugins/common/memcfg
CFLAGS += $(CCVERBOSE)
LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
@@ -68,7 +62,6 @@ all := TARGET= all
install := TARGET= install
clean := TARGET= clean
clobber := TARGET= clobber
-lint := TARGET= lint
_msg := TARGET= _msg
POFILE= piclmemcfg.po
@@ -91,11 +84,7 @@ $(LIBLINKS): FRC
include $(SRC)/cmd/picl/plugins/Makefile.targ
include $(SRC)/lib/Makefile.targ
-$(ROOTLINTDIR)/%: ../%
- $(INS.file)
-
lint :
- $(LINT.c) $(SRCS)
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c
index 30505cc151..0277cb3c4a 100644
--- a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c
+++ b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This plugin creates memory configuration nodes and properties in the
* PICL tree for Grover/Grover+ platform.
@@ -101,7 +99,7 @@ create_logical_tree(picl_nodehdl_t memh, mmodinfo_t *mmodinfo)
* It means no segment for the slot if size is zero
*/
if (mmodinfo[i].size == 0) {
- memsegh[i] = NULL;
+ memsegh[i] = 0;
continue;
}
@@ -165,7 +163,7 @@ create_logical_tree(picl_nodehdl_t memh, mmodinfo_t *mmodinfo)
* Add reference property to the memory module if memory
* module node handle is not NULL.
*/
- if (mmodinfo[i].memmodh == NULL)
+ if (mmodinfo[i].memmodh == 0)
continue;
err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION,
@@ -185,7 +183,7 @@ create_logical_tree(picl_nodehdl_t memh, mmodinfo_t *mmodinfo)
* Undo in the logical memory tree
*/
for (i = 0; i < TOTAL_MEM_SLOTS; i++) {
- if (memsegh[i] == NULL)
+ if (memsegh[i] == 0)
continue;
(void) ptree_delete_node(memsegh[i]);
@@ -274,7 +272,7 @@ create_physical_tree(picl_nodehdl_t plfh, mmodinfo_t *mmodinfo)
* logical memory tree won't link to memory module.
*/
for (i = 0; i < TOTAL_MEM_SLOTS; i++)
- mmodinfo[i].memmodh = NULL;
+ mmodinfo[i].memmodh = 0;
/*
* Undo in the physical memory tree