✗ CI.checkpatch: warning for drm/xe: Add driver load error injection (rev4)

Patchwork patchwork at emeril.freedesktop.org
Tue Sep 10 18:07:55 UTC 2024


== Series Details ==

Series: drm/xe: Add driver load error injection (rev4)
URL   : https://patchwork.freedesktop.org/series/137314/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
c62d7e164862503a3662a095da1c6c9014248cb2
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 4a02d279d1eee9bdb8421c440c74833a11187b17
Author: Francois Dugast <francois.dugast at intel.com>
Date:   Tue Sep 10 17:22:41 2024 +0200

    drm/xe: Add driver load error injection
    
    Those new macros inject errors by overriding return codes. They must
    manually be called, preferably at the very beginning of the function
    that will fault, otherwise if not possible by turning this pattern:
    
        err = foo();
        if (err)
            return err;
    
    into:
    
        err = foo();
        err = xe_device_inject_driver_probe_error(xe, err);
        if (err)
            return err;
    
    When CONFIG_DRM_XE_DEBUG is not set, this has no effect.
    
    When CONFIG_DRM_XE_DEBUG is set, the error code at checkpoint X will
    be overridden when the module argument inject_driver_load_error is
    set to value X. By doing so, it is possible to test proper error
    handling and improve robustness for current and future code. A few
    injection points are added in this patch but more need to be added.
    One way to use this error injection at driver probe is:
    
        for i in {1..200}; do
            echo "Run $i"
            modprobe xe inject_driver_probe_error=$i;
            rmmod xe;
        done
    
    In the future this is expected to be replaced by the infrastructure
    provided by fault-inject.h
    
    v2: Fix style and build errors, modparam to 0 after probe, rename to
        xe_device_inject_driver_probe_error, check type when compiled out,
        add _return macro, move some uses to the beginning of the function
    v3: Rebase
    v4: Improve commit message and comments, keep if/return rather than
        change the flow inside the macro (Lucas De Marchi)
    v5: Rebase, add comments, keep existing return points (Lucas De Marchi)
        Add finish wrapper, move to function beginning for all xe functions
        (Michal Wajdeczko) Bolt into i915 error injection (Jani Nikula)
    
    Signed-off-by: Matthew Brost <matthew.brost at intel.com>
    Signed-off-by: Francois Dugast <francois.dugast at intel.com>
    Cc: Lucas De Marchi <lucas.demarchi at intel.com>
+ /mt/dim checkpatch f25ffe1514b26574258bb767f5c6f53facdfaaca drm-intel
4a02d279d1ee drm/xe: Add driver load error injection
-:316: WARNING:LONG_LINE: line length of 103 exceeds 100 columns
#316: FILE: drivers/gpu/drm/xe/xe_module.c:72:
+module_param_named_unsafe(inject_driver_probe_error, xe_modparam.inject_driver_probe_error, int, 0600);

total: 0 errors, 1 warnings, 0 checks, 365 lines checked




More information about the Intel-xe mailing list