Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp651630rwi; Thu, 20 Oct 2022 03:38:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5i0AXiJztpkmbZjfoaNvIZgHLSzjd8HyQbxrYiJ3bo2P9gjNrDxBKoP6aEtebUXTRqtoEv X-Received: by 2002:a17:90b:1c8e:b0:205:783b:fe32 with SMTP id oo14-20020a17090b1c8e00b00205783bfe32mr52268249pjb.39.1666262333099; Thu, 20 Oct 2022 03:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666262333; cv=none; d=google.com; s=arc-20160816; b=W5kbi4X5r5covR1RYDlOkx1vnNJWUThYFNZMNPmyyqsI9ZzWEzfqCYuao/fjLyndW2 ctLm3W/YGhrH2nZG5ZuHLsOQZOzDvp1V0XlhK1VRHbTOnRgrTd/YDvb8nVDrgjeadrKT uhYk/vR/2bEQo3mpUn1PkQYvSEqQJu0Ni4fmI/vXvifiQmeGD7vXEGzYzlzxBdNtxhEm hKzGi7jkXAAkzrOS7BiNyUHthjflwhtcjjXObLrnYnQI8+h213hEyVd51phfY6XrJKnY FksH7eYEa/GwukWDXKabBAB397ok7+UTHl3wUi5TiRw/gQiNBZDhVr4OR3nVW2nMP1zz 6x5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XhF3JOtQYfHH+wxEtk0StdarzXzauAFpZWILZnAzqoE=; b=cUFRPs5wcBxhoPEYmNWVURynLr2If8JF3Kjnq7HqHiK3AagjHegrhCzOAXUCReNpG+ tYdIYgWeI+4dTJYyQKIevO/oofVOHFC8kQSC7vFoV5jDsu4sMPrpfybRrbkdIACRwhuS ApPrz4dbgx97QNDbxjfc3ssUZOZEZhzzPRcU+8WBL4l9RWIjaesZBU4XvCCfcIKt3GUP Hi0a/FHmK6MINJnIz3BrSZVzaQB5TZ1oeoRphZkTSaM1lyO7PJfv1XuRN8hN7GKx8m9i ftqwWuh9ucgYMQHb9ag7Vw1D36Q2WNkZgTsaUx4sHpCboryl1oBVPt9MgST77/a1BEG3 tUVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=Mif79EZL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a170902db0100b00184306292a5si20628193plx.229.2022.10.20.03.38.40; Thu, 20 Oct 2022 03:38:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=Mif79EZL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229973AbiJTKfo (ORCPT + 99 others); Thu, 20 Oct 2022 06:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbiJTKfm (ORCPT ); Thu, 20 Oct 2022 06:35:42 -0400 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ED024B0C4 for ; Thu, 20 Oct 2022 03:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1666262125; bh=VhN67bXT0itmKjXgVI45C2R1vHjRepe0Kb9Pi+xEtqQ=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=Mif79EZLoeznCgQ0lXr1SVfFtqssM1xVfL4aplIsnm4ziVIdnBoNLWftuGLRblNYM HdWWBqOwgbaTp2FuEKMosZoSLhCbuI+wuN4fZVkItD3jJia/O/w7bVBzKW3weDHdXo xEWbdQVqJqxmVpArES10HSImc1NEvooCN9MGDUpM= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via [213.182.55.206] Thu, 20 Oct 2022 12:35:25 +0200 (CEST) X-EA-Auth: 3fqsQwinURa5yNBDG3ytptSeV5h8uXROphmeEhi6S4t+vud9l8NgbbMmBkXc5IAaXX1mjKyMlnqBLwgLXF2aLKXcNYG6g8YK Date: Thu, 20 Oct 2022 16:05:19 +0530 From: Deepak R Varma To: Julia Lawall Cc: outreachy@lists.linux.dev, Larry.Finger@lwfinger.net, phil@philpotter.co.uk, paskripkin@gmail.com, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, kumarpraveen@linux.microsoft.com, saurabh.truth@gmail.com Subject: Re: [PATCH v3 06/10] staging: r8188eu: Add space between function & macro parameters Message-ID: References: <79e0aa96b1c8b2bc0c0f8ef9e651ab254629c7a8.1666249716.git.drv@mailo.com> <114d7521-a15-9569-cb38-69f4bb8990f7@inria.fr> <8e7c457c-a58a-9c2a-ba0-d520c5e0f53e@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e7c457c-a58a-9c2a-ba0-d520c5e0f53e@inria.fr> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 20, 2022 at 12:21:35PM +0200, Julia Lawall wrote: > > > > -#define PlatformEFIOWrite1Byte(_a,_b,_c) \ > > > > - rtw_write8(_a,_b,_c) > > > > -#define PlatformEFIOWrite2Byte(_a,_b,_c) \ > > > > - rtw_write16(_a,_b,_c) > > > > -#define PlatformEFIOWrite4Byte(_a,_b,_c) \ > > > > - rtw_write32(_a,_b,_c) > > > > - > > > > -#define PlatformEFIORead1Byte(_a,_b) \ > > > > - rtw_read8(_a,_b) > > > > -#define PlatformEFIORead2Byte(_a,_b) \ > > > > - rtw_read16(_a,_b) > > > > -#define PlatformEFIORead4Byte(_a,_b) \ > > > > - rtw_read32(_a,_b) > > > > +#define PlatformEFIOWrite1Byte(_a, _b, _c) \ > > > > + rtw_write8(_a, _b, _c) > > > > +#define PlatformEFIOWrite2Byte(_a, _b, _c) \ > > > > + rtw_write16(_a, _b, _c) > > > > +#define PlatformEFIOWrite4Byte(_a, _b, _c) \ > > > > + rtw_write32(_a, _b, _c) > > > > + > > > > +#define PlatformEFIORead1Byte(_a, _b) \ > > > > + rtw_read8(_a, _b) > > > > +#define PlatformEFIORead2Byte(_a, _b) \ > > > > + rtw_read16(_a, _b) > > > > +#define PlatformEFIORead4Byte(_a, _b) \ > > > > + rtw_read32(_a, _b) > > > > > > Could these be inline functions? > > > > I am actually not seeing these macros being used anywhere. These macros were > > added recently [commit ID: 7884fc0a1473c2721f496f1d1ddc9d2c91aefa53] in 2021. I > > am unsure if they are intended to be used in the future or can removed entirely. > > > > Making these inline functions can be done, however, will we need to measure > > performance impact? I will need help and time for this evaluation. > > Inline functions shouldn't have any performance impact. For these simple > things the compiler should inline them. Understood. For these simple cases, it should not. > > The reason why a macro may be needed is if it is not possible to find a > single type for all of the possible argument values, or if some argument > values are assigned to by the macro definition, and not just read. Okay. This is helpful. Thank you. > > I would have suggested to look at all of the uses to see if there are any > concerns like this, but if there aren't any uses, that won't be possible. > There seems to be no special knowledge in these macros that is worth > preserving, so I think that they can just be dropped. Sounds good. I will drop them in the revision. Thank you Julia. ./drv > > julia >