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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 74750C63697 for ; Thu, 26 Nov 2020 15:28:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C438221D7E for ; Thu, 26 Nov 2020 15:28:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C438221D7E 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=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 101F36B0078; Thu, 26 Nov 2020 10:28:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B5296B007B; Thu, 26 Nov 2020 10:28:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EBD1F6B007D; Thu, 26 Nov 2020 10:28:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0151.hostedemail.com [216.40.44.151]) by kanga.kvack.org (Postfix) with ESMTP id D52CE6B0078 for ; Thu, 26 Nov 2020 10:28:25 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 95CCC8249980 for ; Thu, 26 Nov 2020 15:28:25 +0000 (UTC) X-FDA: 77526950970.14.goose79_441087a27380 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 736A518229818 for ; Thu, 26 Nov 2020 15:28:25 +0000 (UTC) X-HE-Tag: goose79_441087a27380 X-Filterd-Recvd-Size: 8061 Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Nov 2020 15:28:24 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id 79so2156913otc.7 for ; Thu, 26 Nov 2020 07:28:24 -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=iZ6gEwk3lcuWJPO6YO8u2EsDGUcv2zMGwfYB+sHYkFXeDcIb5/93JetovBfxIvxpop LHAZicFpv6u981BTSiQUvavigLWKWV9bUH6UCYoUmHZYAtYfy8YKvaX5YyDeWEn2wWOB 9jhcL44gZjz8j5OScxI5Q0k2ajbNtdj/dKdrvdYX3oVFLzkJquydmYeDeiHDjRDZeNch wfS98wOp0pgMfhlEcE7xITV/aPdGzctxc6rA6p+Yqo1FSw+cmP/4hJyusqAzwBbbeI/v RuH+SOqbAPBwiWlC0SYe5IOFDQXfsk3W27el6SsSWq2B5fhspuxNdWXg0CwJtUYN5kyt PdPA== X-Gm-Message-State: AOAM530KaEGfWznGrJKTztfOtKX1OAg5OAhZknE/2jv5DiA/QjYz5QMV Akku9Ark/bahmiUZJPiSd8fZ0UoqYCxoAcvwQ+w= 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 Cc: Edward Cree , ALSA Development Mailing List , linux-atm-general@lists.sourceforge.net, reiserfs-devel@vger.kernel.org, linux-iio@vger.kernel.org, linux-wireless , Linux Fbdev development list , dri-devel , "Gustavo A. R. Silva" , 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, samba-technical@lists.samba.org, linux-i3c@lists.infradead.org, linux1394-devel@lists.sourceforge.net, linux-afs@lists.infradead.org, usb-storage@lists.one-eyed-alien.net, Lars Ellenberg , driverdevel , linux-cifs@vger.kernel.org, rds-devel@oss.oracle.com, Nick Desaulniers , scsi , Nathan Chancellor , linux-rdma , oss-drivers@netronome.com, bridge@lists.linux-foundation.org, linux-security-module , amd-gfx list , linux-stm32@st-md-mailman.stormreply.com, cluster-devel@redhat.com, ACPI Devel Maling List , coreteam@netfilter.org, intel-wired-lan@lists.osuosl.org, linux-input , Miguel Ojeda , Jakub Kicinski , Ext4 Developers List , Linux Media Mailing List , Kees Cook , selinux@vger.kernel.org, linux-arm-msm , Intel Graphics Development , linux-geode@lists.infradead.org, linux-can@vger.kernel.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, ceph-devel , virtualization@lists.linux-foundation.org, Linux ARM , linux-hwmon@vger.kernel.org, Linux Watchdog Mailing List , "open list:NFS, SUNRPC, AND..." , GR-Linux-NIC-Dev@marvell.com, tipc-discussion@lists.sourceforge.net, Linux-MM , Network Development , linux-decnet-user@lists.sourceforge.net, Linux MMC List , linux-kernel , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Linux-Renesas , linux-sctp@vger.kernel.org, USB list , NetFilter , Linux Crypto Mailing List , patches@opensource.cirrus.com, Joe Perches , linux-integrity , target-devel , linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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