svn commit: r209064 - in head/sys/dev: acpi_support acpica

Jung-uk Kim jkim at FreeBSD.org
Fri Jun 11 19:53:43 UTC 2010


Author: jkim
Date: Fri Jun 11 19:53:42 2010
New Revision: 209064
URL: http://svn.freebsd.org/changeset/base/209064

Log:
  Remove unused assignment.
  
  Found by:	clang static analyzer
  Found by:	Coverity Prevent[tm] (CID 4537, 4538, 4539)

Modified:
  head/sys/dev/acpi_support/acpi_fujitsu.c
  head/sys/dev/acpi_support/acpi_hp.c
  head/sys/dev/acpi_support/acpi_ibm.c
  head/sys/dev/acpica/acpi_dock.c
  head/sys/dev/acpica/acpi_video.c

Modified: head/sys/dev/acpi_support/acpi_fujitsu.c
==============================================================================
--- head/sys/dev/acpi_support/acpi_fujitsu.c	Fri Jun 11 19:35:05 2010	(r209063)
+++ head/sys/dev/acpi_support/acpi_fujitsu.c	Fri Jun 11 19:53:42 2010	(r209064)
@@ -380,7 +380,6 @@ acpi_fujitsu_init(struct acpi_fujitsu_so
 	    OID_AUTO, "fujitsu", CTLFLAG_RD, 0, "");
 
 	for (i = 0; sysctl_table[i].name != NULL; i++) {
-		exists = 0;
 		switch(sysctl_table[i].method) {
 			case METHOD_GMOU:
 				exists = sc->gmou.exists;
@@ -566,9 +565,6 @@ static uint8_t
 acpi_fujitsu_check_hardware(struct acpi_fujitsu_softc *sc)
 {
 	int val;
-	struct acpi_softc *acpi_sc;
-
-	acpi_sc = acpi_device_get_parent_softc(sc->dev);
 
 	ACPI_SERIAL_ASSERT(fujitsu);
 	/* save the hotkey bitmask */

Modified: head/sys/dev/acpi_support/acpi_hp.c
==============================================================================
--- head/sys/dev/acpi_support/acpi_hp.c	Fri Jun 11 19:35:05 2010	(r209063)
+++ head/sys/dev/acpi_support/acpi_hp.c	Fri Jun 11 19:53:42 2010	(r209064)
@@ -453,7 +453,6 @@ static int
 acpi_hp_attach(device_t dev)
 {
 	struct acpi_hp_softc	*sc;
-	struct acpi_softc	*acpi_sc;
 	devclass_t		wmi_devclass;
 	int			arg;
 
@@ -477,7 +476,6 @@ acpi_hp_attach(device_t dev)
 	sc->cmi_order_size = -1;
 	sc->verbose = 0;
 	memset(sc->cmi_order, 0, sizeof(sc->cmi_order));
-	acpi_sc = acpi_device_get_parent_softc(dev);
 
 	if (!(wmi_devclass = devclass_find ("acpi_wmi"))) {
 		device_printf(dev, "Couldn't find acpi_wmi devclass\n");

Modified: head/sys/dev/acpi_support/acpi_ibm.c
==============================================================================
--- head/sys/dev/acpi_support/acpi_ibm.c	Fri Jun 11 19:35:05 2010	(r209063)
+++ head/sys/dev/acpi_support/acpi_ibm.c	Fri Jun 11 19:53:42 2010	(r209064)
@@ -743,8 +743,6 @@ acpi_ibm_sysctl_set(struct acpi_ibm_soft
 			return (status);
 
 		if (sc->cmos_handle) {
-			val = val_ec & IBM_EC_MASK_VOL;
-
 			Args.Count = 1;
 			Args.Pointer = &Arg;
 			Arg.Type = ACPI_TYPE_INTEGER;

Modified: head/sys/dev/acpica/acpi_dock.c
==============================================================================
--- head/sys/dev/acpica/acpi_dock.c	Fri Jun 11 19:35:05 2010	(r209063)
+++ head/sys/dev/acpica/acpi_dock.c	Fri Jun 11 19:53:42 2010	(r209064)
@@ -257,12 +257,10 @@ static void
 acpi_dock_insert(device_t dev)
 {
 	struct acpi_dock_softc *sc;
-	ACPI_HANDLE	h;
 
 	ACPI_SERIAL_ASSERT(dock);
 
 	sc = device_get_softc(dev);
-	h = acpi_get_handle(dev);
 
 	if (sc->status == ACPI_DOCK_STATUS_UNDOCKED ||
 	    sc->status == ACPI_DOCK_STATUS_UNKNOWN) {
@@ -414,7 +412,6 @@ acpi_dock_status_sysctl(SYSCTL_HANDLER_A
 	device_t	dev;
 	int		status, err;
 
-	err = 0;
 	dev = (device_t)arg1;
 
 	sc = device_get_softc(dev);

Modified: head/sys/dev/acpica/acpi_video.c
==============================================================================
--- head/sys/dev/acpica/acpi_video.c	Fri Jun 11 19:35:05 2010	(r209063)
+++ head/sys/dev/acpica/acpi_video.c	Fri Jun 11 19:53:42 2010	(r209064)
@@ -429,15 +429,11 @@ acpi_video_vo_init(UINT32 adr)
 {
 	struct acpi_video_output *vn, *vo, *vp;
 	int n, x;
-	int display_index;
-	int display_port;
 	char name[8], env[32];
 	const char *type, *desc;
 	struct acpi_video_output_queue *voqh;
 
 	ACPI_SERIAL_ASSERT(video);
-	display_index = adr & DOD_DEVID_MASK_DISPIDX;
-	display_port = (adr & DOD_DEVID_MASK_DISPPORT) >> 4;
 
 	switch (adr & DOD_DEVID_MASK) {
 	case DOD_DEVID_MONITOR:
@@ -474,7 +470,7 @@ acpi_video_vo_init(UINT32 adr)
 	}
 
 	n = 0;
-	vn = vp = NULL;
+	vp = NULL;
 	STAILQ_FOREACH(vn, voqh, vo_unit.next) {
 		if (vn->vo_unit.num != n)
 			break;
@@ -782,7 +778,6 @@ acpi_video_vo_presets_sysctl(SYSCTL_HAND
 	struct acpi_video_output *vo;
 	int i, level, *preset, err;
 
-	err = 0;
 	vo = (struct acpi_video_output *)arg1;
 	ACPI_SERIAL_BEGIN(video_output);
 	if (vo->handle == NULL) {
@@ -942,7 +937,6 @@ vo_get_brightness_levels(ACPI_HANDLE han
 	ACPI_OBJECT *res;
 	int num, i, n, *levels;
 
-	num = 0;
 	bcl_buf.Length = ACPI_ALLOCATE_BUFFER;
 	bcl_buf.Pointer = NULL;
 	status = AcpiEvaluateObject(handle, "_BCL", NULL, &bcl_buf);


More information about the svn-src-head mailing list