Well, the length of variable names is really irrelevant to this patch.
I just didn't want to write
switch (resource->id) {
case ACPI_RSTYPE_ADDRESS16:
address16 = (struct acpi_resource_address16 *) &resource->data;
out->resource_type = address16->resource_type;
out->producer_consumer = address16->producer_consumer;
...
case ACPI_RSTYPE_ADDRESS32:
address32 = (struct acpi_resource_address32 *) &resource->data;
out->resource_type = address32->resource_type;
out->producer_consumer = address32->producer_consumer;
...
case ACPI_RSTYPE_ADDRESS64:
address64 = (struct acpi_resource_address64 *) &resource->data;
out->resource_type = address64->resource_type;
out->producer_consumer = address64->producer_consumer;
...
where all the cases are identical except for the 16/32/64 (and the
occasional cut-and-paste error).
If the macros are considered too ugly, I'd be glad to rewrite the
function as above. The main thing is to put the 16/32/64 switch
ONE place, rather than duplicating it in every place that consumes
address resources.
Bjorn
-
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/