Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp947979rdb; Tue, 19 Sep 2023 15:35:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFG9mBoEbAYvsFU0wvsB/1kt0LLf+i6eaG0ruyoD4OiEm2Cc0iKHh06DyuRGSApBf/M2q5Z X-Received: by 2002:a17:902:e5d1:b0:1c3:52ed:1905 with SMTP id u17-20020a170902e5d100b001c352ed1905mr886277plf.28.1695162920520; Tue, 19 Sep 2023 15:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695162920; cv=none; d=google.com; s=arc-20160816; b=CRI9WA736f+qKPNZve/DCp4TbbkHCYsq5xvG3rRebN6CiNPggeE6KgPaUeaheK1x6R BnjCT85FFgbm+oVNBZ/UKTdjCsQZl5TXvXQHJ4pcmwXQKFB/5h62n89rvnb7+DGjpAyj FsjgwAwP0TPR7J1/js7Xsoad4HOxRNETqIEQm2XRLXXoUXGAtTcVF0+iGSbc96xQ/gxN /he9e1GFnZAFSeipzHNlJvk/QmB8nUeYXhYAUpOJRMuAOFxfNJPwciE5aK8T1xa/UdYG ahTlb4cFBItTEJteQE5xg36r33xcG1DVFE3aEO6K1dzBQ8HsTW9U58iMLNa1bqKvJUZ9 2lzw== 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=1Npvrzyz+/TZN9YuhYrSAlYVBkFpFs1Wg2sTP1rKTzM=; fh=IySK1NIJxFwSBQYGQ2CFWH64uB2XfVAq41B6jTCSVbQ=; b=bzNcpQHqDRYeHcjXDU67ZYNUyDmdjpo3kSgugEEGVstRGdTAVmZNgUzE0VqYlNIANO jXv3IBJ6AYDh+2T8R50hHujky4azycFRGEJ6NvLYe1f3pZSieGAqAaRZWL7YDRcDXPEe sGSJDuh+ImMir7KTPSv4PJTEbKkRnWHC3nWh3muwup6NU/uweojkTTUOaThPMiZBRnKJ Qkf21ol9dJsfZnm3H5WKp8cSfpe07ZjmMWWXVlTexh/pU9dvaOkksQoenyK5J46JBfCF CPnjaCv+w7W1i7LUYYVeXss00xVFx6oeCgE5mdlV573h0+louzsPjwinPetOIuzgoxNU qVIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=XXl0VR2t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id l17-20020a170903121100b001bb2d95f2a7si10647157plh.267.2023.09.19.15.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 15:35:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=XXl0VR2t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id D41558277E7B; Tue, 19 Sep 2023 05:55:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231489AbjISMzE (ORCPT + 99 others); Tue, 19 Sep 2023 08:55:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232080AbjISMzC (ORCPT ); Tue, 19 Sep 2023 08:55:02 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D441DF3; Tue, 19 Sep 2023 05:54:56 -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=1Npvrzyz+/TZN9YuhYrSAlYVBkFpFs1Wg2sTP1rKTzM=; b=XXl0VR2tj8IyKUOHxyeVKdBQ12 QbqTt8W+/Un78rkZaHzfMrIOQfiPRpMR423vSz4l8tSzehXttY60c+iOpNCet9ysn7EAbYhBdUPyT KKUq+vcVhFuT4suCzdVfZvc1mfP7pWTaeatTbcKuDD3L4r1sYPzuYMaYJzyhP0c7UuQo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qiaFb-006uYS-1A; Tue, 19 Sep 2023 14:54:47 +0200 Date: Tue, 19 Sep 2023 14:54:47 +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: [RFC PATCH net-next 3/6] net: ethernet: implement OA TC6 configuration function Message-ID: References: <20230908142919.14849-1-Parthiban.Veerasooran@microchip.com> <20230908142919.14849-4-Parthiban.Veerasooran@microchip.com> <46fab729-4c5a-1a6e-37d0-fea62c0717f7@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46fab729-4c5a-1a6e-37d0-fea62c0717f7@microchip.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 19 Sep 2023 05:55:04 -0700 (PDT) > >> +/* Unmasking interrupt fields in IMASK0 */ > >> +#define HDREM ~BIT(5) /* Header Error Mask */ > >> +#define LOFEM ~BIT(4) /* Loss of Framing Error Mask */ > >> +#define RXBOEM ~BIT(3) /* Rx Buffer Overflow Error Mask */ > >> +#define TXBUEM ~BIT(2) /* Tx Buffer Underflow Error Mask */ > >> +#define TXBOEM ~BIT(1) /* Tx Buffer Overflow Error Mask */ > >> +#define TXPEM ~BIT(0) /* Tx Protocol Error Mask */ > > > > Using ~BIT(X) is very usual. I would not do this, Principle of Least > > Surprise. > Sorry, I don't get your point. Could you please explain bit more? Look around kernel header files. How often do you see ~BIT(5)? My guess it is approximately 0. So i'm suggesting you remove the ~ and have the user of the #define assemble the mask and then do the ~ . Andrew