Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1947967ybz; Sat, 18 Apr 2020 11:55:38 -0700 (PDT) X-Google-Smtp-Source: APiQypLWrTyYMNx9XJ4VB2yaHYsiJ5/gxLUFET0yY0yCCJUdxKCbkrSSTep9DVoaElHeoky76uZO X-Received: by 2002:aa7:cd6a:: with SMTP id ca10mr8062552edb.332.1587236138125; Sat, 18 Apr 2020 11:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587236138; cv=none; d=google.com; s=arc-20160816; b=san/+FFQoHCJQVOMEdVIoQ0c4SumMyhdWigcbgVeNIQB2U2B+WXqk09pSnivwoPaH7 B1Ly75qADSh3ms9p+KHwHjZYvwbKBgfpmreoOppnLO5V1rbvXhocebNWJ9HD4X5vL0RN XsAbwQAiqVa+Sa/bZgAiCfL3rJG2KsQxunOb786ZgMNXQ4YvPuDM00ps87Gyq0lcIp67 Q1lzJ4yyBMbGiyj26bfhcIgvZdu53kWcrsLavZjmIXbbcCYu0kXTcwZNpGxkkpWnsvj3 MlBrtCq4XCDj2FAD2bZXjY7BrnxYAfAJqiS/uV4KK1yJHddMhEOfQImnnNdkgnRjXJZE ElPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pJRI8oZ6j+rGEg2+OCymOS7794uvyRZcSR2Htjt5TI4=; b=AR/2HQCe5cWCkT8ES6B9XXvhYfuGtX2UnuoECFbRTARBSV1057Hj/nPxC/p8Nb9HTO Udbm9rJch/ZtK7xbSn6FPK18KHQSzETxxadVOL77DPAuWMCxBhuc9AjFIVcnfkN+7BRG NfOi525Roxhl80tRyu+sqre4W6ASPIGrQc2xzxNU5bgVMO3mHjLzpLAzzLvMs+/7+13g mV5NSsB47n3xPAkIIW8VllJY07vtHww1WazTnNES/UlB8rggDnG7e31Ntx9jqlEZGfpy rC+wnpr2H+7V+UzbwYMU9Mvq39zRmPpKEGAhB5L+bL29jaIMjDcnddKH7zdmq90a0rb6 Gmfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Dab8X2Ct; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si10405594edl.93.2020.04.18.11.55.14; Sat, 18 Apr 2020 11:55:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Dab8X2Ct; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728130AbgDRSx0 (ORCPT + 99 others); Sat, 18 Apr 2020 14:53:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728144AbgDRSxZ (ORCPT ); Sat, 18 Apr 2020 14:53:25 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F2EC061A0C for ; Sat, 18 Apr 2020 11:53:24 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id u6so5558577ljl.6 for ; Sat, 18 Apr 2020 11:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pJRI8oZ6j+rGEg2+OCymOS7794uvyRZcSR2Htjt5TI4=; b=Dab8X2CtWipiSivi9nyLxp8nBHQpWedKwzW35yNj8kBU3VxCHrB+3Kn5U3rtIjeKoA Lw3k/ndceMaBnN8HktM5POukz2zYdQKxOk+s6N6D5bBob3ys4IoAy4L7IIPc1NiF89LI qpPs2HFFi+SoqSVPJ7yi1QNfgGKP7Teiklti0= 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=pJRI8oZ6j+rGEg2+OCymOS7794uvyRZcSR2Htjt5TI4=; b=tCsZBn2YakoftdfY9PK+DAl7bldSPQVwkxe5LXedI4lXhruQ4btWGvqFkaTaJx30Fj Oorg8Z8t9HyXYVhR1IpB8Yn5as6AJgtGCOaa6UDK3skDfdA1RtN7gRv2qCC7kfKevuMx 3s2IhdBQ7LJErLBOparhYPd65pdegETWGF2wNDiYfzEfK+KrUfdaNeaJBhOXPbw1HaCS 6ZyMNQPfIa8Jad+BHMER6JOEL5mA1xGOeGgiQb+DJJ1JIWNbeHjTErxZ+7KsJP4UC/dP KUi83SX501dWD6IMsbER+IoiAqk0IRiDQ+DcUQLTwn35bqbNUxb/wSDdzzAaJNafoMNr xcOA== X-Gm-Message-State: AGi0PuYN+wF7pLeeE+B+4BKSssoMnZkTZtYBHxlNvkqvGMvy1IlUFF5f 9GlSLoTze42MwqS+JZnujP+o/LpdfUY= X-Received: by 2002:a2e:7301:: with SMTP id o1mr208374ljc.264.1587236001311; Sat, 18 Apr 2020 11:53:21 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id k11sm21176458lfe.44.2020.04.18.11.53.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Apr 2020 11:53:19 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id x23so4587764lfq.1 for ; Sat, 18 Apr 2020 11:53:19 -0700 (PDT) X-Received: by 2002:a05:6512:405:: with SMTP id u5mr5483360lfk.192.1587235998911; Sat, 18 Apr 2020 11:53:18 -0700 (PDT) MIME-Version: 1.0 References: <20200418184111.13401-1-rdunlap@infradead.org> <20200418184111.13401-3-rdunlap@infradead.org> In-Reply-To: <20200418184111.13401-3-rdunlap@infradead.org> From: Linus Torvalds Date: Sat, 18 Apr 2020 11:53:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/9] fs: fix empty-body warning in posix_acl.c To: Randy Dunlap Cc: Linux Kernel Mailing List , Andrew Morton , Alexander Viro , linux-fsdevel , Dmitry Torokhov , linux-input@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, "J. Bruce Fields" , Chuck Lever , "open list:NFS, SUNRPC, AND..." , Johannes Berg , Dan Williams , Vishal Verma , Dave Jiang , linux-nvdimm , "Martin K. Petersen" , linux-scsi , target-devel , Zzy Wysm Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sat, Apr 18, 2020 at 11:41 AM Randy Dunlap wrote: > > Fix gcc empty-body warning when -Wextra is used: Please don't do this. First off, "do_empty()" adds nothing but confusion. Now it syntactically looks like it does something, and it's a new pattern to everybody. I've never seen it before. Secondly, even if we were to do this, then the patch would be wrong: > if (cmpxchg(p, ACL_NOT_CACHED, sentinel) != ACL_NOT_CACHED) > - /* fall through */ ; > + do_empty(); /* fall through */ That comment made little sense before, but it makes _no_ sense now. What fall-through? I'm guessing it meant to say "nothing", and somebody was confused. With "do_empty()", it's even more confusing. Thirdly, there's a *reason* why "-Wextra" isn't used. The warnings enabled by -Wextra are usually complete garbage, and trying to fix them often makes the code worse. Exactly like here. Linus