Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1256688yba; Tue, 2 Apr 2019 05:41:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyu2VgZPCUxP8Ten9UxHKgGL98UirW/28LKmY2EEIqx8N5wguNEjda29T1oWkxR7KgHUE1z X-Received: by 2002:a17:902:be04:: with SMTP id r4mr56506229pls.218.1554208883817; Tue, 02 Apr 2019 05:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554208883; cv=none; d=google.com; s=arc-20160816; b=04xsGInumrwdbDHKkd8YptnWYV5fi9J9J+wQukJnNMCYm627JrmGqOZ92/WZFo2/I3 z78LYH4rHNAcxp+uYAeOKhhDwJlUJWkYykof8z7Vw2iRFAIpvmztewSsWx+wCKAEJTzD zL4wKlsFY+v41lMccOMZQR3OX/hpg+I/VjU9hMu2VspCRTX8+EsqCUBe4ISGrtg3OltB vnKOxFY1GC9o4O23DALZ0CiHQttbBEOEk/Ga87QgocNyyyoGI+gHieLMVm1bo/CuoP1N qPpKyMpBaTPjGjhRHlB1T3qKhotdK/4FpIRhRJzCV0ifzLjqZzTP/ZJCJV8Jb+kdNhBf MYLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kWyrdA+e0IDvWFoIrO685H534W28Tpr5rPmoYVOXhJc=; b=QjCM6B8DSfwudr8UgXLegLDbBFXkmXX0sx0h9T6fyHXF2yKM8Q4aCnRY4A32hrwe/u a7fazfWGAYnqDhI8sviemDDORfxTJvI4xXxdf/XC47YyhCkyduxeAKmAzf74lVdnhJL2 LNzTkts1ggBjAaZqTxyR9VpbeZQ1nZWn752OHFHWb+BU5eamGIr5l9jsp1vEGLSletai oqQUPEQywh2MpHCtQRgBy+xV1ZpXiJlqo4skmPCCqaVmbS/Xwc7IXA4fCBoq6KDXcXK1 0ai4nEuFenhUIYicsuBxFzbhdVnpY3zFRK+5Vo4pEyOf/VU/21UnQTbNLmMmOHqrL7fg lppw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tomli.me header.s=1490979754 header.b=vvgl8u3b; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tomli.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l127si11325484pfl.2.2019.04.02.05.41.08; Tue, 02 Apr 2019 05:41:23 -0700 (PDT) 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=@tomli.me header.s=1490979754 header.b=vvgl8u3b; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tomli.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729197AbfDBMjE (ORCPT + 99 others); Tue, 2 Apr 2019 08:39:04 -0400 Received: from tomli.me ([153.92.126.73]:33510 "EHLO tomli.me" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfDBMjE (ORCPT ); Tue, 2 Apr 2019 08:39:04 -0400 Received: from tomli.me (localhost [127.0.0.1]) by tomli.me (OpenSMTPD) with ESMTP id b6f569d2; Tue, 2 Apr 2019 12:39:00 +0000 (UTC) X-HELO: localhost.localdomain Authentication-Results: tomli.me; auth=pass (login) smtp.auth=tomli Received: from Unknown (HELO localhost.localdomain) (2402:f000:1:1501:200:5efe:ddd9:ae88) by tomli.me (qpsmtpd/0.95) with ESMTPSA (DHE-RSA-CHACHA20-POLY1305 encrypted); Tue, 02 Apr 2019 12:39:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tomli.me; h=date:from:to:cc:subject:message-id:references:mime-version:content-type:in-reply-to; s=1490979754; bh=4XBSMbqz8X+fsl/Txp8qZiRU0vX7ODPdDo4Mjh3qeEs=; b=vvgl8u3bmFwZC8QDdl6ozeboNMJOlVqSiAX3zYpiXmGMEaWPMmXBami73LMufVrEam22617+3Zp2yAbRRZ88XlHm0NxV0u8uvLwBjaCBlpKKv1pu8ftuBKmAu6N04rSh12WKzcPDp/lVvJGs4hjXRneRc5QxhSOdv41jE9nJU1ZkcD6khnUhqjBj7aKmKHE4pTkR6j4DTFxfRR1iblJYOCtT1GrDdWJmnEeCXZOTz+hVtceNZMyuej3kxuBhbhejJ9fosEeSem7GHwRgb/g457ousKT5DVrDO3B4rbbGyYOlFoFMHOT5GdN7LKeGaonNLiJGQPijFb+tnaQocNXoxQ== Date: Tue, 2 Apr 2019 20:38:50 +0800 From: Tom Li To: Bartlomiej Zolnierkiewicz , Sudip Mukherjee Cc: Linux Next Mailing List , Linux Kernel Mailing List , Yifeng Li , "Gustavo A. R. Silva" , Kees Cook , linux-fbdev@vger.kernel.org Subject: Re: linux-next: build warning after merge of the fbdev tree Message-ID: <20190402123849.GA4562@localhost.localdomain> References: <20190402093007.0b03b02e@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190402093007.0b03b02e@canb.auug.org.au> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 02, 2019 at 09:30:07AM +1100, Stephen Rothwell wrote: > Hi Bartlomiej, > > After merging the fbdev tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > drivers/video/fbdev/sm712fb.c: In function 'smtc_blank': > drivers/video/fbdev/sm712fb.c:900:4: warning: this statement may fall through [-Wimplicit-fallthrough=] > smtc_seqw(0x6b, 0x02); > ^~~~~~~~~~~~~~~~~~~~~ > drivers/video/fbdev/sm712fb.c:901:3: note: here > case 0x720: > ^~~~ > > Introduced by commit > > f627caf55b8e ("fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting") > Nice catch! Thanks! This bug was introduced by me while attempting to fix another issue, a result of my copy-paste error. Since it only reprograms the clock to a different frequency, it's only a benign issue without visible side-effect, so it also evaded Sudip Mukherjee's code review and regression tests. But what's I'm more concerned here is the failure of scripts/checkpatch.pl. I thought ./checkpatch.pl should have caught it, but for some reasons it cannot detect this one. $ ./scripts/checkpatch.pl 0001-fbdev-sm712fb-fix-crashes-and-garbled-display-during.patch total: 0 errors, 0 warnings, 105 lines checked So I mistakenly assumed the patch doesn't have a problem... It seems checkpatch.pl cannot detect fallthroughs in nested switch/case statements? I'm not sure. Should I report it to the maintainers of checkpatch.pl? Anyway, please apply the following patch ASAP. Thanks, Tom Li From 040fa4e6cc8b338cd845c11fd3efd7394ca55108 Mon Sep 17 00:00:00 2001 From: Yifeng Li Date: Tue, 2 Apr 2019 20:25:20 +0800 Subject: [PATCH] fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough. A fallthrough in switch/case was introduced in f627caf55b8e ("fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting"), due to my copy-paste error, which would cause the memory clock frequency for SM720 to be programmed to SM712. Since it only reprograms the clock to a different frequency, it's only a benign issue without visible side-effect, so it also evaded Sudip Mukherjee's code review and regression tests. scripts/checkpatch.pl also failed to discover the issue, possibly due to nested switch statements. This issue was found by Stephen Rothwell by building linux-next with -Wimplicit-fallthrough. Reported-by: Stephen Rothwell Fixes: f627caf55b8e ("fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting") Signed-off-by: Yifeng Li --- drivers/video/fbdev/sm712fb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index 1e2503b52c6f..f1dcc6766d1e 100644 --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -898,6 +898,7 @@ static int smtc_blank(int blank_mode, struct fb_info *info) case 0x712: smtc_seqw(0x6a, 0x16); smtc_seqw(0x6b, 0x02); + break; case 0x720: smtc_seqw(0x6a, 0x0d); smtc_seqw(0x6b, 0x02); -- 2.20.1