Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp687133rdh; Thu, 26 Oct 2023 12:47:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEahAe9gR/2NiqDZdnvpNeogSJDSXUav4IwkWj3leY+t7CXVA/6iErp09PESQ7c0JHE72uK X-Received: by 2002:a81:ad43:0:b0:5a8:1767:1fef with SMTP id l3-20020a81ad43000000b005a817671fefmr1379161ywk.9.1698349621900; Thu, 26 Oct 2023 12:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698349621; cv=none; d=google.com; s=arc-20160816; b=bTiYHH0wwobRcfRpPxkZNsnqb4lLj9m/i4cbQrm3eOLK6QLrEVw/cF2kEVz0IN0w0q GMVTB9KBcv4+1UjFmLOGj1YroEOxA95E0rEunZX6KqaDUqrhDltLLAl/fWM7eO6PDH5a YZVYMR/LF5eljNTb3RspexaHTrs/5ouIUD6r3+RdrAeQur1iL9h6+mMxJKkOEm47oY/g 4XRs+hkM6lT/Mlsgr8yJGjj/tqGD9wXbc0+S/3YRG3V2AYzAxSzUAWSq1Ko5iHIwgHZs ap1+VGWRZnY7tWALgjHknIYCT8dtQv953cyotKj9/N73qhx63VV3IAyQQlYFc/tZSMyS y78Q== 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=iSmsri1S5YsHLGyRgvyYOQUdppxAE4tSQENMgUEYJTk=; fh=IySK1NIJxFwSBQYGQ2CFWH64uB2XfVAq41B6jTCSVbQ=; b=djamnFvAa62HRShv0TM9kKOK3ilR1/9+a+ggiOmBxFd301wcyp4GYyPcPcThDalAJ5 6+l5YLbcyCLaN47tBcKGKyME74v9DcPOmOXOgxJdWfm9Ec42/wl/KNUyXooBPQCWftKY gI/PilKAUe7YpJI6c0VdHfQYb782iIF40DLyVk0lWzvPZw6wyDJxp2W8rM7HW0w9fPrA YeM2gM2wQ6OX8zFrWOiNqjUwi3mjO1mYaqemGNvr3vqKGkxJqlXYgM27Fg6GcN1A3P5O qbca0+kVUi6rmYDXZXcliJLUqJ68T669v8eNgpxpKqHjC8IvioWzjIeQotZ+xJ7c6k6v hgeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Lj49dNdx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h189-20020a8153c6000000b0058b5ea07fe1si131ywb.360.2023.10.26.12.47.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 12:47:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Lj49dNdx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 882678239E88; Thu, 26 Oct 2023 12:47:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231962AbjJZTq4 (ORCPT + 99 others); Thu, 26 Oct 2023 15:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231810AbjJZTqy (ORCPT ); Thu, 26 Oct 2023 15:46:54 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EBFD1B2; Thu, 26 Oct 2023 12:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=iSmsri1S5YsHLGyRgvyYOQUdppxAE4tSQENMgUEYJTk=; b=Lj49dNdxL88asba/4AQ4/rbxuB uiYG0+vP8JAHgjyRrAg489KvzAsLU2SAuEWnT1oUtY3l5TamzP9W+KdNMmxSeG1Gbjnevz/rKhWiP /L7/mcm++PhmfdHdlU+oRqttclmche12Z9/GXbNVQAKzGUJwavfbd1CNNzfuYNNuY0gQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qw6JQ-000HAX-D9; Thu, 26 Oct 2023 21:46:36 +0200 Date: Thu, 26 Oct 2023 21:46:36 +0200 From: Andrew Lunn To: Parthiban.Veerasooran@microchip.com Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, corbet@lwn.net, Steen.Hegelund@microchip.com, rdunlap@infradead.org, horms@kernel.org, casper.casan@gmail.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Horatiu.Vultur@microchip.com, Woojung.Huh@microchip.com, Nicolas.Ferre@microchip.com, UNGLinuxDriver@microchip.com, Thorsten.Kummermehr@microchip.com Subject: Re: [PATCH net-next v2 1/9] net: ethernet: implement OPEN Alliance control transaction interface Message-ID: <3c7a04a3-4ae2-4f83-b7bf-0db75f58f5be@lunn.ch> References: <20231023154649.45931-1-Parthiban.Veerasooran@microchip.com> <20231023154649.45931-2-Parthiban.Veerasooran@microchip.com> <8430c607-4a62-47fc-9c13-9ba17cf09679@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8430c607-4a62-47fc-9c13-9ba17cf09679@microchip.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 12:47:00 -0700 (PDT) > Still if you feel like using "write" instead of "wnr" and "protect" > instead of "prote", I will change them in the next revision. There is some value in using names from the standard, if they are actually good names. But i guess most developers don't have a copy of the standard by there side. You actually wrote in the patch: +/* Control header */ +#define CTRL_HDR_DNC BIT(31) /* Data-Not-Control */ +#define CTRL_HDR_HDRB BIT(30) /* Received Header Bad */ +#define CTRL_HDR_WNR BIT(29) /* Write-Not-Read */ +#define CTRL_HDR_AID BIT(28) /* Address Increment Disable */ +#define CTRL_HDR_MMS GENMASK(27, 24) /* Memory Map Selector */ The comments suggest you also don't think the names are particularly good, otherwise you would not of added comments. But if you instead had: /* Control header */ #define CTRL_HDR_DATA_NOT_CTRL BIT(31) #define CTRL_HDR_HDR_RX_BAD BIT(30) #define CTRL_HDR_WRITE BIT(29) #define CTRL_HDR_ADDR_INC_DISABLE BIT(28) #define CTRL_HDR_MEM_MAP_SELECTOR GENMASK(27, 24) the names are probably sufficient that comments are not needed. And is should be easy for somebody to map these back to the names used in the standard. This also to some extent comes into the comment about coding style, a function does one thing, is short, etc. Short functions tend to have less indentation, meaning you can use longer names. And longer names are more readable, making the function easier to understand, so it does that one thing well. Andrew