Skip to content

Commit

Permalink
ACPICA: change coding style to match ACPICA, no functional change
Browse files Browse the repository at this point in the history
This commit alters the coding style of the following commit to match
ACPICA to keep divergences between Linux and ACPICA at a minimum.
This is not intended to result in functional changes.

ae6b3e5
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Sun Nov 18 20:25:35 2018 +0100

    ACPICA: Fix handling of buffer-size in acpi_ex_write_data_to_field()

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Erik Schmauss authored and Rafael J. Wysocki committed Dec 13, 2018
1 parent 4c1379d commit 55e8054
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/acpi/acpica/exserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
{
acpi_status status;
u32 buffer_length;
u32 data_length;
void *buffer;
union acpi_operand_object *buffer_desc;
u32 function;
Expand Down Expand Up @@ -324,8 +325,9 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
/* Copy the input buffer data to the transfer buffer */

buffer = buffer_desc->buffer.pointer;
memcpy(buffer, source_desc->buffer.pointer,
min(buffer_length, source_desc->buffer.length));
data_length = (buffer_length < source_desc->buffer.length ?
buffer_length : source_desc->buffer.length);
memcpy(buffer, source_desc->buffer.pointer, data_length);

/* Lock entire transaction if requested */

Expand Down

0 comments on commit 55e8054

Please sign in to comment.