Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1252266imm; Wed, 20 Jun 2018 14:28:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLRQDQt545C2b0rRW1KwmMI9yJzfsK3RJjx+sEf3fIelNceg6J4TauJfeNTDdAM4DdoX5IP X-Received: by 2002:a17:902:9004:: with SMTP id a4-v6mr25641613plp.143.1529530089150; Wed, 20 Jun 2018 14:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529530089; cv=none; d=google.com; s=arc-20160816; b=Moqn6c1rRwapsX8Act8lIjLIbv2BnYuLYYq9BNMALMLLoeABkD3xZsM5L5PXPY5eJV xdt8IlfV9lTqnv/F7InhmVxl/dq+NxCPAqhPMaIcikxMM0tCWNX9Rd+gR5MIA9cDgxOk XzBI0hT+a6aaku2pujBhu6jcZuI62QVRXQf+vMkY7cjLWNS+Ut3FiT9RdczK1ycwhCIz 1yHlNUjarXkwZxbOSnzZYDmr8UqM+CK2PkCeBozWKrmUdQr98oSd8sosUnk9BvF8VTtB wpMrAcqAXpsNM5+DMz1Dojdw1Kp1Sk5pXff8MNOjr3STfGIzWy3vWWm/tDslvA2yIJw5 JORg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=f/xjjBGQvx+cMBICAKXK5qaC6JFuAJnnu+nlsAbyvm8=; b=Is3QF3VCeMPKhBpRLL/q98HI/R8QcSzIps49RqsS8+ItiC7l8JcLgPGfaarrt4Kp3V a6Dt+BGNl6aXzS1gZUu+/8D/a0C173OpCvH+XchUf7Wi8Dk0viB1vOswM/azcOd3oq+A 1NTEAFByWsd0OBUgJVhvgKE2gFrUCYjxumAr7XJeec5dpq89wLjEmuHeWEGsFsscwiIm oBJnxTn8mF2iRG9z8ewISgemLLndCjbGD25igyiAv4pauVD/Z+6k6931bcPxVi6GPZ3n 5ogOxWk84YmNO7izQU06J19qXcMghiXLFIOe0AfaRezTPA+HBC5d04rrSmIiga26JeAo xKvQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si3216471ple.417.2018.06.20.14.27.54; Wed, 20 Jun 2018 14:28:09 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933370AbeFTV1R (ORCPT + 99 others); Wed, 20 Jun 2018 17:27:17 -0400 Received: from gateway23.websitewelcome.com ([192.185.49.179]:47920 "EHLO gateway23.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933115AbeFTV1Q (ORCPT ); Wed, 20 Jun 2018 17:27:16 -0400 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 551F111B04 for ; Wed, 20 Jun 2018 16:27:15 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id VkdEf6qBebXuJVkdFfJY8f; Wed, 20 Jun 2018 16:27:14 -0500 X-Authority-Reason: nr=8 Received: from [189.250.65.56] (port=58076 helo=[192.168.1.71]) by gator4166.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fVkdD-004HA4-Qt; Wed, 20 Jun 2018 16:27:11 -0500 Subject: Re: [Intel-gfx] [PATCH] drm/i915: mark expected switch fall-through To: Rodrigo Vivi Cc: Jani Nikula , Joonas Lahtinen , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20180620133100.GA608@embeddedor.com> <20180620190628.GC8258@intel.com> From: "Gustavo A. R. Silva" Message-ID: <26740470-d7b7-0a58-0aae-fc628bd4f416@embeddedor.com> Date: Wed, 20 Jun 2018 16:27:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180620190628.GC8258@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.250.65.56 X-Source-L: No X-Exim-ID: 1fVkdD-004HA4-Qt X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.1.71]) [189.250.65.56]:58076 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 6 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/20/2018 02:06 PM, Rodrigo Vivi wrote: > On Wed, Jun 20, 2018 at 08:31:00AM -0500, Gustavo A. R. Silva wrote: >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> Addresses-Coverity-ID: 1470102 ("Missing break in switch") > > Any other advantage besides coverity? > Can't we address it by marking as "Intentional" on the tool? > Yes. The advantage of this is that it will eventually allows to enable -Wimplicit-fallthrough, hence, enabling the compiler to trigger a warning, which will force us to double check if we are actually missing a break before committing the code. The change in the code has nothing to do with the Coverity tool. The tool is only reporting the issue, which, in this case, is a false positive. > I'm afraid there will be so many more places to add fallthrough > marks.... > Oh yeah, there are around 1000 similar places in the whole codebase. There is an ongoing effort to review each case. Months ago, it used to be around 1500 of these cases. Thanks -- Gustavo >> Signed-off-by: Gustavo A. R. Silva >> --- >> drivers/gpu/drm/i915/intel_dpll_mgr.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c >> index 132fe63..6a40a77 100644 >> --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c >> +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c >> @@ -2566,6 +2566,7 @@ int icl_calc_dp_combo_pll_link(struct drm_i915_private *dev_priv, >> switch (index) { >> default: >> MISSING_CASE(index); >> + /* fall through */ >> case 0: >> link_clock = 540000; >> break; >> -- >> 2.7.4 >> >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx