Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp350460rdb; Mon, 18 Sep 2023 18:13:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF5vkBHRC0wNRTqYuYYQ00ZAdlTPi9V601gFrF4MjZwVpTpy/5mBl9Ja2z/HhoTKdmw+ecl X-Received: by 2002:a05:6a00:1508:b0:68f:b2f3:7737 with SMTP id q8-20020a056a00150800b0068fb2f37737mr10526056pfu.15.1695085988097; Mon, 18 Sep 2023 18:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695085988; cv=none; d=google.com; s=arc-20160816; b=Up+/hiebJKCpfXXTnPxIJzgVoGZ2Solm0Nie5G6PHKcQJPHSZfILdGSwQ8Y5bkvljG CnSVWbND+3ACy1Q73+A/4z5WYItrMbkyqChe6EtZS4WY2ZV6HaomQOU9ntk/AvOR8QpO SStypOSc2Uh93tR8cSefhB6mRYE2L/d12ndJGHpRfef4hc/sBX83/Utjl4xRMt0icAoU eAwm+Rlfts2u13jPV2bH5LP+mroWJdiNAZS76e6C2+GvHwTBHxkV45ULI0+kLBdS3Bz8 7irmTKXjpd5aS2YV/aYJwB8S2pRtpnynz0hYBGQWEaluXPp5qBQdVErORlldIyYMkP69 cLtA== 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=A4yzGLXsCoMt636aHEn/2wTD7iTwqIEeCCVkVl5NG28=; fh=ewP4aXpSQkBLjkXgqzBt6piONudmVjUous5s4MZOyOE=; b=HpjutfbUWmJbjdtLMHsfNbLTCN349RcXmcBu6y8nLRZKryU0lUBRNuo7x6+BV/II/4 YsBHdlgwvbuXNrai9svn9ismx0KbpzC+b0A7sA80Qfn4G1jpMSde5a+FLlXK7Av4zYZa sRg+6+0QAFYGRj+cMX6+M/ZMGX2Ibj2r2nFcwhRDht8v5czbbvkxSHIAYuOLux4k3Jrx CrZ5ZS0ynkZV9pPVQlhpy1m3uQnG71OIpEOn48aWwXNKvZUAPDg3DiTc/L85eYv/3yVP 2TwVOPlGxC7zRHOxIs801A4dpT7iDq3zGA5AdORdV/+rbcJ71xNdEcInpe0OUi7Bmuwp U2ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=0OWcHQZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j9-20020a056a00234900b0068a3e169b99si9028938pfj.260.2023.09.18.18.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 18:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=0OWcHQZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id A7DFF830D369; Mon, 18 Sep 2023 10:07:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231356AbjIRRHx (ORCPT + 99 others); Mon, 18 Sep 2023 13:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231284AbjIRRHu (ORCPT ); Mon, 18 Sep 2023 13:07:50 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06AE94; Mon, 18 Sep 2023 10:07:38 -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=A4yzGLXsCoMt636aHEn/2wTD7iTwqIEeCCVkVl5NG28=; b=0OWcHQZMNQM1VZvs8cNLfozLdU ibUf0Cv45//VYlJJO/82/PsrH3JVtfWBxWQo6escaBPOqKSAFF94nd8jyjswqUdXBVQWZLsR15b5y B4KR9udrykfuaycCrQ+s2YhmecYeIL//a7LZ/YUgovJ6UwueeGZmEmt/iDXQ9L1H58N0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qiGy0-006oHE-Hg; Mon, 18 Sep 2023 18:19:20 +0200 Date: Mon, 18 Sep 2023 18:19:20 +0200 From: Andrew Lunn To: Vadim Fedorenko Cc: Jay Monkman , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Piergiorgio Beruto , Arndt Schuebel Subject: Re: [PATCH 3/4] net: phy: Add GPIO and DT support to NCN26000 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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_PASS,SPF_PASS 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 (howler.vger.email [0.0.0.0]); Mon, 18 Sep 2023 10:07:59 -0700 (PDT) On Mon, Sep 18, 2023 at 11:40:36AM +0100, Vadim Fedorenko wrote: > > +static int ncn26000_gpio_request(struct gpio_chip *gc, unsigned int offset) > > +{ > > + struct ncn26000_priv *priv = gpiochip_get_data(gc); > > + > > + if (offset > 2) > > + return -ENODEV; > > + > > + if (priv->gpiomask & (1 << offset)) > > it's better to use BIT(offset) here Hi Vadim When replying, please trim the email to just the relevant text. Thanks Andrew