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.7 required=3.0 tests=BAYES_00, 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 6B733C63697 for ; Thu, 26 Nov 2020 15:28:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B05A221FC for ; Thu, 26 Nov 2020 15:28:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391348AbgKZP2d (ORCPT ); Thu, 26 Nov 2020 10:28:33 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:39601 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730237AbgKZP21 (ORCPT ); Thu, 26 Nov 2020 10:28:27 -0500 Received: by mail-ot1-f65.google.com with SMTP id z24so2172944oto.6; 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=O5lB09TE7ZVoxFrz9jEzoB2CxBaKGu4DfPIKinbX7K3Z9YjWsAZuwpmZCb063hbcml dK6VczxxuljyVvzYk+qi2g3J+dUAo/TP5DSIvXSrQzH4ZIWKpyJKV69WKVmUFQWGTk59 HyRyiaz1876USvHOZ7GaFoLxWcyv3avFWcLMFaTeGPv7olYKncnMLKuAAt3+0OJxxYPH DQ25HwL4uMCDIv2MjSAHnWl//kshswom5NK5IvDfZJsIj1yf3jRSCD8P5C21dgNs/Nin KmqrQIgPSTec2jqEzDtGzUMRKKqN0dEVt8W9sTXLxApcT9uMeXWDswIixp6PUrfvH6Cm vXZg== X-Gm-Message-State: AOAM5330+/EQ2iKUbotH3l4ZJ+wA3zzJimNEYAc6ksGY5yzOLOtVINtM celE5FwFxauIAoq+Eo6qiYHUpEL51OVNGgVS74k= 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" Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org 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