diff options
| author | Lucas De Marchi <[email protected]> | 2018-03-19 10:37:20 -0700 |
|---|---|---|
| committer | Rodrigo Vivi <[email protected]> | 2018-03-27 10:30:04 -0700 |
| commit | 57bdff48a0a553468f16a65149d51213b5f25fee (patch) | |
| tree | e41048a53e6af90fa6f99c04f606776b8eba7c23 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | ae2f5c009335f4d273d2431539de91c8f28d4736 (diff) | |
drm/i915: Reword warning for missing cases
In some places we end up converting switch statements to a series of
if/else, particularly when introducing helper functions to handle a
group of cases. It's tempting to either leave a wrong warning (since now
we don't have a switch case anymore) or to convert to WARN(1, ...),
but we can just provide a better message and avoid the doubt when such
conversions arrise.
Introducing a warning inside i915_driver_load() just for tests we get:
[ 4535.233717] Missing case (ret == 0)
[ 4535.233868] WARNING: CPU: 1 PID: 795 at drivers/gpu/drm/i915/i915_drv.c:1341 i915_driver_load+0x42/0x10e0 [i915]
which is clear enough.
v2: remove __func__ since this is already on the warning.
Cc: Chris Wilson <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Daniel Vetter <[email protected]>
Signed-off-by: Lucas De Marchi <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions