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=-1.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 625AAC43381 for ; Thu, 21 Feb 2019 22:23:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 313352083B for ; Thu, 21 Feb 2019 22:23:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="jribNhnq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725891AbfBUWXe (ORCPT ); Thu, 21 Feb 2019 17:23:34 -0500 Received: from mail-ua1-f67.google.com ([209.85.222.67]:33377 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726685AbfBUWXd (ORCPT ); Thu, 21 Feb 2019 17:23:33 -0500 Received: by mail-ua1-f67.google.com with SMTP id q17so230645uam.0 for ; Thu, 21 Feb 2019 14:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0Tho6tIvUAYXamApnhuj/cUi3XD+QjFAtPYIAiUbXtI=; b=jribNhnqegu9qG91m4As5lZqDEGL7Duow2YEhm51aIDUM1n4ejizLIN230nxNTGUV3 WNuBmGxc0U3zfJ5RqfH+qscO5StQmvwdbWrsa/KQAspcpRnNAlk5itPT2kac+7RiylfP WmFlHD8fQWl+q+blAKtgBaE/bTqgrjEEfBUME= 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=0Tho6tIvUAYXamApnhuj/cUi3XD+QjFAtPYIAiUbXtI=; b=b8QZjfxASEB+tAghhLxMpggiPd9l5Ot8mEsDjRxbZY6JztnoSBZ7MdXeSzzZxt4G+A zBsawAZt0ZotFdrXx0tXAW6YBytDe3Kp6xXJU0Pxb+vVIc5etuvRhZbtZj9OBtsJHBe+ EKtrOil9ioRbFwp5U3+yDX5vq2W/EdTnYLlMHl2qmT/KLwaNhIXwF7thCVdhXRftQJd0 nxUusU2r0iBor6eTJoRJ7LNCnSKMzj8TAc0dnp16EUHVw3+3ba7WFLlWghXSxQlnpqZt iqh5OQoGSD5y+6dpiayD5eobYfZuqlsqn0ux6elCcnW0oOam56wmPBxI9EYFa3o8LVyR WbWg== X-Gm-Message-State: AHQUAuYb1X4VIdeCeruF6JOIbMPTlesDfpWn/vfdLntmuj4jV7ADM0VB +NhuKHFMryVe5/BQW6pjY7q7FFKUUec= X-Google-Smtp-Source: AHgI3IYSfZguwP0sE9d1E8EIVPyTT7fQZyKRSaZx2xsBnUDd3VAPyGIwquVxS64N1MjNj0XctyzF/A== X-Received: by 2002:a67:848c:: with SMTP id g134mr504221vsd.169.1550787811825; Thu, 21 Feb 2019 14:23:31 -0800 (PST) Received: from mail-vk1-f176.google.com (mail-vk1-f176.google.com. [209.85.221.176]) by smtp.gmail.com with ESMTPSA id j4sm235339vke.0.2019.02.21.14.23.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 14:23:30 -0800 (PST) Received: by mail-vk1-f176.google.com with SMTP id j68so43199vke.13 for ; Thu, 21 Feb 2019 14:23:30 -0800 (PST) X-Received: by 2002:a1f:58d:: with SMTP id 135mr582859vkf.4.1550787809973; Thu, 21 Feb 2019 14:23:29 -0800 (PST) MIME-Version: 1.0 References: <20190211181531.GA3238@embeddedor> <155027728836.115909.11546859472583324712@swboyd.mtv.corp.google.com> <155078541292.77512.12594007340364187685@swboyd.mtv.corp.google.com> In-Reply-To: <155078541292.77512.12594007340364187685@swboyd.mtv.corp.google.com> From: Kees Cook Date: Thu, 21 Feb 2019 14:23:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] clk: samsung: s3c2443: Mark expected switch fall-through To: Stephen Boyd Cc: Krzysztof Kozlowski , "Gustavo A. R. Silva" , Kukjin Kim , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Michael Turquette , linux-arm-kernel , "linux-samsung-soc@vger.kernel.org" , linux-clk@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org On Thu, Feb 21, 2019 at 1:43 PM Stephen Boyd wrote: > Ok, thanks for the background. Looks like the perf tool already > introduced the #define __fallthrough that they use for this purpose. > Maybe they're hoping that it will be formalized. Yeah, GCC has an extension for it (but it's not yet part of the C standard -- though there are open bugs against Clang to support it). Our adoption of the markings, thanks to Gustavo's work, has rapidly increased lately too (we started with something like 2400 instances and we were gaining about as many each cycle as we removed). 5.1, though, is closing in on _0_ instances. My thinking is that once we're to the point where we can globally enable -Wimplicit-fallthrough, then we can depend on the compiler to enforce this (instead continuing to depend on external tracking in Coverity and the like). It was a bit of a chicken-and-egg and I was afraid we were going to be left with this "partial adoption" for a long time. But we're nearly to the point where I would be happy doing a tree-wide replacement to __fallthrough (which should be mechanically easy). -- Kees Cook