From patchwork Wed Jan 29 20:12:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 183005 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1038861ile; Wed, 29 Jan 2020 12:12:57 -0800 (PST) X-Received: by 2002:a17:902:b611:: with SMTP id b17mr1087601pls.23.1580328777239; Wed, 29 Jan 2020 12:12:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580328777; cv=none; d=google.com; s=arc-20160816; b=Iiw2sy42VnuZC38Rh8Dc2SzDWqtVaDwU8x18Di/xPp/qWdi/UbZabjk58dnMapkmQd 2/AtnJ3AXY4WkvJimr/EuCSGnZ3dov5PHD95rUtnomCcSShkARzHGQ4TB0ARbOrxhT+B rKTioGajV5qxDHXjqftMfPkCPBuBxd1IJBsFvliiYHTxL5QhkLgmcfnx+WWhQn6B8jQ6 M3F6sGxYOB+LeN9xqr/1B9fjltyGUmJTxOKa9Mh54Feqfi1oICNYQgfIZ6aCIvecAJl+ NI0L7qkKR13ZBCAUqlsnDDbVgCW9/uLiw0l8kZp4JUmV2oeRWMjYZnln17+1B9X89wkm hA6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=1QswzSwNt0nlyMcQUYRWMFVYAypouu+MHGAuWWfmqtk=; b=DTMP+iYazudTMX0bF7cU9kvfx+03J0/BWf5CmjflDEJAhvGvTixLnDRh5eZo0FAx9h xFepy0oJSN9sc8MPBAYk28M1/eULLUxbR9AonL0UMxhy8Lt/PwOPPteB6DKKemLks/9/ V4l7AsVSqMDexMDW6Va2JYSbGsYyjkx1Rq2I+JekqPVNnSzO9TAoZB1MFEsVEulstjpj AdJZEsrgyCe0vg9f4g922URtHKrWtDHpuP4Iv6xWeNsNzP0VKXlbM38QoDfvAOq/hlub 7csmDIjgEBv6q+ZsbdARJkZQTVDMZbiAoicbkoH8RDjxeG0nGlgZuQ13S0NaQTZKye4p AASg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MSOBMFCy; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id ep22sor3532872pjb.20.2020.01.29.12.12.57 for (Google Transport Security); Wed, 29 Jan 2020 12:12:57 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MSOBMFCy; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=1QswzSwNt0nlyMcQUYRWMFVYAypouu+MHGAuWWfmqtk=; b=MSOBMFCy5z0AIk4r4x2LexiNYBLUyY17LlY2VaTcGY9fRU4R4MY7JGNCNsZxBQtecM o+YprV/1np+j6I4TM4iRLm0Ef7rpjUqhyVDKvPrTYGBJpnSoHdykLXRLlQkKHieL567w /KKJwwgb1So2O9S3ti8aIKcv7G8H9VjpKoBG0gwpxYL/+IyDtDvqYqrpYeqRYOdCQGyF MiTy/auwSgZMlmGf0WWU9PLqm4WLs29fM7krmQcn/o6/48gDbVx2OxB10T3UjhcfxbvT Ts7mJSisq/ALk24BNhJJyOdWxKm1vjJ0XcVOXFgm6F3uOEFQ/1oUy5b9g+CfL15Va7Lp NMGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1QswzSwNt0nlyMcQUYRWMFVYAypouu+MHGAuWWfmqtk=; b=tJl7E6A2kYxWHqK6TF/w6VndxpDQHQ/JReKwgzjms0C3U4KH4EaxSf+ICD0Tr6n7NO 3u9Jd1uCBtiL//4OI9akbQ8fPDydhNT1CapBulaiGfvph+GeJwVRJZyLWOjBY2sgKK51 /CATw9ZIoBgEn5wjJ6C1gNfIMXfXiBClmhgH8wVe3h/P3mOlGxnsqAokpvZLQ7Qqh71n ry2VV0CTOTKbqyXaa4lZNESN1gcv8wBYnmTRJoY8ovTm95EzC5/4VraRdnfoz7GtiRKl lmFaQQF8xqJqx8zl7Yv+TYZpE+wnCwnmh+wAyjatRpISyGoKekV/X7WAnU9Pypc0pci9 jyIQ== X-Gm-Message-State: APjAAAWFinamzCYCmMUrcL4ND8xBml6iEgBeq2vAeFoABLP2FOfGvt2n n00iDW0Ml6OycuKqbsTmTR6Lu3Sm X-Google-Smtp-Source: APXvYqzDagHxMneZm7dwEMu6DvKBueB5ddpfamAzb0TZ1FKo76qqnLtLzsJ+83Uu7ouIws4qJCdIlg== X-Received: by 2002:a17:90a:9285:: with SMTP id n5mr1629941pjo.58.1580328776641; Wed, 29 Jan 2020 12:12:56 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id i11sm3579727pjg.0.2020.01.29.12.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jan 2020 12:12:51 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Rob Clark , Sean Paul , Sami Tolvanen , Todd Kjos , Alistair Delva , Amit Pundir , Sumit Semwal , freedreno@lists.freedesktop.org, clang-built-linux@googlegroups.com Subject: [PATCH] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI Date: Wed, 29 Jan 2020 20:12:44 +0000 Message-Id: <20200129201244.65261-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 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 Cc: Sean Paul Cc: Sami Tolvanen Cc: Todd Kjos Cc: Alistair Delva Cc: Amit Pundir Cc: Sumit Semwal Cc: freedreno@lists.freedesktop.org Cc: clang-built-linux@googlegroups.com Signed-off-by: John Stultz --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index 271aa7bbca925..355a60b4a536f 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -336,7 +336,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector *connector) return num; } -static int dsi_mgr_connector_mode_valid(struct drm_connector *connector, +static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { int id = dsi_mgr_connector_get_id(connector);