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

Commit bb1cab3d authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki
Browse files

ACPICA: Clarify ACPI_FREE_BUFFER usage.



Add a comment to clarify reason for using ACPI_FREE_BUFFER directly
instead of ACPI_FREE.

In addition to that, change one instance in which ACPI_FREE_BUFFER()
should be used instead of ACPI_FREE().

[rjw: Subject and changelog]
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 839e928f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ acpi_evaluate_object_typed(acpi_handle handle,

		/* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */

		ACPI_FREE(return_buffer->pointer);
		ACPI_FREE_BUFFER(*return_buffer);
		return_buffer->pointer = NULL;
	}

+7 −3
Original line number Diff line number Diff line
@@ -919,9 +919,13 @@ struct acpi_buffer {
	void *pointer;		/* pointer to buffer */
};

/* Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_LOCAL_BUFFER */

#define ACPI_FREE_BUFFER(b)         ACPI_FREE(b.pointer)
/*
 * Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_BUFFER.
 * Note: We use acpi_os_free here because acpi_os_allocate was used to allocate
 * the buffer. This purposefully bypasses the internal allocation tracking
 * mechanism (if it is enabled).
 */
#define ACPI_FREE_BUFFER(b)         acpi_os_free((b).pointer)

/*
 * name_type for acpi_get_name