Commit 6208a3dd authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki

ACPICA: Cleanup useless memset invocations.

This patch removes unnecessary memset() invocations where
kmem_cache_zalloc() is used for allocating memory.  It also helps to
reduce source code differences between ACPICA upstream and Linux.

[rjw: Changelog]
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent bd48d677
...@@ -396,7 +396,6 @@ void *acpi_ut_allocate_object_desc_dbg(const char *module_name, ...@@ -396,7 +396,6 @@ void *acpi_ut_allocate_object_desc_dbg(const char *module_name,
/* Mark the descriptor type */ /* Mark the descriptor type */
memset(object, 0, sizeof(union acpi_operand_object));
ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND);
ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p Size %X\n", ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p Size %X\n",
......
...@@ -161,7 +161,6 @@ union acpi_generic_state *acpi_ut_create_generic_state(void) ...@@ -161,7 +161,6 @@ union acpi_generic_state *acpi_ut_create_generic_state(void)
if (state) { if (state) {
/* Initialize */ /* Initialize */
memset(state, 0, sizeof(union acpi_generic_state));
state->common.descriptor_type = ACPI_DESC_TYPE_STATE; state->common.descriptor_type = ACPI_DESC_TYPE_STATE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment