[Intel-gfx] [PATCH 4/8] drm/i915/bios: remove an unnecessary temp variable
Jani Nikula
jani.nikula at intel.com
Thu Sep 28 08:22:00 UTC 2017
Prepare for merging parse_device_mapping() into
parse_general_definitions(). No functional changes.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 435db26f5a1f..d0fedac0322f 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1272,7 +1272,6 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
{
const struct bdb_general_definitions *defs;
const struct child_device_config *child;
- struct child_device_config *child_dev_ptr;
int i, child_device_num, count;
u8 expected_size;
u16 block_size;
@@ -1344,16 +1343,14 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
continue;
}
- child_dev_ptr = dev_priv->vbt.child_dev + count;
- count++;
-
/*
* Copy as much as we know (sizeof) and is available
* (child_dev_size) of the child device. Accessing the data must
* depend on VBT version.
*/
- memcpy(child_dev_ptr, child,
+ memcpy(dev_priv->vbt.child_dev + count, child,
min_t(size_t, defs->child_dev_size, sizeof(*child)));
+ count++;
}
return;
}
--
2.11.0
More information about the Intel-gfx
mailing list