Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c0d7939 authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki
Browse files

ACPICA: Cleanup coding style to reduce differences between Linux and ACPICA.



This is a cosmetic patch only. Comparison of the resulting binary showed
only line number differences.

This patch does not affect the generation of the Linux binary.
This patch decreases 314 lines of 20121018 divergence.diff.

ACPICA core uses ()'s on return statements. This is a known and committed
differences from Linux standard coding style.

This patch cleans up the Linux side ACPICA code to use this codying style
in order to reduce the source code differences between Linux and ACPICA.

Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 3e8214e5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -304,7 +304,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)
		    acpi_ev_address_space_dispatch(obj_desc, NULL, ACPI_READ,
						   region_offset, 8, &value);
		if (ACPI_FAILURE(status)) {
			return status;
			return (status);
		}

		*buffer = (u8)value;
@@ -312,7 +312,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)
		region_offset++;
	}

	return AE_OK;
	return (AE_OK);
}

/*******************************************************************************
+4 −2
Original line number Diff line number Diff line
@@ -69,8 +69,10 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,

u32 acpi_hw_get_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info)
{
	return (u32)1 << (gpe_event_info->gpe_number -
		 gpe_event_info->register_info->base_gpe_number);

	return ((u32)1 <<
		(gpe_event_info->gpe_number -
		 gpe_event_info->register_info->base_gpe_number));
}

/******************************************************************************
+9 −9
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
	if ((bit_width != 8) && (bit_width != 16) && (bit_width != 32)) {
		ACPI_ERROR((AE_INFO,
			    "Bad BitWidth parameter: %8.8X", bit_width));
		return AE_BAD_PARAMETER;
		return (AE_BAD_PARAMETER);
	}

	port_info = acpi_protected_ports;
@@ -234,11 +234,11 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
	status = acpi_hw_validate_io_request(address, width);
	if (ACPI_SUCCESS(status)) {
		status = acpi_os_read_port(address, value, width);
		return status;
		return (status);
	}

	if (status != AE_AML_ILLEGAL_ADDRESS) {
		return status;
		return (status);
	}

	/*
@@ -253,7 +253,7 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
		if (acpi_hw_validate_io_request(address, 8) == AE_OK) {
			status = acpi_os_read_port(address, &one_byte, 8);
			if (ACPI_FAILURE(status)) {
				return status;
				return (status);
			}

			*value |= (one_byte << i);
@@ -262,7 +262,7 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
		address++;
	}

	return AE_OK;
	return (AE_OK);
}

/******************************************************************************
@@ -297,11 +297,11 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width)
	status = acpi_hw_validate_io_request(address, width);
	if (ACPI_SUCCESS(status)) {
		status = acpi_os_write_port(address, value, width);
		return status;
		return (status);
	}

	if (status != AE_AML_ILLEGAL_ADDRESS) {
		return status;
		return (status);
	}

	/*
@@ -317,12 +317,12 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width)
			status =
			    acpi_os_write_port(address, (value >> i) & 0xFF, 8);
			if (ACPI_FAILURE(status)) {
				return status;
				return (status);
			}
		}

		address++;
	}

	return AE_OK;
	return (AE_OK);
}
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,

	pathname = acpi_ns_get_external_pathname(node);
	if (!pathname) {
		return AE_OK;	/* Could not get pathname, ignore */
		return (AE_OK);	/* Could not get pathname, ignore */
	}

	/*
+2 −2
Original line number Diff line number Diff line
@@ -76,12 +76,12 @@ struct acpi_namespace_node *acpi_ns_get_next_node(struct acpi_namespace_node

		/* It's really the parent's _scope_ that we want */

		return parent_node->child;
		return (parent_node->child);
	}

	/* Otherwise just return the next peer */

	return child_node->peer;
	return (child_node->peer);
}

/*******************************************************************************
Loading