Now that we stop populating the static device_info during early init, we can remove the last trace of the writable local variable. add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-17 (-17) Function old new delta i915_driver_load 5007 4990 -17 Total: Before=1331303, After=1331286, chg -0.00% Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/i915_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index af2ddf5c7d59..dfb6227f5cc9 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -886,7 +886,6 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv, { const struct intel_device_static_info *match_info = (const struct intel_device_static_info *)ent->driver_data; - struct intel_device_static_info *device_info; struct intel_device_runtime_info *info = &dev_priv->device_runtime; int ret = 0; @@ -894,14 +893,15 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv, return -ENODEV; /* Setup the write-once "constant" device info */ - device_info = mkwrite_device_info(dev_priv); - memcpy(device_info, match_info, sizeof(*device_info)); + *mkwrite_device_info(dev_priv) = *match_info; info->device_id = dev_priv->drm.pdev->device; BUILD_BUG_ON(INTEL_MAX_PLATFORMS > - sizeof(device_info->platform_mask) * BITS_PER_BYTE); - BUG_ON(device_info->gen > sizeof(device_info->gen_mask) * BITS_PER_BYTE); + sizeof(DEVICE_INFO(dev_priv)->platform_mask) * BITS_PER_BYTE); + BUG_ON(INTEL_GEN(dev_priv) > + sizeof(DEVICE_INFO(dev_priv)->gen_mask) * BITS_PER_BYTE); + spin_lock_init(&dev_priv->irq_lock); spin_lock_init(&dev_priv->gpu_error.lock); mutex_init(&dev_priv->backlight_lock); -- 2.16.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx