Skip to content

Commit

Permalink
ACPICA: Formatting update - no functional changes
Browse files Browse the repository at this point in the history
Split long lines, update comments.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bob Moore authored and Len Brown committed Mar 27, 2009
1 parent 768aaaf commit d4913dc
Show file tree
Hide file tree
Showing 21 changed files with 161 additions and 174 deletions.
7 changes: 4 additions & 3 deletions drivers/acpi/acpica/evgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ acpi_ev_set_gpe_type(struct acpi_gpe_event_info *gpe_event_info, u8 type)

status = acpi_ev_disable_gpe(gpe_event_info);

/* Type was validated above */
/* Clear the type bits and insert the new Type */

gpe_event_info->flags &= ~ACPI_GPE_TYPE_MASK; /* Clear type bits */
gpe_event_info->flags |= type; /* Insert type */
gpe_event_info->flags &= ~ACPI_GPE_TYPE_MASK;
gpe_event_info->flags |= type;
return_ACPI_STATUS(status);
}

Expand Down Expand Up @@ -122,6 +122,7 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
if (!gpe_register_info) {
return_ACPI_STATUS(AE_NOT_EXIST);
}

register_bit = (u8)
(1 <<
(gpe_event_info->gpe_number - gpe_register_info->base_gpe_number));
Expand Down
64 changes: 31 additions & 33 deletions drivers/acpi/acpica/evgpeblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info)

while (gpe_block) {
if ((&gpe_block->event_info[0] <= gpe_event_info) &&
(&gpe_block->
event_info[((acpi_size) gpe_block->
register_count) * 8] >
(&gpe_block->event_info[((acpi_size)
gpe_block->
register_count) * 8] >
gpe_event_info)) {
return (TRUE);
}
Expand Down Expand Up @@ -210,10 +210,9 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
/* Now look at the individual GPEs in this byte register */

for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) {
gpe_event_info =
&gpe_block->
event_info[((acpi_size) i *
ACPI_GPE_REGISTER_WIDTH) + j];
gpe_event_info = &gpe_block->event_info[((acpi_size) i *
ACPI_GPE_REGISTER_WIDTH)
+ j];

if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
ACPI_GPE_DISPATCH_HANDLER) {
Expand Down Expand Up @@ -293,8 +292,8 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
/* Unknown method type, just ignore it! */

ACPI_DEBUG_PRINT((ACPI_DB_LOAD,
"Ignoring unknown GPE method type: %s (name not of form _Lxx or _Exx)",
name));
"Ignoring unknown GPE method type: %s "
"(name not of form _Lxx or _Exx)", name));
return_ACPI_STATUS(AE_OK);
}

Expand All @@ -306,17 +305,16 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
/* Conversion failed; invalid method, just ignore it */

ACPI_DEBUG_PRINT((ACPI_DB_LOAD,
"Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)",
name));
"Could not extract GPE number from name: %s "
"(name is not of form _Lxx or _Exx)", name));
return_ACPI_STATUS(AE_OK);
}

/* Ensure that we have a valid GPE number for this GPE block */

if ((gpe_number < gpe_block->block_base_number) ||
(gpe_number >=
(gpe_block->block_base_number +
(gpe_block->register_count * 8)))) {
(gpe_number >= (gpe_block->block_base_number +
(gpe_block->register_count * 8)))) {
/*
* Not valid for this GPE block, just ignore it. However, it may be
* valid for a different GPE block, since GPE0 and GPE1 methods both
Expand Down Expand Up @@ -423,9 +421,9 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,

if ((obj_desc->package.count < 2) ||
((obj_desc->package.elements[0])->common.type !=
ACPI_TYPE_LOCAL_REFERENCE)
|| ((obj_desc->package.elements[1])->common.type !=
ACPI_TYPE_INTEGER)) {
ACPI_TYPE_LOCAL_REFERENCE) ||
((obj_desc->package.elements[1])->common.type !=
ACPI_TYPE_INTEGER)) {
goto cleanup;
}

Expand All @@ -450,11 +448,11 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
*/
if ((gpe_device == target_gpe_device) &&
(gpe_number >= gpe_block->block_base_number) &&
(gpe_number <
gpe_block->block_base_number + (gpe_block->register_count * 8))) {
gpe_event_info =
&gpe_block->event_info[gpe_number -
gpe_block->block_base_number];
(gpe_number < gpe_block->block_base_number +
(gpe_block->register_count * 8))) {
gpe_event_info = &gpe_block->event_info[gpe_number -
gpe_block->
block_base_number];

/* Mark GPE for WAKE-ONLY but WAKE_DISABLED */

Expand Down Expand Up @@ -1033,8 +1031,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
* 1) are "runtime" or "run/wake" GPEs, and
* 2) have a corresponding _Lxx or _Exx method
*
* Any other GPEs within this block must be enabled via the acpi_enable_gpe()
* external interface.
* Any other GPEs within this block must be enabled via the
* acpi_enable_gpe() external interface.
*/
wake_gpe_count = 0;
gpe_enabled_count = 0;
Expand All @@ -1044,14 +1042,13 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,

/* Get the info block for this particular GPE */

gpe_event_info =
&gpe_block->
event_info[((acpi_size) i *
ACPI_GPE_REGISTER_WIDTH) + j];
gpe_event_info = &gpe_block->event_info[((acpi_size) i *
ACPI_GPE_REGISTER_WIDTH)
+ j];

if (((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
ACPI_GPE_DISPATCH_METHOD)
&& (gpe_event_info->flags & ACPI_GPE_TYPE_RUNTIME)) {
ACPI_GPE_DISPATCH_METHOD) &&
(gpe_event_info->flags & ACPI_GPE_TYPE_RUNTIME)) {
gpe_enabled_count++;
}

Expand Down Expand Up @@ -1105,8 +1102,8 @@ acpi_status acpi_ev_gpe_initialize(void)
/*
* Initialize the GPE Block(s) defined in the FADT
*
* Why the GPE register block lengths are divided by 2: From the ACPI Spec,
* section "General-Purpose Event Registers", we have:
* Why the GPE register block lengths are divided by 2: From the ACPI
* Spec, section "General-Purpose Event Registers", we have:
*
* "Each register block contains two registers of equal length
* GPEx_STS and GPEx_EN (where x is 0 or 1). The length of the
Expand Down Expand Up @@ -1163,7 +1160,8 @@ acpi_status acpi_ev_gpe_initialize(void)
if ((register_count0) &&
(gpe_number_max >= acpi_gbl_FADT.gpe1_base)) {
ACPI_ERROR((AE_INFO,
"GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1",
"GPE0 block (GPE 0 to %d) overlaps the GPE1 block "
"(GPE %d to %d) - Ignoring GPE1",
gpe_number_max, acpi_gbl_FADT.gpe1_base,
acpi_gbl_FADT.gpe1_base +
((register_count1 *
Expand Down
11 changes: 6 additions & 5 deletions drivers/acpi/acpica/evmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,19 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
* 2) Global device notify handler
* 3) Per-device notify handler
*/
if ((acpi_gbl_system_notify.handler
&& (notify_value <= ACPI_MAX_SYS_NOTIFY))
|| (acpi_gbl_device_notify.handler
&& (notify_value > ACPI_MAX_SYS_NOTIFY)) || handler_obj) {
if ((acpi_gbl_system_notify.handler &&
(notify_value <= ACPI_MAX_SYS_NOTIFY)) ||
(acpi_gbl_device_notify.handler &&
(notify_value > ACPI_MAX_SYS_NOTIFY)) || handler_obj) {
notify_info = acpi_ut_create_generic_state();
if (!notify_info) {
return (AE_NO_MEMORY);
}

if (!handler_obj) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Executing system notify handler for Notify (%4.4s, %X) node %p\n",
"Executing system notify handler for Notify (%4.4s, %X) "
"node %p\n",
acpi_ut_get_node_name(node),
notify_value, node));
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/acpica/evregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,8 @@ acpi_ev_install_handler(acpi_handle obj_handle,
if (next_handler_obj->address_space.space_id ==
handler_obj->address_space.space_id) {
ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
"Found handler for region [%s] in device %p(%p) handler %p\n",
"Found handler for region [%s] in device %p(%p) "
"handler %p\n",
acpi_ut_get_region_name
(handler_obj->address_space.
space_id), obj_desc,
Expand Down
22 changes: 10 additions & 12 deletions drivers/acpi/acpica/evrgnini.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
status = AE_OK;
} else {
ACPI_EXCEPTION((AE_INFO, status,
"Could not install PciConfig handler for Root Bridge %4.4s",
"Could not install PciConfig handler "
"for Root Bridge %4.4s",
acpi_ut_get_node_name
(pci_root_node)));
}
Expand Down Expand Up @@ -293,9 +294,8 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
* Get the PCI device and function numbers from the _ADR object contained
* in the parent's scope.
*/
status =
acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR, pci_device_node,
&pci_value);
status = acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR,
pci_device_node, &pci_value);

/*
* The default is zero, and since the allocation above zeroed the data,
Expand All @@ -308,18 +308,16 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,

/* The PCI segment number comes from the _SEG method */

status =
acpi_ut_evaluate_numeric_object(METHOD_NAME__SEG, pci_root_node,
&pci_value);
status = acpi_ut_evaluate_numeric_object(METHOD_NAME__SEG,
pci_root_node, &pci_value);
if (ACPI_SUCCESS(status)) {
pci_id->segment = ACPI_LOWORD(pci_value);
}

/* The PCI bus number comes from the _BBN method */

status =
acpi_ut_evaluate_numeric_object(METHOD_NAME__BBN, pci_root_node,
&pci_value);
status = acpi_ut_evaluate_numeric_object(METHOD_NAME__BBN,
pci_root_node, &pci_value);
if (ACPI_SUCCESS(status)) {
pci_id->bus = ACPI_LOWORD(pci_value);
}
Expand Down Expand Up @@ -632,8 +630,8 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
acpi_ns_locked);

/*
* Tell all users that this region is usable by running the _REG
* method
* Tell all users that this region is usable by
* running the _REG method
*/
if (acpi_ns_locked) {
status =
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/acpica/evxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,8 @@ acpi_install_gpe_handler(acpi_handle gpe_device,

/* Setup up dispatch flags to indicate handler (vs. method) */

gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); /* Clear bits */
gpe_event_info->flags &=
~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER);

acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/acpica/evxfregn.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ acpi_remove_address_space_handler(acpi_handle device,
/* Matched space_id, first dereference this in the Regions */

ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
"Removing address handler %p(%p) for region %s on Device %p(%p)\n",
"Removing address handler %p(%p) for region %s "
"on Device %p(%p)\n",
handler_obj, handler,
acpi_ut_get_region_name(space_id),
node, obj_desc));
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/acpica/hwacpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
*/
if (!acpi_gbl_FADT.acpi_enable && !acpi_gbl_FADT.acpi_disable) {
ACPI_ERROR((AE_INFO,
"No ACPI mode transition supported in this system (enable/disable both zero)"));
"No ACPI mode transition supported in this system "
"(enable/disable both zero)"));
return_ACPI_STATUS(AE_OK);
}

Expand Down
21 changes: 9 additions & 12 deletions drivers/acpi/acpica/hwgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)

/* Clear just the bit that corresponds to this GPE */

ACPI_CLEAR_BIT(enable_mask,
((u32) 1 <<
(gpe_event_info->gpe_number -
gpe_register_info->base_gpe_number)));
ACPI_CLEAR_BIT(enable_mask, ((u32)1 <<
(gpe_event_info->gpe_number -
gpe_register_info->base_gpe_number)));

/* Write the updated enable mask */

Expand Down Expand Up @@ -156,10 +155,9 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)

ACPI_FUNCTION_ENTRY();

register_bit = (u8)
(1 <<
(gpe_event_info->gpe_number -
gpe_event_info->register_info->base_gpe_number));
register_bit = (u8)(1 <<
(gpe_event_info->gpe_number -
gpe_event_info->register_info->base_gpe_number));

/*
* Write a one to the appropriate bit in the status register to
Expand Down Expand Up @@ -206,10 +204,9 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,

/* Get the register bitmask for this GPE */

register_bit = (u8)
(1 <<
(gpe_event_info->gpe_number -
gpe_event_info->register_info->base_gpe_number));
register_bit = (u8)(1 <<
(gpe_event_info->gpe_number -
gpe_event_info->register_info->base_gpe_number));

/* GPE currently enabled? (enabled for runtime?) */

Expand Down
14 changes: 6 additions & 8 deletions drivers/acpi/acpica/hwsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
* Wait ten seconds, then try again. This is to get S4/S5 to work on
* all machines.
*
* We wait so long to allow chipsets that poll this reg very slowly to
* still read the right value. Ideally, this block would go
* We wait so long to allow chipsets that poll this reg very slowly
* to still read the right value. Ideally, this block would go
* away entirely.
*/
acpi_os_stall(10000000);
Expand Down Expand Up @@ -501,12 +501,10 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state)

/* Insert the SLP_TYP bits */

pm1a_control |=
(acpi_gbl_sleep_type_a << sleep_type_reg_info->
bit_position);
pm1b_control |=
(acpi_gbl_sleep_type_b << sleep_type_reg_info->
bit_position);
pm1a_control |= (acpi_gbl_sleep_type_a <<
sleep_type_reg_info->bit_position);
pm1b_control |= (acpi_gbl_sleep_type_b <<
sleep_type_reg_info->bit_position);

/* Write the control registers and ignore any errors */

Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/acpica/hwxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
((info->return_object->package.elements[1])->common.type
!= ACPI_TYPE_INTEGER)) {
ACPI_ERROR((AE_INFO,
"Sleep State return package elements are not both Integers (%s, %s)",
"Sleep State return package elements are not both Integers "
"(%s, %s)",
acpi_ut_get_object_type_name(info->return_object->
package.elements[0]),
acpi_ut_get_object_type_name(info->return_object->
Expand Down
Loading

0 comments on commit d4913dc

Please sign in to comment.