From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27AE8C433E0 for ; Sun, 7 Feb 2021 05:18:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BDBA064E37 for ; Sun, 7 Feb 2021 05:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229562AbhBGFSm (ORCPT ); Sun, 7 Feb 2021 00:18:42 -0500 Received: from smtprelay0028.hostedemail.com ([216.40.44.28]:54954 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229510AbhBGFSk (ORCPT ); Sun, 7 Feb 2021 00:18:40 -0500 X-Greylist: delayed 662 seconds by postgrey-1.27 at vger.kernel.org; Sun, 07 Feb 2021 00:18:40 EST Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave01.hostedemail.com (Postfix) with ESMTP id 9EF161813C177 for ; Sun, 7 Feb 2021 05:07:40 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id A2B6A837F24A; Sun, 7 Feb 2021 05:06:57 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: hat01_1d0aa7e275f3 X-Filterd-Recvd-Size: 3113 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf17.hostedemail.com (Postfix) with ESMTPA; Sun, 7 Feb 2021 05:06:55 +0000 (UTC) Message-ID: <8943f0acd2944144b21b5796c07e79ff5e707aaf.camel@perches.com> Subject: Re: [PATCH] drm/msm/dp: Add a missing semi-colon From: Joe Perches To: Stephen Boyd , Rob Clark , Andrew Morton Cc: linux-kernel@vger.kernel.org, Sean Paul , Kuogee Hsieh , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Lee Jones Date: Sat, 06 Feb 2021 21:06:54 -0800 In-Reply-To: <20210207041858.3317171-1-swboyd@chromium.org> References: <20210207041858.3317171-1-swboyd@chromium.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Sat, 2021-02-06 at 20:18 -0800, Stephen Boyd wrote: > A missing semicolon here causes my external display to stop working. > Indeed, missing the semicolon on the return statement leads to > dp_panel_update_tu_timings() not existing because the compiler thinks > it's part of the return statement of a void function, so it must not be > important. > >   $ ./scripts/bloat-o-meter before.o after.o >   add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140) >   Function old new delta >   dp_panel_update_tu_timings - 7400 +7400 >   _dp_ctrl_calc_tu.constprop 18024 17900 -124 >   dp_panel_update_tu_timings.constprop 7416 - -7416 >   Total: Before=54440, After=54300, chg -0.26% > > Add a semicolon so this function works like it used to. [] > diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c [] > @@ -631,7 +631,7 @@ static void _dp_ctrl_calc_tu(struct dp_tu_calc_input *in, >   > >   tu = kzalloc(sizeof(*tu), GFP_KERNEL); >   if (!tu) > - return > + return; >   > >   dp_panel_update_tu_timings(in, tu); Wow, that's really unfortunate that dp_panel_update_tu_timings is also void. Perhaps this as YA checkpatch warning: --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9a549b009d2f..6df13e5a1557 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3674,6 +3674,12 @@ sub process { } } +# check only a c90 keyword on the line (except else) + if ($sline =~ /^\+\s*($c90_Keywords)\s*$/ && $1 ne 'else') { + WARN("BARE_KEYWORD", + "'$1' as the only word on a line is not good style\n" . $herecurr); + } + # check multi-line statement indentation matches previous line if ($perl_version_ok && $prevline =~ /^\+([ \t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declare\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|(?:\*\s*)*$Lval\s*=\s*$Ident\s*)\(.*(\&\&|\|\||,)\s*$/) { From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2A9EC433E0 for ; Sun, 7 Feb 2021 05:07:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EE8764E31 for ; Sun, 7 Feb 2021 05:07:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EE8764E31 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F90E6E56D; Sun, 7 Feb 2021 05:07:00 +0000 (UTC) Received: from smtprelay.hostedemail.com (smtprelay0102.hostedemail.com [216.40.44.102]) by gabe.freedesktop.org (Postfix) with ESMTPS id BB72589E98 for ; Sun, 7 Feb 2021 05:06:58 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id A2B6A837F24A; Sun, 7 Feb 2021 05:06:57 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: hat01_1d0aa7e275f3 X-Filterd-Recvd-Size: 3113 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf17.hostedemail.com (Postfix) with ESMTPA; Sun, 7 Feb 2021 05:06:55 +0000 (UTC) Message-ID: <8943f0acd2944144b21b5796c07e79ff5e707aaf.camel@perches.com> Subject: Re: [PATCH] drm/msm/dp: Add a missing semi-colon From: Joe Perches To: Stephen Boyd , Rob Clark , Andrew Morton Date: Sat, 06 Feb 2021 21:06:54 -0800 In-Reply-To: <20210207041858.3317171-1-swboyd@chromium.org> References: <20210207041858.3317171-1-swboyd@chromium.org> User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Paul , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Kuogee Hsieh , Lee Jones , freedreno@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sat, 2021-02-06 at 20:18 -0800, Stephen Boyd wrote: > A missing semicolon here causes my external display to stop working. > Indeed, missing the semicolon on the return statement leads to > dp_panel_update_tu_timings() not existing because the compiler thinks > it's part of the return statement of a void function, so it must not be > important. > = > =A0=A0$ ./scripts/bloat-o-meter before.o after.o > =A0=A0add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140) > =A0=A0Function old new delta > =A0=A0dp_panel_update_tu_timings - 7400 +7400 > =A0=A0_dp_ctrl_calc_tu.constprop 18024 17900 -124 > =A0=A0dp_panel_update_tu_timings.constprop 7416 - -7416 > =A0=A0Total: Before=3D54440, After=3D54300, chg -0.26% > = > Add a semicolon so this function works like it used to. [] > diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp= _ctrl.c [] > @@ -631,7 +631,7 @@ static void _dp_ctrl_calc_tu(struct dp_tu_calc_input = *in, > =A0 > = > =A0 tu =3D kzalloc(sizeof(*tu), GFP_KERNEL); > =A0 if (!tu) > - return > + return; > =A0 > = > =A0 dp_panel_update_tu_timings(in, tu); Wow, that's really unfortunate that dp_panel_update_tu_timings is also void. Perhaps this as YA checkpatch warning: --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9a549b009d2f..6df13e5a1557 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3674,6 +3674,12 @@ sub process { } } = +# check only a c90 keyword on the line (except else) + if ($sline =3D~ /^\+\s*($c90_Keywords)\s*$/ && $1 ne 'else') { + WARN("BARE_KEYWORD", + "'$1' as the only word on a line is not good style\n" . $herecurr); + } + # check multi-line statement indentation matches previous line if ($perl_version_ok && $prevline =3D~ /^\+([ \t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declar= e\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|(?:\*\s*)*$Lval\s*=3D\s*$Ident\s*= )\(.*(\&\&|\|\||,)\s*$/) { _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel