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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 9210EC64E7B for ; Mon, 30 Nov 2020 16:04:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 1DE7F2073C for ; Mon, 30 Nov 2020 16:04:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="c3rhp/YH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DE7F2073C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 142FC1731; Mon, 30 Nov 2020 17:03:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 142FC1731 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1606752267; bh=GqCgS6S7wjFHVCpE6JwdgSvjboHDhTE3kbBruklwqHA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=c3rhp/YHSUFw/pphdhDchwwdiIwVD2NXPdnHPiK9uaJiwlVDOMwizHTUu1GYhlWKO 0Flmihv0jpjIgtN5dAYy1u7A/KaM6U7lQXNEmPnm5KbORC/fzH/tc1PgDB6P99MO7u I3aeDut3OIa5O+G0eEMnfMIlV6glyb/GhLAZ2O/M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6F003F8049C; Mon, 30 Nov 2020 17:02:46 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 19AB9F80165; Thu, 26 Nov 2020 16:28:35 +0100 (CET) Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E21EAF80159 for ; Thu, 26 Nov 2020 16:28:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E21EAF80159 Received: by mail-ot1-f66.google.com with SMTP id f16so2138888otl.11 for ; Thu, 26 Nov 2020 07:28:26 -0800 (PST) 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=kP9MspVOPl/NnVl8oGn1EIC/+F8CcK5+OXo+jY56Nno=; b=obmGgd7SWugJye4aIRE/5m2yBnUbeH46t7Melv40UrMlUiKqNtgWyWTppOguwNzsU3 FcOh51OquVsJ4Y0WTrJZL6KrWGvakRzhXCjTsdaoobWFdXy73M7VW5uorlwiVEk0No1Y xlHcMB2SYNiN1s8801KpA6TvXQ8gix+1Vt0M5aZbH7kWr231/+tlVMj9ep/9yzFOUyIC wXoVSrZS6avOBV1relQX2gGvep0rwgY0AGMO7sbTEdO60QsVmYMpvJLzoKYGCJDUH6Le +7CKWKMNUfMPofcHqP8eSjIQqmpkmNfCptZC/8IbFZcUXaz2/BVaTr3N3kO7K7ftPqkY 3ITA== X-Gm-Message-State: AOAM532gZx+BaSN7KjIMwsERbANkbR8G6jroE8/M0eNm7KZwIvmWbVDs 5+PE5h0rpFj6BCENSCUriwN99Z6bLMyp6JEPX4M= X-Google-Smtp-Source: ABdhPJyYtol6dSfaI6WhgTcuunq7fhBuSULViECyA4Z+K27bCejCuaia55DZ/aziu9dD69JTQZlYwW/4z6Mu7Di+rU4= X-Received: by 2002:a05:6830:210a:: with SMTP id i10mr2551843otc.145.1606404504116; Thu, 26 Nov 2020 07:28:24 -0800 (PST) MIME-Version: 1.0 References: <20201120105344.4345c14e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <202011201129.B13FDB3C@keescook> <20201120115142.292999b2@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <202011220816.8B6591A@keescook> <9b57fd4914b46f38d54087d75e072d6e947cb56d.camel@HansenPartnership.com> <1c7d7fde126bc0acf825766de64bf2f9b888f216.camel@HansenPartnership.com> <4993259d01a0064f8bb22770503490f9252f3659.camel@HansenPartnership.com> <44005bde-f6d4-5eaa-39b8-1a5efeedb2d3@gmail.com> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 26 Nov 2020 16:28:12 +0100 Message-ID: Subject: Re: [PATCH 000/141] Fix fall-through warnings for Clang To: Miguel Ojeda Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Mon, 30 Nov 2020 17:02:42 +0100 Cc: ALSA Development Mailing List , bridge@lists.linux-foundation.org, target-devel , linux-iio@vger.kernel.org, linux-wireless , Linux Fbdev development list , dri-devel , virtualization@lists.linux-foundation.org, James Bottomley , linux-ide@vger.kernel.org, dm-devel@redhat.com, keyrings@vger.kernel.org, MTD Maling List , GR-everest-linux-l2@marvell.com, wcn36xx@lists.infradead.org, linux-i3c@lists.infradead.org, linux1394-devel@lists.sourceforge.net, linux-afs@lists.infradead.org, Lars Ellenberg , driverdevel , linux-cifs@vger.kernel.org, rds-devel@oss.oracle.com, scsi , ACPI Devel Maling List , linux-rdma , oss-drivers@netronome.com, linux-atm-general@lists.sourceforge.net, ceph-devel , amd-gfx list , linux-stm32@st-md-mailman.stormreply.com, cluster-devel@redhat.com, usb-storage@lists.one-eyed-alien.net, Linux MMC List , coreteam@netfilter.org, intel-wired-lan@lists.osuosl.org, linux-input , Miguel Ojeda , Jakub Kicinski , Ext4 Developers List , NetFilter , Linux Media Mailing List , Kees Cook , selinux@vger.kernel.org, linux-arm-msm , Intel Graphics Development , linux-sctp@vger.kernel.org, reiserfs-devel@vger.kernel.org, linux-geode@lists.infradead.org, linux-block@vger.kernel.org, "open list:GPIO SUBSYSTEM" , op-tee@lists.trustedfirmware.org, linux-mediatek@lists.infradead.org, xen-devel@lists.xenproject.org, Nouveau Dev , linux-hams@vger.kernel.org, Nathan Chancellor , linux-can@vger.kernel.org, Linux ARM , linux-hwmon@vger.kernel.org, Nick Desaulniers , Linux Watchdog Mailing List , GR-Linux-NIC-Dev@marvell.com, Linux-MM , Network Development , linux-decnet-user@lists.sourceforge.net, samba-technical@lists.samba.org, "Gustavo A. R. Silva" , linux-kernel , Linux-Renesas , Edward Cree , linux-security-module , USB list , tipc-discussion@lists.sourceforge.net, Linux Crypto Mailing List , patches@opensource.cirrus.com, Joe Perches , linux-integrity , "open list:NFS, SUNRPC, AND..." , "maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" , linux-hardening@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi Miguel, On Thu, Nov 26, 2020 at 3:54 PM Miguel Ojeda wrote: > On Wed, Nov 25, 2020 at 11:44 PM Edward Cree wrote: > > To make the intent clear, you have to first be certain that you > > understand the intent; otherwise by adding either a break or a > > fallthrough to suppress the warning you are just destroying the > > information that "the intent of this code is unknown". > > If you don't know what the intent of your own code is, then you > *already* have a problem in your hands. The maintainer is not necessarily the owner/author of the code, and thus may not know the intent of the code. > > or does it flag up code > > that can be mindlessly "fixed" (in which case the warning is > > worthless)? Proponents in this thread seem to be trying to > > have it both ways. > > A warning is not worthless just because you can mindlessly fix it. > There are many counterexamples, e.g. many > checkpatch/lint/lang-format/indentation warnings, functional ones like > the `if (a = b)` warning... BTW, you cannot mindlessly fix the latter, as you cannot know if "(a == b)" or "((a = b))" was intended, without understanding the code (and the (possibly unavailable) data sheet, and the hardware, ...). P.S. So far I've stayed out of this thread, as I like it if the compiler flags possible mistakes. After all I was the one fixing new "may be used uninitialized" warnings thrown up by gcc-4.1, until (a bit later than) support for that compiler was removed... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds