linux_dsm_epyc7002/drivers/gpu/drm/i915
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
..
display drm/i915: Mark expected switch fall-throughs 2019-07-25 20:13:47 -05:00
gem drm/i915: Mark expected switch fall-throughs 2019-07-25 20:13:47 -05:00
gt
gvt
selftests
i915_active_types.h
i915_active.c
i915_active.h
i915_cmd_parser.c
i915_debugfs.c
i915_debugfs.h
i915_drv.c
i915_drv.h
i915_fixed.h
i915_gem_batch_pool.c
i915_gem_batch_pool.h
i915_gem_evict.c
i915_gem_fence_reg.c
i915_gem_fence_reg.h
i915_gem_gtt.c
i915_gem_gtt.h
i915_gem_render_state.c
i915_gem_render_state.h
i915_gem.c
i915_gem.h
i915_globals.c
i915_globals.h
i915_gpu_error.c drm/i915: Mark expected switch fall-throughs 2019-07-25 20:13:47 -05:00
i915_gpu_error.h
i915_ioc32.c
i915_irq.c
i915_irq.h
i915_memcpy.c
i915_mm.c
i915_oa_bdw.c
i915_oa_bdw.h
i915_oa_bxt.c
i915_oa_bxt.h
i915_oa_cflgt2.c
i915_oa_cflgt2.h
i915_oa_cflgt3.c
i915_oa_cflgt3.h
i915_oa_chv.c
i915_oa_chv.h
i915_oa_cnl.c
i915_oa_cnl.h
i915_oa_glk.c
i915_oa_glk.h
i915_oa_hsw.c
i915_oa_hsw.h
i915_oa_icl.c
i915_oa_icl.h
i915_oa_kblgt2.c
i915_oa_kblgt2.h
i915_oa_kblgt3.c
i915_oa_kblgt3.h
i915_oa_sklgt2.c
i915_oa_sklgt2.h
i915_oa_sklgt3.c
i915_oa_sklgt3.h
i915_oa_sklgt4.c
i915_oa_sklgt4.h
i915_params.c
i915_params.h
i915_pci.c
i915_perf.c proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
i915_pmu.c
i915_pmu.h
i915_priolist_types.h
i915_pvinfo.h
i915_query.c
i915_query.h
i915_reg.h
i915_request.c
i915_request.h
i915_scatterlist.c
i915_scatterlist.h
i915_scheduler_types.h
i915_scheduler.c
i915_scheduler.h
i915_selftest.h
i915_suspend.c
i915_sw_fence.c
i915_sw_fence.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c
i915_timeline_types.h
i915_timeline.c
i915_timeline.h
i915_trace_points.c
i915_trace.h
i915_user_extensions.c
i915_user_extensions.h
i915_utils.h
i915_vgpu.c
i915_vgpu.h
i915_vma.c
i915_vma.h
intel_csr.c
intel_csr.h
intel_device_info.c
intel_device_info.h
intel_drv.h
intel_guc_ads.c
intel_guc_ads.h
intel_guc_ct.c
intel_guc_ct.h
intel_guc_fw.c
intel_guc_fw.h
intel_guc_fwif.h
intel_guc_log.c
intel_guc_log.h
intel_guc_reg.h
intel_guc_submission.c
intel_guc_submission.h
intel_guc.c
intel_guc.h
intel_gvt.c
intel_gvt.h
intel_huc_fw.c
intel_huc_fw.h
intel_huc.c
intel_huc.h
intel_pm.c
intel_pm.h
intel_renderstate_gen6.c
intel_renderstate_gen7.c
intel_renderstate_gen8.c
intel_renderstate_gen9.c
intel_renderstate.h
intel_runtime_pm.c
intel_runtime_pm.h
intel_sideband.c
intel_sideband.h
intel_uc_fw.c
intel_uc_fw.h
intel_uc.c
intel_uc.h
intel_uncore.c
intel_uncore.h
intel_wakeref.c
intel_wakeref.h
intel_wopcm.c
intel_wopcm.h
Kconfig
Kconfig.debug
Kconfig.profile
Makefile drm/i915: Mark expected switch fall-throughs 2019-07-25 20:13:47 -05:00
Makefile.header-test