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=-18.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 18BA8C3E8C5 for ; Sun, 29 Nov 2020 17:09:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4E882080C for ; Sun, 29 Nov 2020 17:09:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZaMizYOK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728107AbgK2RIv (ORCPT ); Sun, 29 Nov 2020 12:08:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:47095 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727894AbgK2RIu (ORCPT ); Sun, 29 Nov 2020 12:08:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606669644; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TyjVqTa6NUPGToY9p6hor+b7VRN4ayK0LceC/nKvy/8=; b=ZaMizYOKNep+3m0+JUy15Qlo+z9EzAS09CUQmKsD+V8Agd0EHH5xwOqfBe+3aaxHeThgV0 nLbpexWPFphZYxTAcLuOcbhWuIlSy0ASiwl4wRTbCb7VFMdkeV6gdjKeLJ5y+G0BMelcX4 plnSHaf/1gJ2lzfvL837PV0GY7oKbcs= 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-570-UTYlZ0WLN9OAs9bzcG8fMQ-1; Sun, 29 Nov 2020 12:07:22 -0500 X-MC-Unique: UTYlZ0WLN9OAs9bzcG8fMQ-1 Received: by mail-qt1-f197.google.com with SMTP id i14so6701352qtq.18 for ; Sun, 29 Nov 2020 09:07:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=TyjVqTa6NUPGToY9p6hor+b7VRN4ayK0LceC/nKvy/8=; b=LPS4G2/ibPhL4ni/J0rH7Mg0/LlF2HC4GjZet7e0etWZ5QA4KOBqFKgVy2O/ASmgab YF5eEdJ+XlnTjGBlvOYHhReL8NX2jbRxSUNJn3nAVjk1YNRuJRgu7ii0yzP2G50AnBeD kuCqTcztAj8eVwPD6MCQtPOWMV25PAva7pR9oY4K6FeypKj9J3sXKCyaD2MrxmSBDM88 eWY7L4viJhZPwd3ZHlbkxpwKL+5JxHf1oDU3owvWMXFToBlU7qGfUjd/iO0kjw+Eltwh 0SxBKEU3W0c1XnIdAa0aYmUi4WYm+Mt2EUh000c+ZaYdNiP00Rjb+z1zDlnOFNOpV2YG CuoA== X-Gm-Message-State: AOAM532g4cMttbhBkYrV6TIFWGJ7yQWsUy0foP8SIqABtGJVffBlgGmd Hu6s7YjzaPj1SWtQzVf2Zo8LuBOdODceXGfNNpRigJQg4+jqX0bAnOR0xHxg0q6FydfmAiwHLQW 19R1AhD0btpBJBFQCYiVbM5rdzdwKspT4KVJidwiWhFujC3+F92geWPUvYTPL9lHSYdC+KUA= X-Received: by 2002:ac8:6b92:: with SMTP id z18mr17731429qts.30.1606669641915; Sun, 29 Nov 2020 09:07:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcKPSJbIDZTeENhugPtBcfNSXqYBW9nMvLxq75Tw/YbveHMS/XqeAavLpXoiwr+j9jZP/yKQ== X-Received: by 2002:ac8:6b92:: with SMTP id z18mr17731398qts.30.1606669641579; Sun, 29 Nov 2020 09:07:21 -0800 (PST) Received: from trix.remote.csb (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id r125sm12970308qke.129.2020.11.29.09.07.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Nov 2020 09:07:21 -0800 (PST) Subject: Re: [PATCH] NFS: remove trailing semicolon in macro definition To: Trond Myklebust , "bfields@fieldses.org" , "davem@davemloft.net" , "kuba@kernel.org" , "anna.schumaker@netapp.com" , "chuck.lever@oracle.com" Cc: "linux-nfs@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20201127194325.2881566-1-trix@redhat.com> <96657eff83195fba1762cb046b3f15d337e5daad.camel@hammerspace.com> <110444322a9c301c520c1e57e9a6f02b29ad25c1.camel@hammerspace.com> From: Tom Rix Message-ID: <4805ce94-b522-b774-031c-7091b7ac7c5e@redhat.com> Date: Sun, 29 Nov 2020 09:07:19 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <110444322a9c301c520c1e57e9a6f02b29ad25c1.camel@hammerspace.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/20 8:50 AM, Trond Myklebust wrote: > On Sun, 2020-11-29 at 16:42 +0000, Trond Myklebust wrote: >> Hi Tom, >> >> On Fri, 2020-11-27 at 11:43 -0800, trix@redhat.com wrote: >>> From: Tom Rix >>> >>> The macro use will already have a semicolon. >>> >>> Signed-off-by: Tom Rix >>> --- >>>  net/sunrpc/auth_gss/gss_generic_token.c | 2 +- >>>  1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/net/sunrpc/auth_gss/gss_generic_token.c >>> b/net/sunrpc/auth_gss/gss_generic_token.c >>> index fe97f3106536..9ae22d797390 100644 >>> --- a/net/sunrpc/auth_gss/gss_generic_token.c >>> +++ b/net/sunrpc/auth_gss/gss_generic_token.c >>> @@ -46,7 +46,7 @@ >>>  /* TWRITE_STR from gssapiP_generic.h */ >>>  #define TWRITE_STR(ptr, str, len) \ >>>         memcpy((ptr), (char *) (str), (len)); \ >>> -       (ptr) += (len); >>> +       (ptr) += (len) >>>   >>>  /* XXXX this code currently makes the assumption that a mech oid >>> will >>>     never be longer than 127 bytes.  This assumption is not >>> inherent >>> in >> There is exactly 1 use of this macro in the code AFAICS. Can we >> please >> just get rid of it, and make the code trivially easier to read? >> > > BTW: To illustrate just how obfuscating this kind of macro can be, note > that the line you are changing above will be completely optimised away > in the 1 use case we're talking about. It is bumping a pointer value > that immediately gets discarded. Yes, I agree. I was wondering about expanding treewide, all the single shot macros defined/used in c files. other fixers that cleanup unused variables would remove the unneeded expansions like this one.