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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 B4813C63697 for ; Thu, 26 Nov 2020 16:18:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 012DE221E9 for ; Thu, 26 Nov 2020 16:18:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GLzdL7tY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 012DE221E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 21A346B0074; Thu, 26 Nov 2020 11:18:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A5CF6B0075; Thu, 26 Nov 2020 11:18:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01D6C6B0078; Thu, 26 Nov 2020 11:18:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0143.hostedemail.com [216.40.44.143]) by kanga.kvack.org (Postfix) with ESMTP id D8F8F6B0074 for ; Thu, 26 Nov 2020 11:18:35 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9DD94181AEF32 for ; Thu, 26 Nov 2020 16:18:35 +0000 (UTC) X-FDA: 77527077390.11.jump54_5c0e02b27380 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 785FC180F8B81 for ; Thu, 26 Nov 2020 16:18:35 +0000 (UTC) X-HE-Tag: jump54_5c0e02b27380 X-Filterd-Recvd-Size: 9827 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Nov 2020 16:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606407513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IL7sPB68gF1YeWIUFuBJ//YIBDjI3bDL6qHHKubt/Z0=; b=GLzdL7tYVKsmBk/Y84/z/jKYmkKh/RT/tk9tQbNmWx4PQXRq+ryN0m57ZnqmTFUj2gjQo3 MsnKsrfIG82+n4lSHkT7qVk8n5yK+I7LnXhQZiHNnxBT8nHlgQkMvHPXdDBJZDBaq9Y5gb VZgtQSt/g4VlFYurkHCXqSF+bIfnbdA= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-450-8UGXZk4FM26YsmI2ug32bQ-1; Thu, 26 Nov 2020 11:18:25 -0500 X-MC-Unique: 8UGXZk4FM26YsmI2ug32bQ-1 Received: by mail-qt1-f197.google.com with SMTP id i20so1507604qtr.0 for ; Thu, 26 Nov 2020 08:18:25 -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=IL7sPB68gF1YeWIUFuBJ//YIBDjI3bDL6qHHKubt/Z0=; b=fvVeOXouRi+xNVzqbMzwpSHR7Fg4sfOsjtCe1VsuAwO70u5lJ9IiRaclIRxWvPVS8h sjGYJhXUfEmGfuN5KvuobcZaH7CnyWSxLr6uwqBEYrIkLtJIo8yAYuTim8MgeDw+Ynz/ 2AA46VGzWS0m4Cz8RC/5YxXYnpHqOsd10o88uixz+iyiZwGYDoTqLPWMB4dxfujqdpYL 0qHfOwy7TCnxo1i9mFjyi67OHeSr6nIa5ziuFZhAJa6dcWzYR37+G6hnWbAg0Aq1F3wt HLRdU9Og8si1L1+v6wJ+tc9FyC7DUbuXmGwLNGz13xd00JcsWGxcANs3zyy1HznbWasG p1Kw== X-Gm-Message-State: AOAM530mYITxkHDnBXoEoFF7MQ5mo0upUtdTM6pnyimuw1gQIyTSP9Jh O3h8GMLeWteLYoJgXRvhxnOpIhbfMczQaGy1JuhzjH03VmbtQ2zjfVWGSFzHZOha70jFWIIyzxh 0xMDwuflzIm2p0rfmfGQzqejCndQ= X-Received: by 2002:a37:ac8:: with SMTP id 191mr3793993qkk.381.1606407505092; Thu, 26 Nov 2020 08:18:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCU4CKAolN2PpaYdMoKCHma/+NC3lHjkQkQkRPTWC20j3rANbYTTy+FG9V7n634RRlgf0kcsxPjR4LO+NB5fA= X-Received: by 2002:a37:ac8:: with SMTP id 191mr3793888qkk.381.1606407504531; Thu, 26 Nov 2020 08:18: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: Karol Herbst Date: Thu, 26 Nov 2020 17:18:13 +0100 Message-ID: Subject: Re: [PATCH 000/141] Fix fall-through warnings for Clang To: Geert Uytterhoeven Cc: Miguel Ojeda , ALSA Development Mailing List , bridge@lists.linux-foundation.org, target-devel , linux-iio@vger.kernel.org, linux-wireless , Linux MMC List , 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, 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kherbst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: On Thu, Nov 26, 2020 at 4:28 PM Geert Uytterhoeven wrote: > > 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, ...). > to allow assignments in if statements was clearly a mistake and if you need outside information to understand the code, your code is the issue already. > 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 > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel >