Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2951310pxu; Sun, 29 Nov 2020 09:57:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRJLCdUMNE9ca4qdw3n42MWeCXwpuLhV/JljBpl1c53Gms+wrNACEXli1/wOym+OxC7WdY X-Received: by 2002:a05:6402:143a:: with SMTP id c26mr17149335edx.131.1606672649269; Sun, 29 Nov 2020 09:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606672649; cv=none; d=google.com; s=arc-20160816; b=popgbcUKN97rBO+YhDCveiy++lBRcZxTqfME6MTMHEK8nv65oGVffrwGcgElyQGFXT QTnpV8e69If3lvxAeNatKTLxE95HNtK3xrAeNcHJlLiL84ml72NheeuKVmM9hqHj1NJq Ffm/5BwkeO1Q/3yO6YFkV7+qtkXM29nnyHhWJNE32iQGApql+gyhCt1fPjJwb4gC50Ik U6Dh65s0vBSdXAiU6EG0aLM3fP6v2uaw3ULp+5HAmc6qC4ckX0DpCkRLKLDWxjUITj9R BKaq4kvwRIrO3Uoco+UH4GcR2oN4OqVMnJc88U7qyPQJaWweRVnRz0x8ijv1b7zIzqMz KzXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=lNgu9uRNWqB+M0CUH3J+/Co9o/FaXY3esWLjyE5cLxc=; b=tlBd5xk9dzQpIvky1kXX7UwsSJzZTjnHnYX2YOUKbeYBmouSeZQyctjIYEaVRUZmlH t4io1RmoY+cDU0VCYjsxIOzhKDEk2nfJDgPO4A6ZzP1ZiwckKljTrmkHHTu5lGpqhIeZ xdolPL6XH/F/LFhw0KM3mbZkg0mBjXwUX/hs8ejFzbRCHQeH5ZK/c8YecMmiLhOz8VH5 4wLIrB+F3KDHjPXlAwJjO3pEIPNZuhGDa9LpecJHwM8+rE0190GlSlufAMFmNpn17iSY 36rSbaCn33SN/VbeF5iM9BYqw8AzoLx2W6LH+olvRPZPLnYzyXz5etvTGrBd93gaMTGM ZHQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=oP07S+ZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 x20si7931108ejb.165.2020.11.29.09.57.05; Sun, 29 Nov 2020 09:57:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@infradead.org header.s=merlin.20170209 header.b=oP07S+ZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728008AbgK2Rxm (ORCPT + 99 others); Sun, 29 Nov 2020 12:53:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgK2Rxl (ORCPT ); Sun, 29 Nov 2020 12:53:41 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96972C0613CF; Sun, 29 Nov 2020 09:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=lNgu9uRNWqB+M0CUH3J+/Co9o/FaXY3esWLjyE5cLxc=; b=oP07S+ZMNVqcL4QeqGLJLlGHj5 8mUp5LmGty73c+/g7wICExPGIQyrYU8OHItItlPaIHwiMG7htw/Z1TZNZA0t7n/+pepgHm/oQCW+I pPLw45WdzaFUzBLXMEl6AB9w863ynJEdE6HthP02io48eIYLM18UmD8JvTo/xrZ0rnasIyGfiluYN xXlr3IDm22DUWwBZxj6Cz5Xzf0TDW2mgyqUAMba7igFCE7+gIFMqCQvGRcoVOd0YCHSp6z/X3k0aI xhgW4KsV6q8p11FOLTx9LXEHe0f7BdFMIsGPmBHt4jmUIzZCk5WYlNPdcU9GO50l43Fl/2752y+X9 AXFAD6WA==; Received: from [2601:1c0:6280:3f0::cc1f] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjQsc-0004wD-EM; Sun, 29 Nov 2020 17:52:58 +0000 Subject: Re: [PATCH] locks: remove trailing semicolon in macro definition To: Tom Rix , Matthew Wilcox Cc: jlayton@kernel.org, bfields@fieldses.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201127190707.2844580-1-trix@redhat.com> <20201127195323.GZ4327@casper.infradead.org> <8e7c0d56-64f3-d0b6-c1cf-9f285c59f169@redhat.com> From: Randy Dunlap Message-ID: Date: Sun, 29 Nov 2020 09:52:53 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <8e7c0d56-64f3-d0b6-c1cf-9f285c59f169@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/20 9:47 AM, Tom Rix wrote: > > On 11/27/20 11:53 AM, Matthew Wilcox wrote: >> On Fri, Nov 27, 2020 at 11:07:07AM -0800, trix@redhat.com wrote: >>> +++ b/fs/fcntl.c >>> @@ -526,7 +526,7 @@ SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, >>> (dst)->l_whence = (src)->l_whence; \ >>> (dst)->l_start = (src)->l_start; \ >>> (dst)->l_len = (src)->l_len; \ >>> - (dst)->l_pid = (src)->l_pid; >>> + (dst)->l_pid = (src)->l_pid >> This should be wrapped in a do { } while (0). >> >> Look, this warning is clearly great at finding smelly code, but the >> fixes being generated to shut up the warning are low quality. >> > Multiline macros not following the do {} while (0) pattern are likely a larger problem. > > I'll take a look. Could it become a static inline function instead? or that might expand its scope too much? -- ~Randy