linux_dsm_epyc7002/drivers/gpu/drm/i915/gem
Gustavo A. R. Silva 2defb94edb drm/i915: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/gpu/drm/i915/gem/i915_gem_mman.c: In function ‘i915_gem_fault’:
drivers/gpu/drm/i915/gem/i915_gem_mman.c:342:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (!i915_terminally_wedged(i915))
      ^
drivers/gpu/drm/i915/gem/i915_gem_mman.c:345:2: note: here
  case -EAGAIN:
  ^~~~

drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function ‘i915_gem_object_map’:
./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
 # define unlikely(x) __builtin_expect(!!(x), 0)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
  unlikely(__ret_warn_on);     \
  ^~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
 #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                         ^~~~
drivers/gpu/drm/i915/gem/i915_gem_pages.c:270:3: note: in expansion of macro ‘MISSING_CASE’
   MISSING_CASE(type);
   ^~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_pages.c:272:2: note: here
  case I915_MAP_WB:
  ^~~~

drivers/gpu/drm/i915/i915_gpu_error.c: In function ‘error_record_engine_registers’:
./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
 # define unlikely(x) __builtin_expect(!!(x), 0)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
  unlikely(__ret_warn_on);     \
  ^~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
 #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                         ^~~~
drivers/gpu/drm/i915/i915_gpu_error.c:1196:5: note: in expansion of macro ‘MISSING_CASE’
     MISSING_CASE(engine->id);
     ^~~~~~~~~~~~
drivers/gpu/drm/i915/i915_gpu_error.c:1197:4: note: here
    case RCS0:
    ^~~~

drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_dp_get_fia_supported_lane_count’:
./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
 # define unlikely(x) __builtin_expect(!!(x), 0)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
  unlikely(__ret_warn_on);     \
  ^~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
 #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                         ^~~~
drivers/gpu/drm/i915/display/intel_dp.c:233:3: note: in expansion of macro ‘MISSING_CASE’
   MISSING_CASE(lane_info);
   ^~~~~~~~~~~~
drivers/gpu/drm/i915/display/intel_dp.c:234:2: note: here
  case 1:
  ^~~~

drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’:
  CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.o
drivers/gpu/drm/i915/display/intel_display.c:12043:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (WARN_ON(!HAS_DDI(to_i915(dev))))
       ^
drivers/gpu/drm/i915/display/intel_display.c:12046:3: note: here
   case INTEL_OUTPUT_DP:
   ^~~~

Also, notice that the Makefile is modified to stop ignoring
fall-through warnings. The -Wimplicit-fallthrough option
will be enabled globally in v5.3.

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
2019-07-25 20:13:47 -05:00
..
selftests drm/i915: Stop passing I915_WAIT_LOCKED to i915_request_wait() 2019-06-19 12:58:38 +01:00
i915_gem_busy.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_clflush.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_clflush.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_client_blt.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_client_blt.h drm/i915: add in-kernel blitter client 2019-05-30 12:01:44 +01:00
i915_gem_context_types.h drm/i915: Pull kref into i915_address_space 2019-06-11 11:44:24 +01:00
i915_gem_context.c drm/i915/gtt: Use a common type for page directories 2019-06-17 16:30:54 +03:00
i915_gem_context.h drm/i915: Keep contexts pinned until after the next kernel context switch 2019-06-14 19:03:32 +01:00
i915_gem_dmabuf.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_domain.c drm/i915: move modesetting core code under display/ 2019-06-17 11:48:32 +03:00
i915_gem_execbuffer.c drm/i915: move modesetting core code under display/ 2019-06-17 11:48:32 +03:00
i915_gem_fence.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_internal.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_gem_ioctls.h
i915_gem_mman.c drm/i915: Mark expected switch fall-throughs 2019-07-25 20:13:47 -05:00
i915_gem_object_blt.c drm/i915: Pull kref into i915_address_space 2019-06-11 11:44:24 +01:00
i915_gem_object_blt.h drm/i915: add in-kernel blitter client 2019-05-30 12:01:44 +01:00
i915_gem_object_types.h drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_object.c drm/i915: Skip shrinking already freed pages 2019-06-18 18:09:08 +01:00
i915_gem_object.h drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_pages.c drm/i915: Mark expected switch fall-throughs 2019-07-25 20:13:47 -05:00
i915_gem_phys.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_gem_pm.c drm/i915: Avoid tainting i915_gem_park() with wakeref.lock 2019-06-15 08:51:34 +01:00
i915_gem_pm.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_shmem.c drm/i915: Track the purgeable objects on a separate eviction list 2019-05-31 21:23:51 +01:00
i915_gem_shrinker.c drm/i915: Skip shrinking already freed pages 2019-06-18 18:09:08 +01:00
i915_gem_stolen.c drm/i915: Combine unbound/bound list tracking for objects 2019-06-12 13:36:43 +01:00
i915_gem_throttle.c drm/i915: Move GEM client throttling to its own file 2019-05-28 12:45:29 +01:00
i915_gem_tiling.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_userptr.c drm/i915: Pull kref into i915_address_space 2019-06-11 11:44:24 +01:00
i915_gem_wait.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gemfs.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gemfs.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
Makefile
Makefile.header-test