Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp909699ybl; Fri, 31 Jan 2020 10:10:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwoqpXSkokqYh/HLqXOKxQZux1C/nXcFW+PlAHRX5arAk+Pdvt9LANw5BhUcZNdlJv1Z2eR X-Received: by 2002:a05:6830:13d3:: with SMTP id e19mr8646765otq.135.1580494256900; Fri, 31 Jan 2020 10:10:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580494256; cv=none; d=google.com; s=arc-20160816; b=FPK2rkF0cU/+6HOvNj1I0VAnhr6KZy6X9Zmxam+JCBl0HFMCXvGa46Dhh8OEvN+zTD P+qgA+DkjzGgUPHRXpxITFMo26+mjhdI9/THGmTdOWXPEjdTXmq1XgPiRFlJnZee1uA/ zl3VxJfmdPjCOfzwIY8ODQXtEtA4xAPccgItObIvTwjYaS8mc2oPHaAqbOHn7lGaix+4 jaeUm2VoVX+xWMBBHiPgsJLoHOp6Ri9jVE9GsnSg1SNriG1WP6aAYPNQI2kXBdCC0rRf 0UhXwzq+VzUI84Yh6sRRo7wjsDEG01bJIVM4gIRjZKAwGofBaxIWfdut9aXPqe/GbKPK i8Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kYOKSEFF1BtF9aJwHzx6v8WXqAWKyMBvX++xdlfE4d8=; b=0woDILwlmuuZl+buJCmUOKZAB4sdPugsh6+XwTeqBj9b5SnRVvfBYJ0z5EWnlh9Zt6 iGgaOQtUT6ml7+Nc4qzHc/Su5ndjcOKn+lEvc6zIgthFmdOOchEKTK4o1nR62aqQjhBk JH/KhTGDqyadEPogD9F33R6zZwVmr6ltO0mL2PWpQVaWIFc92AgF8EOj72Ej+OmC2tNS qI/JXIANNJlbdP7ioxBPOQ8j8pTmfeOtY/FPwRdErWMbj31ZiukldLCY/NbzVoUSOjlO ZXpNU7natTMqlU/rh5hUx08dHUg4+XJULbtjigbWS8jcXAkSmI0AV+nrq5S7qRxonlds INJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iYSfoyHT; 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 s11si4612503otd.245.2020.01.31.10.10.44; Fri, 31 Jan 2020 10:10:56 -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=iYSfoyHT; 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 S1727197AbgAaSIf (ORCPT + 99 others); Fri, 31 Jan 2020 13:08:35 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51836 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbgAaSIf (ORCPT ); Fri, 31 Jan 2020 13:08:35 -0500 Received: by mail-wm1-f68.google.com with SMTP id t23so8981063wmi.1 for ; Fri, 31 Jan 2020 10:08:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kYOKSEFF1BtF9aJwHzx6v8WXqAWKyMBvX++xdlfE4d8=; b=iYSfoyHTsGlXKZ4IO0n64y0Xqn7f8PjxKdcCYPDJWYitw/g6eGxDn3V5rE/Xe8Ktla vYUmCX3I5mkCkzLmizMb67m/NdRR8sV/C9hZTZ0vHD/UfetrAh0lC3OGmXy2jUwobG9B Lw5eMdV0NCU7UAYlEhmwrE47UkhqC/PBGJkUSmJHsyJNkunH4eja/PlkCQccI8kaxO5q 8HC+SngAl3zd2bWqaGlKv2k2h3/nFk7FO93xsxEdBhkDOth6tBP0ohNkeYK24ENkXBav 8XTCNb/UW9j/06AdAD1hFtSfBACG9prcTAk/s3SkTNbNKV0fqlHKWLLJIL+JtGVL1wzH Dpew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kYOKSEFF1BtF9aJwHzx6v8WXqAWKyMBvX++xdlfE4d8=; b=sw9R8Y0CRtVUmiT4ETyK38gCZtAyhH04yKA1oM5IEcG7vT3Csuoi8g0RWvzpgc/+XT Yr1+pEzAlt1r9q+R3YhldW1SmjwH7ctavoixXagOO4OrTehnEArkFQfo5AD7Wzm+7RmU Dv09nyTmNt29K7l00tpmeAoaD1WN3o3Clr31Lvk+Cwhu/PjEjvxYOYwb37+gsd8rKyvs xUCi/fE1KR/P0UiVOw2gR0BwPOeuL1TPIR+ro0SK0qqSRG6mrLDdvkUDCPH4FY35H34+ DfxmT6m0cZ8XUbNm55CkwTeTR4TwaItJ4lkgKAIFoeaZm+o/hne09T2SFHmAimjCuvCN ru3A== X-Gm-Message-State: APjAAAVpYHasHQWi3Ii9ca9t7Z111jo3PyyP7eiaqwFoKKKzFDtEQThT WnehgGkljo5UhwDPeh2KctIKwcNBLdSqx12gAUHgPw== X-Received: by 2002:a7b:c94a:: with SMTP id i10mr13239142wml.88.1580494113721; Fri, 31 Jan 2020 10:08:33 -0800 (PST) MIME-Version: 1.0 References: <20200129201244.65261-1-john.stultz@linaro.org> In-Reply-To: <20200129201244.65261-1-john.stultz@linaro.org> From: Amit Pundir Date: Fri, 31 Jan 2020 23:37:57 +0530 Message-ID: Subject: Re: [PATCH] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI To: John Stultz Cc: lkml , Rob Clark , Sean Paul , Sami Tolvanen , Todd Kjos , Alistair Delva , Sumit Semwal , freedreno@lists.freedesktop.org, clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 30 Jan 2020 at 01:42, John Stultz wrote: > > 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 Tested-by: Amit Pundir Cc: stable@vger.kernel.org # v4.4+ > --- > 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 >