Re: [PATCH] 2/3 ACPI resource handling

Stephen Hemminger (shemminger@osdl.org)
11 Feb 2003 14:14:54 -0800


On Tue, 2003-02-11 at 13:59, Bjorn Helgaas wrote:
> Note that this contains a couple structure copies; don't know your
> philosophy on those.
>
> Bjorn
>
>
> diff -ur acpi-2/drivers/acpi/resources/rsxface.c acpi-3/drivers/acpi/resources/rsxface.c
> --- acpi-2/drivers/acpi/resources/rsxface.c 2003-02-09 22:13:47.000000000 -0700
> +++ acpi-3/drivers/acpi/resources/rsxface.c 2003-02-09 22:13:52.000000000 -0700
> @@ -316,3 +316,65 @@
> status = acpi_rs_set_srs_method_data (device_handle, in_buffer);
> return_ACPI_STATUS (status);
> }
> +
> +
> +#define copy_field(out, in, field) out->field = in->field
> +#define copy_address(out, in) \
> + copy_field(out, in, resource_type); \
> + copy_field(out, in, producer_consumer); \
> + copy_field(out, in, decode); \
> + copy_field(out, in, min_address_fixed); \
> + copy_field(out, in, max_address_fixed); \
> + copy_field(out, in, attribute); \
> + copy_field(out, in, granularity); \
> + copy_field(out, in, min_address_range); \
> + copy_field(out, in, max_address_range); \
> + copy_field(out, in, address_translation_offset); \
> + copy_field(out, in, address_length); \
> + copy_field(out, in, resource_source);

If ACPI just used normal (ie short) variable names, then ugly macros
like this would not be necessary.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/