]> git.baikalelectronics.ru Git - kernel.git/commit
drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI
authorJohn Stultz <john.stultz@linaro.org>
Wed, 29 Jan 2020 20:12:44 +0000 (20:12 +0000)
committerRob Clark <robdclark@chromium.org>
Tue, 11 Feb 2020 15:39:50 +0000 (07:39 -0800)
commita575e04c9959d928c218064fc67896dc7482d71c
treef9e631a276ac2fc54becb0f0c0a99a70d0a5929c
parent301e9d57064a7a60dd4d13b1b0cb43a3c92c1616
drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.

This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Todd Kjos <tkjos@google.com>
Cc: Alistair Delva <adelva@google.com>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: freedreno@lists.freedesktop.org
Cc: clang-built-linux@googlegroups.com
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/dsi/dsi_manager.c