Lines Matching defs:buffer

186 	char buffer[7];
189 strcpy(buffer, "MEMORY");
190 (void)acpi_db_display_statistics(buffer);
242 * PARAMETERS: buffer - Buffer descriptor to be validated
250 acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer)
255 if (!buffer) {
261 if ((buffer->length == ACPI_NO_BUFFER) ||
262 (buffer->length == ACPI_ALLOCATE_BUFFER) ||
263 (buffer->length == ACPI_ALLOCATE_LOCAL_BUFFER)) {
267 /* Length is valid, the buffer pointer must be also */
269 if (!buffer->pointer) {
280 * PARAMETERS: buffer - Buffer to be validated
285 * DESCRIPTION: Validate that the buffer is of the required length or
286 * allocate a new buffer. Returned buffer is always zeroed.
291 acpi_ut_initialize_buffer(struct acpi_buffer *buffer, acpi_size required_length)
297 if (!buffer || !required_length) {
303 * input actual length and set the output required buffer length.
305 input_buffer_length = buffer->length;
306 buffer->length = required_length;
309 * The input buffer length contains the actual buffer length, or the type
310 * of buffer to be allocated by this routine.
315 /* Return the exception (and the required buffer length) */
321 * Allocate a new buffer. We directectly call acpi_os_allocate here to
325 * buffer created via ACPI_ALLOCATE_BUFFER.
327 buffer->pointer = acpi_os_allocate(required_length);
332 /* Allocate a new buffer with local interface to allow tracking */
334 buffer->pointer = ACPI_ALLOCATE(required_length);
339 /* Existing buffer: Validate the size of the buffer */
347 /* Validate allocation from above or input buffer pointer */
349 if (!buffer->pointer) {
353 /* Have a valid buffer, clear it */
355 memset(buffer->pointer, 0, required_length);