Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2390610rwd; Sun, 28 May 2023 14:52:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5z9314qN9VgvWP7cFfvX2o4tiFm5z2hDD8RJ6t9c0FtTQTjvSCWW/+eV89iEO5ZDiVyz5a X-Received: by 2002:a17:902:c641:b0:1b0:307c:e6fe with SMTP id s1-20020a170902c64100b001b0307ce6femr3812218pls.10.1685310751392; Sun, 28 May 2023 14:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685310751; cv=none; d=google.com; s=arc-20160816; b=QpDA/xdtTO5Sm5S0Dx2q8MCWi24+zV00wxZ6I1Hg49+T3b9WorQF/4k9+tqCCothIT ojWBdkaiNIAne+oRZ0MlgUGdvVBQOAU7lGoivJpo0nfVEymCOQ5x8PfTlmOWwIRIcuIR CbcUL0oS/qb4zGzcvTPHNhGMWpnYtUeNeJivk+q0oq92HwquhC47ThV7h+bjloFiW4d0 sQwdeASZUE2qrYPK5eCGYnzR7NEC306JskszvTe6WHbuEjnjgnEZUnKpaYyU5CxxVIkQ US2QS42EPJupZMYI7ebDhxYiFpnTelwaXZ8tB8/PVLTQCH2C8KKDI5lb739REPHvDWYA zCuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=yCRJ2MVcZlpE9xqH4gn7t7dUZnonVkElKjiIxNhzjaI=; b=OTZcGJ7+Al4pVyBqnYPGGu/BGSSwwSrMtC9uw6tZaC1o9xWjfLryiETHXUVt2sV0A4 2Wh6f3RJTG5OtEAKFoN3P63KiMiUIRV3Q4ilOhvPDtl5VTEjnW0cyl6cqtToQS6gdLAj 6MzyGu+XzVUPnC3K4KV8VuwUFvzxrJh25cRGKsx5fkSkYSxc9gV6EKllyugxIFg7/HDR MF9cW3GwdqDQR1VxiKQF4+5kADlOGhres2CPIJ4nw1INDuu6Ki83VxOEcN/52bT7pHL+ hqXIAsvbqQMO4ZKEZKlHd1V15JwALcaCrQpbPWHGBu2J6MvMjKJYSpWll1h1CEFBvXnc 04hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=xWmSUtj9; 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=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r19-20020a170902be1300b001ab18790b0fsi3983001pls.95.2023.05.28.14.52.16; Sun, 28 May 2023 14:52:30 -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=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=xWmSUtj9; 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=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbjE1VVi (ORCPT + 99 others); Sun, 28 May 2023 17:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjE1VVg (ORCPT ); Sun, 28 May 2023 17:21:36 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38830B8 for ; Sun, 28 May 2023 14:21:34 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id BD57E2C0547; Mon, 29 May 2023 09:21:32 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1685308892; bh=yCRJ2MVcZlpE9xqH4gn7t7dUZnonVkElKjiIxNhzjaI=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=xWmSUtj9twtoV1vJHe6cAbWzpTtzgMMWEcJlY/M9nb9sM1X6JlSHIBvTCkqYUTEoL EKGdraFXfhOhlwvEPbWxpC/QyweIQJjYI44ru+JFeYYLxKlFJnBjkW/H6Y0YTmzZQh HZ+cEHrBpsJ35Lzjrcj1KN9Y7FqHZy+fmvT5KKQCtDs1IcRnrWFtk1LYbmxaMCDIbz cwLJZpP+cwMOaBGNkqeqmzqA2EICRKOBGGj0A/e/r229XTeww+oowY558AY6nwByYg AcBo2RwWbQUIQbYgL9O862s/seEUGURDE433pEl9NJ/kUxKZc043Cqev1mIcUOk0fZ VmmB1PqGL1IjA== Received: from svr-chch-ex2.atlnz.lc (Not Verified[2001:df5:b000:bc8::76]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Mon, 29 May 2023 09:21:32 +1200 Received: from svr-chch-ex2.atlnz.lc (2001:df5:b000:bc8:f753:6de:11c0:a008) by svr-chch-ex2.atlnz.lc (2001:df5:b000:bc8:f753:6de:11c0:a008) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 29 May 2023 09:21:32 +1200 Received: from svr-chch-ex2.atlnz.lc ([fe80::a9eb:c9b7:8b52:9567]) by svr-chch-ex2.atlnz.lc ([fe80::a9eb:c9b7:8b52:9567%15]) with mapi id 15.02.1118.026; Mon, 29 May 2023 09:21:32 +1200 From: Chris Packham To: Johan Hovold , Bartosz Golaszewski CC: Andy Shevchenko , "linus.walleij@linaro.org" , "maz@kernel.org" , "warthog618@gmail.com" , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] gpiolib: Avoid side effects in gpio_is_visible() Thread-Topic: [PATCH v2] gpiolib: Avoid side effects in gpio_is_visible() Thread-Index: AQHZig/BTFGZ3AxBtUaao6thQCRKf69gloYAgAswboCAAAZKAIADqjcA Date: Sun, 28 May 2023 21:21:32 +0000 Message-ID: <47cf842e-5ff5-e185-6f8f-351e886047b6@alliedtelesis.co.nz> References: <20230519050702.3681791-1-chris.packham@alliedtelesis.co.nz> In-Reply-To: Accept-Language: en-NZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.33.22.30] Content-Type: text/plain; charset="utf-8" Content-ID: <90B372F230570F469B1065936B6A1CB6@atlnz.lc> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.3 cv=cLieTWWN c=1 sm=1 tr=0 a=Xf/6aR1Nyvzi7BryhOrcLQ==:117 a=xqWC_Br6kY4A:10 a=75chYTbOgJ0A:10 a=IkcTkHD0fZMA:10 a=P0xRbXHiH_UA:10 a=pGLkceISAAAA:8 a=0nnCTZ3YY-g4gahm2lQA:9 a=QEXdDO2ut3YA:10 X-SEG-SpamProfiler-Score: 0 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, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: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