Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Replace "_load" with "_probe" consequently

Use the "_probe" nomenclature not only in i915_driver_probe() helper
name but also in other related function / variable names for
consistency. Only the userspace exposed name of a related module
parameter is left untouched.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712112429.740-4-janusz.krzysztofik@linux.intel.com

authored by

Janusz Krzysztofik and committed by
Chris Wilson
f2db53f1 b01558e5

+25 -25
+1 -1
drivers/gpu/drm/i915/display/intel_connector.c
··· 118 118 if (ret) 119 119 goto err; 120 120 121 - if (i915_inject_load_failure()) { 121 + if (i915_inject_probe_failure()) { 122 122 ret = -EFAULT; 123 123 goto err_backlight; 124 124 }
+1 -1
drivers/gpu/drm/i915/gt/intel_engine_cs.c
··· 426 426 WARN_ON(engine_mask & 427 427 GENMASK(BITS_PER_TYPE(mask) - 1, I915_NUM_ENGINES)); 428 428 429 - if (i915_inject_load_failure()) 429 + if (i915_inject_probe_failure()) 430 430 return -ENODEV; 431 431 432 432 for (i = 0; i < ARRAY_SIZE(intel_engines); i++) {
+10 -10
drivers/gpu/drm/i915/i915_drv.c
··· 81 81 static struct drm_driver driver; 82 82 83 83 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG) 84 - static unsigned int i915_load_fail_count; 84 + static unsigned int i915_probe_fail_count; 85 85 86 - bool __i915_inject_load_failure(const char *func, int line) 86 + bool __i915_inject_probe_failure(const char *func, int line) 87 87 { 88 - if (i915_load_fail_count >= i915_modparams.inject_load_failure) 88 + if (i915_probe_fail_count >= i915_modparams.inject_load_failure) 89 89 return false; 90 90 91 - if (++i915_load_fail_count == i915_modparams.inject_load_failure) { 91 + if (++i915_probe_fail_count == i915_modparams.inject_load_failure) { 92 92 DRM_INFO("Injecting failure at checkpoint %u [%s:%d]\n", 93 93 i915_modparams.inject_load_failure, func, line); 94 94 i915_modparams.inject_load_failure = 0; ··· 100 100 101 101 bool i915_error_injected(void) 102 102 { 103 - return i915_load_fail_count && !i915_modparams.inject_load_failure; 103 + return i915_probe_fail_count && !i915_modparams.inject_load_failure; 104 104 } 105 105 106 106 #endif ··· 687 687 struct pci_dev *pdev = dev_priv->drm.pdev; 688 688 int ret; 689 689 690 - if (i915_inject_load_failure()) 690 + if (i915_inject_probe_failure()) 691 691 return -ENODEV; 692 692 693 693 if (HAS_DISPLAY(dev_priv)) { ··· 903 903 { 904 904 int ret = 0; 905 905 906 - if (i915_inject_load_failure()) 906 + if (i915_inject_probe_failure()) 907 907 return -ENODEV; 908 908 909 909 intel_device_info_subplatform_init(dev_priv); ··· 997 997 { 998 998 int ret; 999 999 1000 - if (i915_inject_load_failure()) 1000 + if (i915_inject_probe_failure()) 1001 1001 return -ENODEV; 1002 1002 1003 1003 if (i915_get_bridge_dev(dev_priv)) ··· 1541 1541 struct pci_dev *pdev = dev_priv->drm.pdev; 1542 1542 int ret; 1543 1543 1544 - if (i915_inject_load_failure()) 1544 + if (i915_inject_probe_failure()) 1545 1545 return -ENODEV; 1546 1546 1547 1547 intel_device_info_runtime_init(dev_priv); ··· 1947 1947 out_pci_disable: 1948 1948 pci_disable_device(pdev); 1949 1949 out_fini: 1950 - i915_load_error(dev_priv, "Device initialization failed (%d)\n", ret); 1950 + i915_probe_error(dev_priv, "Device initialization failed (%d)\n", ret); 1951 1951 i915_driver_destroy(dev_priv); 1952 1952 return ret; 1953 1953 }
+5 -5
drivers/gpu/drm/i915/i915_drv.h
··· 122 122 123 123 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG) 124 124 125 - bool __i915_inject_load_failure(const char *func, int line); 126 - #define i915_inject_load_failure() \ 127 - __i915_inject_load_failure(__func__, __LINE__) 125 + bool __i915_inject_probe_failure(const char *func, int line); 126 + #define i915_inject_probe_failure() \ 127 + __i915_inject_probe_failure(__func__, __LINE__) 128 128 129 129 bool i915_error_injected(void); 130 130 131 131 #else 132 132 133 - #define i915_inject_load_failure() false 133 + #define i915_inject_probe_failure() false 134 134 #define i915_error_injected() false 135 135 136 136 #endif 137 137 138 - #define i915_load_error(i915, fmt, ...) \ 138 + #define i915_probe_error(i915, fmt, ...) \ 139 139 __i915_printk(i915, i915_error_injected() ? KERN_DEBUG : KERN_ERR, \ 140 140 fmt, ##__VA_ARGS__) 141 141
+4 -4
drivers/gpu/drm/i915/i915_gem.c
··· 1515 1515 if (ret) 1516 1516 goto err_gt; 1517 1517 1518 - if (i915_inject_load_failure()) { 1518 + if (i915_inject_probe_failure()) { 1519 1519 ret = -ENODEV; 1520 1520 goto err_gt; 1521 1521 } 1522 1522 1523 - if (i915_inject_load_failure()) { 1523 + if (i915_inject_probe_failure()) { 1524 1524 ret = -EIO; 1525 1525 goto err_gt; 1526 1526 } ··· 1582 1582 * for all other failure, such as an allocation failure, bail. 1583 1583 */ 1584 1584 if (!i915_reset_failed(dev_priv)) { 1585 - i915_load_error(dev_priv, 1586 - "Failed to initialize GPU, declaring it wedged!\n"); 1585 + i915_probe_error(dev_priv, 1586 + "Failed to initialize GPU, declaring it wedged!\n"); 1587 1587 i915_gem_set_wedged(dev_priv); 1588 1588 } 1589 1589
+1 -1
drivers/gpu/drm/i915/i915_pci.c
··· 957 957 if (err) 958 958 return err; 959 959 960 - if (i915_inject_load_failure()) { 960 + if (i915_inject_probe_failure()) { 961 961 i915_pci_remove(pdev); 962 962 return -ENODEV; 963 963 }
+1 -1
drivers/gpu/drm/i915/intel_gvt.c
··· 95 95 { 96 96 int ret; 97 97 98 - if (i915_inject_load_failure()) 98 + if (i915_inject_probe_failure()) 99 99 return -ENODEV; 100 100 101 101 if (!i915_modparams.enable_gvt) {
+1 -1
drivers/gpu/drm/i915/intel_uncore.c
··· 1331 1331 GEM_BUG_ON(domain_id >= FW_DOMAIN_ID_COUNT); 1332 1332 GEM_BUG_ON(uncore->fw_domain[domain_id]); 1333 1333 1334 - if (i915_inject_load_failure()) 1334 + if (i915_inject_probe_failure()) 1335 1335 return -ENOMEM; 1336 1336 1337 1337 d = kzalloc(sizeof(*d), GFP_KERNEL);
+1 -1
drivers/gpu/drm/i915/intel_wopcm.c
··· 177 177 178 178 GEM_BUG_ON(!wopcm->size); 179 179 180 - if (i915_inject_load_failure()) 180 + if (i915_inject_probe_failure()) 181 181 return -E2BIG; 182 182 183 183 if (guc_fw_size >= wopcm->size) {