Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp937157ybl; Wed, 29 Jan 2020 12:17:46 -0800 (PST) X-Google-Smtp-Source: APXvYqyPEfSUKxUjAYL5VV9+Ma/e7iP2XqQki8zu9XaDScgETyJk9ntS1yN8r9tLBjNNkUO4oStd X-Received: by 2002:aca:c5ca:: with SMTP id v193mr491822oif.77.1580329066358; Wed, 29 Jan 2020 12:17:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580329066; cv=none; d=google.com; s=arc-20160816; b=q694pVQsSRlDXvdl5FTY8Os09vcZknQ73ztfkawkin7tIFmqebh+QSRKpf5tSS0dvb Bd/+ce01rpaCjDUKORUblXMQU4WOU4gEoUZH18Kvv8aPN2SQHXXqBk11gWV8Ts8sht2c yf5ObPm7aeX3Wn01Jmp8a7sZf4tdtyRrWuAC7stckSQU9VcK0lEfWF2Ys7mMDheGjmUA p1FTLRgWgGefLJrt6eodE89USgukdf4mnS49c4ozPVszKHcOZSrPuQ5WjWngDo3QPmZd QmmEligkZZJxPVqUgziWUil5/GmqB1x76A7KXSOcB3srEywXNiSNSaG5/V/YRSene3Zf /SeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=1QswzSwNt0nlyMcQUYRWMFVYAypouu+MHGAuWWfmqtk=; b=lzR0amn/JRzoX5nFN71hAxktbf+fxZ9dKnqrkm4IP3a5WoOqdRk+iU4T28LXId/Rcz kBnQUzwY0+AnI39eoQj3cZXL0BMK8U3DKgvEIIpWLAewbzRt19kE43Pxs3YSCn0tZljx /MxsUzwn3ssDXvVosu+kCGN5XXC1FVZrBhk27AIkMQW6AKOYa/mO3HdHfmHrjrGMCJfl UwHj84xF4UMfoZJfmeclywQee3gT4FwkjNqdyXRa04zEW3ilqqMwj0bET0vEtrZb9AYC zXGngFcn3MkYNVG7N2jR0QdfIbi8MNmmp72amOXPvT6fQOwdH8H5xN2sl0+NRJDRNglY PIyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MSOBMFCy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n203si1424962oia.112.2020.01.29.12.17.34; Wed, 29 Jan 2020 12:17:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MSOBMFCy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727188AbgA2UM6 (ORCPT + 99 others); Wed, 29 Jan 2020 15:12:58 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:55648 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726245AbgA2UM5 (ORCPT ); Wed, 29 Jan 2020 15:12:57 -0500 Received: by mail-pj1-f68.google.com with SMTP id d5so266939pjz.5 for ; Wed, 29 Jan 2020 12:12:57 -0800 (PST) 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=pPWzSbTBwb92Ma/nXOBV/xu+NR56OgpS1524MJBUqySUbASCM6VO/JN/QC/eOIItnO eOqHnAmlCqzdenSJFs3aWj56500N8OR+Eed3Rq1lHfc3ArEq9JY9BHIbHkuKGbYMUAqf h17kMbPyurBkfoiSDsH+HICTPVDGOW1KTO8dTGHfg1Wk4MMmFDLjH5lBwRqT50L85oFu MUF1wYOxXfV75ZQvKED7WLzS1ovnxi+pDZERBUAt3VsPlX9OHNmbfIpymlf62+Uk48B/ 9uUWeExHAzdDIJyiWxyHzCVa/Uw9PVGK/119mxTHrdgrYLULNEgklySN7mpYZJICW3gK hsIg== X-Gm-Message-State: APjAAAWi5sEIeW0097y9alq/rhkEFVZDNYlGpNdVZR1Z73zacE64j0cD 7otRTHB3jqVdcglFnRmP1EiKsClYN7U= X-Received: by 2002:a17:90a:9285:: with SMTP id n5mr1629941pjo.58.1580328776641; Wed, 29 Jan 2020 12:12:56 -0800 (PST) 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) 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); -- 2.17.1